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"` TgUserid string `json:"telegram_userid"` Email string `json:"email"` SubnetRanges []string `json:"subnet_ranges,omitempty"` AllocatedIPs []string `json:"allocated_ips"` AllowedIPs []string `json:"allowed_ips"` ExtraAllowedIPs []string `json:"extra_allowed_ips"` Endpoint string `json:"endpoint"` UseServerDNS bool `json:"use_server_dns"` Enabled bool `json:"enabled"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Client model
type ClientData ¶
ClientData includes the Client and extra data
type ClientDefaults ¶ added in v0.4.0
type ClientDefaults struct { AllowedIps []string ExtraAllowedIps []string UseServerDNS bool EnableAfterCreation bool }
ClientDefaults Defaults for creation of new clients used in the templates
type ClientServerHashes ¶ added in v0.5.0
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"` UpdatedAt time.Time `json:"updated_at"` }
GlobalSetting model
type QRCodeSettings ¶ added in v0.4.0
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"` PreDown string `json:"pre_down"` 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 ¶ added in v0.3.7
type WakeOnLanHost struct { MacAddress string `json:"MacAddress"` Name string `json:"Name"` LatestUsed *time.Time `json:"LatestUsed"` }
func (WakeOnLanHost) ResolveResourceName ¶ added in v0.3.7
func (host WakeOnLanHost) ResolveResourceName() (string, error)
Click to show internal directories.
Click to hide internal directories.