Documentation ¶
Index ¶
- Constants
- type Device
- type DeviceEvent
- type DeviceList
- type DeviceStats
- type DeviceStatsMap
- type Error
- type InterfaceSpec
- type PortForwarding
- type WireguardInterfaceSpec
- func (m *WireguardInterfaceSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *WireguardInterfaceSpec) MarshalBinary() ([]byte, error)
- func (m *WireguardInterfaceSpec) UnmarshalBinary(b []byte) error
- func (m *WireguardInterfaceSpec) Validate(formats strfmt.Registry) error
- type WireguardSpec
Constants ¶
const ( // DeviceEventActionCreate captures enum value "create" DeviceEventActionCreate string = "create" // DeviceEventActionUpdate captures enum value "update" DeviceEventActionUpdate string = "update" // DeviceEventActionDelete captures enum value "delete" DeviceEventActionDelete string = "delete" // DeviceEventActionUpdatePorts captures enum value "update_ports" DeviceEventActionUpdatePorts string = "update_ports" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { // fw mark FwMark int64 `json:"fwmark,omitempty"` // i ps IPs []string `json:"ips"` // ports Ports []*PortForwarding `json:"ports"` // wireguard Wireguard *WireguardSpec `json:"wireguard,omitempty"` }
Device device
swagger:model Device
func (*Device) ContextValidate ¶
ContextValidate validate this device based on the context it is used
func (*Device) MarshalBinary ¶
MarshalBinary interface implementation
func (*Device) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type DeviceEvent ¶
type DeviceEvent struct { // action // Enum: [create update delete update_ports] Action string `json:"action,omitempty"` // device Device *Device `json:"device,omitempty"` }
DeviceEvent device event
swagger:model DeviceEvent
func (*DeviceEvent) ContextValidate ¶
ContextValidate validate this device event based on the context it is used
func (*DeviceEvent) MarshalBinary ¶
func (m *DeviceEvent) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DeviceEvent) UnmarshalBinary ¶
func (m *DeviceEvent) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DeviceList ¶
type DeviceList []*Device
DeviceList device list
swagger:model DeviceList
func (DeviceList) ContextValidate ¶
ContextValidate validate this device list based on the context it is used
type DeviceStats ¶
type DeviceStats struct { // Number of active connections Connections int64 `json:"connections,omitempty"` // received bytes ReceivedBytes int64 `json:"received_bytes,omitempty"` // transmitted bytes TransmittedBytes int64 `json:"transmitted_bytes,omitempty"` }
DeviceStats device stats
swagger:model DeviceStats
func (*DeviceStats) ContextValidate ¶
ContextValidate validates this device stats based on context it is used
func (*DeviceStats) MarshalBinary ¶
func (m *DeviceStats) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DeviceStats) UnmarshalBinary ¶
func (m *DeviceStats) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DeviceStatsMap ¶
type DeviceStatsMap map[string]DeviceStats
DeviceStatsMap device stats map
swagger:model DeviceStatsMap
func (DeviceStatsMap) ContextValidate ¶
ContextValidate validate this device stats map based on the context it is used
type Error ¶
type Error struct { // code Code string `json:"code,omitempty"` // message Message string `json:"message,omitempty"` }
Error error
swagger:model Error
func (*Error) ContextValidate ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type InterfaceSpec ¶
type InterfaceSpec struct { // i ps IPs []string `json:"ips"` // name Name string `json:"name,omitempty"` // wireguard Wireguard *WireguardInterfaceSpec `json:"wireguard,omitempty"` }
InterfaceSpec interface spec
swagger:model InterfaceSpec
func (*InterfaceSpec) ContextValidate ¶
ContextValidate validate this interface spec based on the context it is used
func (*InterfaceSpec) MarshalBinary ¶
func (m *InterfaceSpec) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InterfaceSpec) UnmarshalBinary ¶
func (m *InterfaceSpec) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PortForwarding ¶
type PortForwarding struct { // dst Dst int64 `json:"dst,omitempty"` // src Src int64 `json:"src,omitempty"` }
PortForwarding port forwarding
swagger:model PortForwarding
func (*PortForwarding) ContextValidate ¶
ContextValidate validates this port forwarding based on context it is used
func (*PortForwarding) MarshalBinary ¶
func (m *PortForwarding) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PortForwarding) UnmarshalBinary ¶
func (m *PortForwarding) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WireguardInterfaceSpec ¶
type WireguardInterfaceSpec struct { // ports Ports []int64 `json:"ports"` // priv key PrivKey string `json:"priv_key,omitempty"` }
WireguardInterfaceSpec wireguard interface spec
swagger:model WireguardInterfaceSpec
func (*WireguardInterfaceSpec) ContextValidate ¶
func (m *WireguardInterfaceSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this wireguard interface spec based on context it is used
func (*WireguardInterfaceSpec) MarshalBinary ¶
func (m *WireguardInterfaceSpec) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WireguardInterfaceSpec) UnmarshalBinary ¶
func (m *WireguardInterfaceSpec) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WireguardSpec ¶
type WireguardSpec struct { // endpoint Endpoint string `json:"endpoint,omitempty"` // ps key PsKey string `json:"ps_key,omitempty"` // pub key PubKey string `json:"pub_key,omitempty"` }
WireguardSpec wireguard spec
swagger:model WireguardSpec
func (*WireguardSpec) ContextValidate ¶
ContextValidate validates this wireguard spec based on context it is used
func (*WireguardSpec) MarshalBinary ¶
func (m *WireguardSpec) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WireguardSpec) UnmarshalBinary ¶
func (m *WireguardSpec) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation