models

package
v0.0.0-...-6925780 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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

func (m *Device) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this device based on the context it is used

func (*Device) MarshalBinary

func (m *Device) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Device) UnmarshalBinary

func (m *Device) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Device) Validate

func (m *Device) Validate(formats strfmt.Registry) error

Validate validates this device

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

func (m *DeviceEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*DeviceEvent) Validate

func (m *DeviceEvent) Validate(formats strfmt.Registry) error

Validate validates this device event

type DeviceList

type DeviceList []*Device

DeviceList device list

swagger:model DeviceList

func (DeviceList) ContextValidate

func (m DeviceList) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this device list based on the context it is used

func (DeviceList) Validate

func (m DeviceList) Validate(formats strfmt.Registry) error

Validate validates this device list

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

func (m *DeviceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*DeviceStats) Validate

func (m *DeviceStats) Validate(formats strfmt.Registry) error

Validate validates this device stats

type DeviceStatsMap

type DeviceStatsMap map[string]DeviceStats

DeviceStatsMap device stats map

swagger:model DeviceStatsMap

func (DeviceStatsMap) ContextValidate

func (m DeviceStatsMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this device stats map based on the context it is used

func (DeviceStatsMap) Validate

func (m DeviceStatsMap) Validate(formats strfmt.Registry) error

Validate validates this device stats map

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

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

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

func (m *InterfaceSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*InterfaceSpec) Validate

func (m *InterfaceSpec) Validate(formats strfmt.Registry) error

Validate validates this interface spec

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

func (m *PortForwarding) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*PortForwarding) Validate

func (m *PortForwarding) Validate(formats strfmt.Registry) error

Validate validates this port forwarding

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

func (*WireguardInterfaceSpec) Validate

func (m *WireguardInterfaceSpec) Validate(formats strfmt.Registry) error

Validate validates this wireguard interface spec

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

func (m *WireguardSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*WireguardSpec) Validate

func (m *WireguardSpec) Validate(formats strfmt.Registry) error

Validate validates this wireguard spec

Jump to

Keyboard shortcuts

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