Documentation ¶
Index ¶
Constants ¶
View Source
const WakeOnLanHostCollectionName = "wake_on_lan_hosts"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID string `json:"id"` PrivateKey string `json:"private_key"` PublicKey string `json:"public_key"` Name string `json:"name"` Email string `json:"email"` Telegram string `json:"telegram"` AllocatedIPs []string `json:"allocated_ips"` AllowedIPs []string `json:"allowed_ips"` ExtraAllowedIPs []string `json:"extra_allowed_ips"` UseServerDNS bool `json:"use_server_dns"` Enabled bool `json:"enabled"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` PaymentDate time.Time `json:"client_data_payment"` }
Client model
type ClientData ¶
ClientData includes the Client and extra data
type ClientDefaults ¶
type ClientDefaults struct { AllowedIps []string ExtraAllowedIps []string UseServerDNS bool EnableAfterCreation bool }
ClientDefaults Defaults for creation of new clients used in the templates
type ClientServerHashes ¶
ClientServerHashes struct, to save hashes to detect changes
type GlobalSetting ¶
type GlobalSetting struct { EndpointAddress string `json:"endpoint_address"` DNSServers []string `json:"dns_servers"` MTU int `json:"mtu,string"` PersistentKeepalive int `json:"persistent_keepalive,string"` FirewallMark string `json:"firewall_mark"` Table string `json:"table"` ConfigFilePath string `json:"config_file_path"` RemoteAPI string `json:"remote_api"` UpdatedAt time.Time `json:"updated_at"` TelegramChat int64 `json:"telegram_chat"` TelegramToken string `json:"telegram_token"` }
GlobalSetting model
type Peer ¶
type Peer struct { PublicKey string `json:"public_key"` Endpoint string `json:"endpoint"` LastHandshake time.Time `json:"last_handshake"` ReceiveBytes int64 `json:"receive_bytes"` TransmitBytes int64 `json:"transmit_bytes"` AllowedIPs []string `json:"allowed_ips"` ProtocolVersion int `json:"protocol_version"` }
type QRCodeSettings ¶
type ServerInterface ¶
type ServerInterface struct { Addresses []string `json:"addresses"` ListenPort int `json:"listen_port,string"` // ,string to get listen_port string input as int UpdatedAt time.Time `json:"updated_at"` PostUp string `json:"post_up"` PostDown string `json:"post_down"` }
ServerInterface model
type ServerKeypair ¶
type ServerKeypair struct { PrivateKey string `json:"private_key"` PublicKey string `json:"public_key"` UpdatedAt time.Time `json:"updated_at"` }
ServerKeypair model
type User ¶
type User struct { Username string `json:"username"` Password string `json:"password"` // PasswordHash takes precedence over Password. PasswordHash string `json:"password_hash"` Admin bool `json:"admin"` }
User model
type WakeOnLanHost ¶
type WakeOnLanHost struct { MacAddress string `json:"MacAddress"` Name string `json:"Name"` LatestUsed *time.Time `json:"LatestUsed"` }
func (WakeOnLanHost) ResolveResourceName ¶
func (host WakeOnLanHost) ResolveResourceName() (string, error)
Click to show internal directories.
Click to hide internal directories.