Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultWoLPort = 9 DefaultNUTServerPort = 3493 )
Variables ¶
View Source
var ( ErrCertFilesNotSet = errors.New("SSL is enabled but certFile or keyFile is not set") ErrTLSConfigNotSet = errors.New("TLSConfig cannot be null") ErrFailedParsePEM = errors.New("failed to parse PEM certificate") ErrFailedReadCertFile = errors.New("failed to read certificate file") )
View Source
var ( ErrUsernameRequired = errors.New("username is required") ErrPasswordRequired = errors.New("password is required") ErrInvalidPort = errors.New("port must be a number between 1 and 65535") ErrNameRequired = errors.New("name is required") ErrHostRequired = errors.New("host is required") ErrMACRequired = errors.New("MAC is required") ErrInvalidMac = errors.New("MAC address is invalid") ErrInvalidHost = errors.New("host is invalid, must be an IP address or hostname") ErrBroadcastRequired = errors.New("broadcast is required") ErrInvalidBroadcast = errors.New("broadcast is invalid, must be an IP address") ErrIntervalRequired = errors.New("interval is required") ErrInvalidInterval = errors.New("interval is invalid, must be a duration") )
Functions ¶
This section is empty.
Types ¶
type CLIArgs ¶ added in v0.8.0
type CLIArgs struct {
TLSConfig *tls.Config
ConfigFile string
CertFile string
KeyFile string
Port string
Host net.IP
UseSSL bool
}
func NewCLIArgs ¶ added in v0.8.0
func (*CLIArgs) ListenAddress ¶ added in v0.9.0
type Config ¶
func CreateDefaultConfig ¶ added in v1.1.0
func CreateDefaultConfig() *Config
type MacAddress ¶ added in v1.2.0
type MacAddress struct {
MAC string `json:"mac" example:"00:11:22:33:44:55"`
}
func NewMacAddress ¶ added in v1.2.0
func NewMacAddress(mac string) (*MacAddress, error)
func (*MacAddress) Validate ¶ added in v1.2.0
func (m *MacAddress) Validate() error
type NutServer ¶
type Profiler ¶ added in v1.2.0
type Profiler struct {
Enabled bool `json:"enabled" default:"false"`
}
type TargetServer ¶
type TargetServer struct {
*MacAddress
Name string `json:"name"`
Broadcast string `json:"broadcast"`
Rules []string `json:"rules"`
Interval time.Duration `json:"interval" default:"900000000000"`
Port int `json:"port" default:"9"`
}
func NewTargetServer ¶
func (*TargetServer) Validate ¶
func (ts *TargetServer) Validate() error
Click to show internal directories.
Click to hide internal directories.