Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface struct { Alias string `json:"alias,omitempty"` Type InterfaceType `json:"type"` AddressingMode InterfaceAddressingMode `json:"addressing_mode"` Address *netip.Prefix `json:"address,omitempty"` HardwareDevice *string `json:"hardware_device,omitempty"` // TODO fix Validator for int pointers with min=0,max=4094 VlanID *uint `json:"vlan_id,omitempty"` VlanParent *string `json:"vlan_parent,omitempty"` BondMembers *[]string `json:"bond_members,omitempty"` BridgeMembers *[]string `json:"bridge_members,omitempty"` Comment string `json:"comment,omitempty"` }
type InterfaceAddressingMode ¶
type InterfaceAddressingMode int
const ( None InterfaceAddressingMode = iota Static Dhcp )
func (*InterfaceAddressingMode) FromString ¶
func (t *InterfaceAddressingMode) FromString(input string) InterfaceAddressingMode
func (InterfaceAddressingMode) MarshalJSON ¶
func (t InterfaceAddressingMode) MarshalJSON() ([]byte, error)
func (InterfaceAddressingMode) String ¶
func (t InterfaceAddressingMode) String() string
func (*InterfaceAddressingMode) UnmarshalJSON ¶
func (t *InterfaceAddressingMode) UnmarshalJSON(b []byte) error
type InterfaceType ¶
type InterfaceType int
const ( Hardware InterfaceType = iota Vlan Bond Bridge )
func (*InterfaceType) FromString ¶
func (t *InterfaceType) FromString(input string) InterfaceType
func (InterfaceType) MarshalJSON ¶
func (t InterfaceType) MarshalJSON() ([]byte, error)
func (InterfaceType) String ¶
func (t InterfaceType) String() string
func (*InterfaceType) UnmarshalJSON ¶
func (t *InterfaceType) UnmarshalJSON(b []byte) error
type Network ¶
type Network struct { Interfaces map[string]Interface `json:"interfaces"` StaticRoutes []StaticRoute `json:"static_routes"` }
Click to show internal directories.
Click to hide internal directories.