28 lines
331 B
Go
28 lines
331 B
Go
package store
|
|
|
|
import (
|
|
"net/url"
|
|
"time"
|
|
)
|
|
|
|
type ProxyID string
|
|
|
|
func NewProxyID() ProxyID {
|
|
return ProxyID(NewID())
|
|
}
|
|
|
|
var ParseProxyID = ParseID[ProxyID]
|
|
|
|
type ProxyHeader struct {
|
|
ID ProxyID
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type Proxy struct {
|
|
ProxyHeader
|
|
To *url.URL
|
|
From []string
|
|
Weight int
|
|
}
|