cmd

package
v0.0.0-...-5f61523 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 88 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassStrings

func ClassStrings() []string

ClassStrings returns a slice of all String values of the enum

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately.

func IPsFromSubnet

func IPsFromSubnet(arg string) (res []string)

IPsFromSubnet creates a list of ip addresses for given subnet

func ParseHostIPNet

func ParseHostIPNet(arg string) (res []string)

ParseHostIPNet converts host or cidr into a host list

Types

type Class

type Class int
const (
	ClassConfigFile Class
	ClassMeter
	ClassCharger
	ClassVehicle
	ClassTariff
	ClassCircuit
	ClassSite
	ClassMqtt
	ClassDatabase
	ClassModbusProxy
	ClassEEBus
	ClassJavascript
	ClassGo
	ClassHEMS
	ClassInflux
	ClassMessenger
	ClassSponsorship
)

func ClassString

func ClassString(s string) (Class, error)

ClassString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ClassValues

func ClassValues() []Class

ClassValues returns all values of the enum

func (Class) IsAClass

func (i Class) IsAClass() bool

IsAClass returns "true" if the value is listed in the enum definition. "false" otherwise

func (Class) MarshalText

func (i Class) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Class

func (Class) String

func (i Class) String() string

func (*Class) UnmarshalText

func (i *Class) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Class

type ClassError

type ClassError struct {
	Class Class
	// contains filtered or unexported fields
}

ClassError indicates the class of devices that failed

func (*ClassError) Error

func (e *ClassError) Error() string

func (ClassError) MarshalJSON

func (e ClassError) MarshalJSON() ([]byte, error)

type DeviceError

type DeviceError struct {
	Name string
	// contains filtered or unexported fields
}

DeviceError indicates the specific device that failed

func (*DeviceError) Error

func (e *DeviceError) Error() string

type FatalError

type FatalError struct {
	// contains filtered or unexported fields
}

FatalError is an error that can be marshaled

func (*FatalError) Error

func (e *FatalError) Error() string

func (FatalError) MarshalJSON

func (e FatalError) MarshalJSON() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL