Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_LOG_LEVEL = "info" DEFAULT_SERVER_PORT = 8080 DEFAULT_CLIENT_INTERVAL = time.Duration(5 * time.Minute) MODE_SERVER = "server" MODE_CLIENT = "client" MODE_RELAY = "relay" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct { Token string `yaml:"token"` Proxy bool `yaml:"proxy,omitempty"` Domains []string `yaml:"domains"` Interval time.Duration `yaml:"interval,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` }
Yaml configuration for dyndns client
type Config ¶
type Config struct { LogLevel string `yaml:"logLevel,omitempty"` Server ServerConfig `yaml:"server,omitempty"` Client ClientConfig `yaml:"client,omitempty"` }
func LoadConfig ¶
Loads config from file, returns error if config is invalid Arguments:
path: Path to config file mode: Mode used, determines how the config will be validated and which values will be processed env: Determines if enviroment variables in the file will be expanded before decoding
type ErrIncompleteSSLConfig ¶
type ErrIncompleteSSLConfig struct{}
func (ErrIncompleteSSLConfig) Error ¶
func (e ErrIncompleteSSLConfig) Error() string
type ErrInvalidInterval ¶
func (*ErrInvalidInterval) Error ¶
func (e *ErrInvalidInterval) Error() string
type ErrUnknownLogLevel ¶
type ErrUnknownLogLevel struct {
Level string
}
func (*ErrUnknownLogLevel) Error ¶
func (e *ErrUnknownLogLevel) Error() string
type ServerConfig ¶
type ServerConfig struct { Port int `yaml:"port"` Domains []string `yaml:"domains,omitempty"` SSL SSLConfig `yaml:"ssl,omitempty"` }
Yaml configuration for dyndns server
Click to show internal directories.
Click to hide internal directories.