Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultWoLPort = 9 DefaultNUTServerPort = 3493 )
Variables ¶
View Source
var ( ErrorUsernameRequired = errors.New("username is required") ErrorPasswordRequired = errors.New("password is required") ErrorInvalidPort = errors.New("port must be between 1 and 65535") ErrorNameRequired = errors.New("name is required") ErrorHostRequired = errors.New("host is required") ErrorMACRequired = errors.New("MAC is required") ErrorInvalidMac = errors.New("MAC address is invalid") ErrorInvalidHost = errors.New("host is invalid, must be an IP address or hostname") ErrorBroadcastRequired = errors.New("broadcast is required") ErrorInvalidBroadcast = errors.New("broadcast is invalid, must be an IP address") ErrorIntervalRequired = errors.New("interval is required") ErrorInvalidInterval = errors.New("interval is invalid, must be a duration") )
Functions ¶
This section is empty.
Types ¶
type ConfigLoader ¶
type NutServer ¶
type NutServerInterface ¶
type TargetServer ¶
type TargetServer struct { Name string MAC string Broadcast string Port int `default:"9"` Interval string `default:"15m"` Rules []string }
func NewTargetServer ¶
func NewTargetServer(name, mac, broadcast, interval string, port int, rules []string) (*TargetServer, error)
func (*TargetServer) Validate ¶
func (ts *TargetServer) Validate() error
Click to show internal directories.
Click to hide internal directories.