models

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectNetgearModel

func DetectNetgearModel(args *types.GlobalOptions, host string) (types.NetgearModel, error)

Types

type PoeCommand

type PoeCommand struct {
	PoeStatusCommand       PoeStatusCommand       `cmd:"" name:"status" help:"show current PoE status for all ports" default:"1"`
	PoeShowSettingsCommand PoeShowSettingsCommand `cmd:"" name:"settings" help:"show current PoE settings for all ports"`
	PoeSetPowerCommand     PoeSetConfigCommand    `cmd:"" name:"set" help:"set new PoE settings per each PORT number"`
	PoeCyclePowerCommand   PoeCyclePowerCommand   `cmd:"" name:"cycle" help:"power cycle one or more PoE ports"`
}

type PoeCyclePowerCommand

type PoeCyclePowerCommand struct {
	Address string `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
	Ports   []int  `required:"" help:"port number (starting with 1), use multiple times for cycling multiple ports at once" short:"p" name:"port"`
}

func (*PoeCyclePowerCommand) Run

type PoeExt

type PoeExt struct {
	Hash         string
	PortMaxPower string
}

type PoePortSetting

type PoePortSetting struct {
	PortIndex    int8
	PortName     string
	PortPwr      bool
	PwrMode      string
	PortPrio     string
	LimitType    string
	PwrLimit     string
	DetecType    string
	LongerDetect string
}

type PoePortStatus

type PoePortStatus struct {
	PortIndex            int8
	PortName             string
	PoePowerClass        string
	PoePortStatus        string
	ErrorStatus          string
	VoltageInVolt        int32
	CurrentInMilliAmps   int32
	PowerInWatt          float32
	TemperatureInCelsius int32
}

type PoeSetConfigCommand

type PoeSetConfigCommand struct {
	Address      string `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
	Ports        []int  `required:"" help:"port number (starting with 1), use multiple times for setting multiple ports at once" short:"p" name:"port"`
	PortPwr      string `optional:"" help:"power state for port [enable, disable]" short:"s" name:"power"`
	PwrMode      string `optional:"" help:"power mode [802.3af, legacy, pre-802.3at, 802.3at]" short:"m" name:"mode"`
	PortPrio     string `optional:"" help:"priority [low, high, critical]" short:"r" name:"priority"`
	LimitType    string `optional:"" help:"power limit type [none, class, user]" short:"y" name:"limit-type"`
	PwrLimit     string `optional:"" help:"power limit (W) [e.g. '30.0']" short:"l" name:"pwr-limit"`
	DetecType    string `optional:"" help:"detection type [IEEE 802, legacy, 4pt 802.3af + Legacy]" short:"e" name:"detect-type"`
	LongerDetect string `optional:"" help:"longer detection time [enable, disable]" name:"longer-detection-time"`
}

func (*PoeSetConfigCommand) Run

func (poe *PoeSetConfigCommand) Run(args *types.GlobalOptions) error

type PoeSettingKey

type PoeSettingKey string
const (
	PortPrio     PoeSettingKey = "PortPrio"
	PwrMode      PoeSettingKey = "PwrMode"
	LimitType    PoeSettingKey = "LimitType"
	PwrLimit     PoeSettingKey = "PwrLimit"
	DetecType    PoeSettingKey = "DetecType"
	LongerDetect PoeSettingKey = "LongerDetect"
)

type PoeShowSettingsCommand

type PoeShowSettingsCommand struct {
	Address string `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
}

func (*PoeShowSettingsCommand) Run

type PoeStatusCommand

type PoeStatusCommand struct {
	Address string `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
}

func (*PoeStatusCommand) Run

func (poe *PoeStatusCommand) Run(args *types.GlobalOptions) error

type PortCommand

type PortCommand struct {
	PortSettingsCommand PortSettingsCommand `cmd:"" name:"settings" help:"show switch port settings" default:"1"`
	PortSetCommand      PortSetCommand      `cmd:"" name:"set" help:"set properties for a port number"`
}

type PortSetCommand

type PortSetCommand struct {
	Address          string  `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
	Ports            []int   `required:"" help:"port number (starting with 1), use multiple times for setting multiple ports at once" short:"p" name:"port"`
	Name             *string `optional:"" help:"sets the name of a port, 1-16 character limit" short:"n"`
	Speed            string  `` /* 135-byte string literal not displayed */
	IngressRateLimit string  `` /* 224-byte string literal not displayed */
	EgressRateLimit  string  `` /* 224-byte string literal not displayed */
	FlowControl      string  `optional:"" help:"enable/disable flow control on port ['Off', 'On']" short:"c"`
}

func (*PortSetCommand) Run

func (portSet *PortSetCommand) Run(args *types.GlobalOptions) error

type PortSetting

type PortSetting struct {
	Index            int8
	Name             string
	Speed            string
	IngressRateLimit string
	EgressRateLimit  string
	FlowControl      string
	// read only values (can't be set)
	LinkSpeed  string
	PortStatus string
}

type PortSettingKey

type PortSettingKey string
const (
	Index            PortSettingKey = "Index"
	Name             PortSettingKey = "Name"
	Speed            PortSettingKey = "Speed"
	IngressRateLimit PortSettingKey = "IngressRateLimit"
	EgressRateLimit  PortSettingKey = "EgressRateLimit"
	FlowControl      PortSettingKey = "FlowControl"
)

type PortSettingsCommand

type PortSettingsCommand struct {
	Address string `required:"" help:"the Netgear switch's IP address or host name to connect to" short:"a"`
}

func (*PortSettingsCommand) Run

func (port *PortSettingsCommand) Run(args *types.GlobalOptions) error

Jump to

Keyboard shortcuts

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