Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend struct { IpNetworkCaps chan capnp.Pointer GetServerConfig, SetServerConfig chan ServerConfig ClientConns chan io.ReadWriteCloser HaveNetwork chan bool }
A Backend is an interface for communication between the UI and the backend.
type ServerConfig ¶
type ServerConfig struct { Host string // Hostname of the server Port uint16 // TCP port number TLS bool // Whether to connect via TLS }
A ServerConfig specifies a server to connect to.
func (*ServerConfig) String ¶
func (s *ServerConfig) String() string
type SettingsForm ¶
type SettingsForm struct { Config ServerConfig XSRFToken string }
A SettingsForm a set of values for the "settings" form on the web ui.
func (*SettingsForm) Validate ¶
func (form *SettingsForm) Validate(xsrfKey string) error
Validate the SettingsForm. This both sanity-checks the ServerConfig and verifies the XSRF token.
Click to show internal directories.
Click to hide internal directories.