Documentation ¶
Overview ¶
Package wireguard contains generated bindings for API file wireguard.api.
Contents: - 1 enum - 2 structs - 12 messages
Index ¶
- Constants
- Variables
- func AllMessages() []api.Message
- type RPCService
- type RPCService_WireguardInterfaceDumpClient
- type RPCService_WireguardPeersDumpClient
- type WireguardInterface
- type WireguardInterfaceCreate
- func (*WireguardInterfaceCreate) GetCrcString() string
- func (*WireguardInterfaceCreate) GetMessageName() string
- func (*WireguardInterfaceCreate) GetMessageType() api.MessageType
- func (m *WireguardInterfaceCreate) Marshal(b []byte) ([]byte, error)
- func (m *WireguardInterfaceCreate) Reset()
- func (m *WireguardInterfaceCreate) Size() (size int)
- func (m *WireguardInterfaceCreate) Unmarshal(b []byte) error
- type WireguardInterfaceCreateReply
- func (*WireguardInterfaceCreateReply) GetCrcString() string
- func (*WireguardInterfaceCreateReply) GetMessageName() string
- func (*WireguardInterfaceCreateReply) GetMessageType() api.MessageType
- func (m *WireguardInterfaceCreateReply) Marshal(b []byte) ([]byte, error)
- func (m *WireguardInterfaceCreateReply) Reset()
- func (m *WireguardInterfaceCreateReply) Size() (size int)
- func (m *WireguardInterfaceCreateReply) Unmarshal(b []byte) error
- type WireguardInterfaceDelete
- func (*WireguardInterfaceDelete) GetCrcString() string
- func (*WireguardInterfaceDelete) GetMessageName() string
- func (*WireguardInterfaceDelete) GetMessageType() api.MessageType
- func (m *WireguardInterfaceDelete) Marshal(b []byte) ([]byte, error)
- func (m *WireguardInterfaceDelete) Reset()
- func (m *WireguardInterfaceDelete) Size() (size int)
- func (m *WireguardInterfaceDelete) Unmarshal(b []byte) error
- type WireguardInterfaceDeleteReply
- func (*WireguardInterfaceDeleteReply) GetCrcString() string
- func (*WireguardInterfaceDeleteReply) GetMessageName() string
- func (*WireguardInterfaceDeleteReply) GetMessageType() api.MessageType
- func (m *WireguardInterfaceDeleteReply) Marshal(b []byte) ([]byte, error)
- func (m *WireguardInterfaceDeleteReply) Reset()
- func (m *WireguardInterfaceDeleteReply) Size() (size int)
- func (m *WireguardInterfaceDeleteReply) Unmarshal(b []byte) error
- type WireguardInterfaceDetails
- func (*WireguardInterfaceDetails) GetCrcString() string
- func (*WireguardInterfaceDetails) GetMessageName() string
- func (*WireguardInterfaceDetails) GetMessageType() api.MessageType
- func (m *WireguardInterfaceDetails) Marshal(b []byte) ([]byte, error)
- func (m *WireguardInterfaceDetails) Reset()
- func (m *WireguardInterfaceDetails) Size() (size int)
- func (m *WireguardInterfaceDetails) Unmarshal(b []byte) error
- type WireguardInterfaceDump
- func (*WireguardInterfaceDump) GetCrcString() string
- func (*WireguardInterfaceDump) GetMessageName() string
- func (*WireguardInterfaceDump) GetMessageType() api.MessageType
- func (m *WireguardInterfaceDump) Marshal(b []byte) ([]byte, error)
- func (m *WireguardInterfaceDump) Reset()
- func (m *WireguardInterfaceDump) Size() (size int)
- func (m *WireguardInterfaceDump) Unmarshal(b []byte) error
- type WireguardPeer
- type WireguardPeerAdd
- func (*WireguardPeerAdd) GetCrcString() string
- func (*WireguardPeerAdd) GetMessageName() string
- func (*WireguardPeerAdd) GetMessageType() api.MessageType
- func (m *WireguardPeerAdd) Marshal(b []byte) ([]byte, error)
- func (m *WireguardPeerAdd) Reset()
- func (m *WireguardPeerAdd) Size() (size int)
- func (m *WireguardPeerAdd) Unmarshal(b []byte) error
- type WireguardPeerAddReply
- func (*WireguardPeerAddReply) GetCrcString() string
- func (*WireguardPeerAddReply) GetMessageName() string
- func (*WireguardPeerAddReply) GetMessageType() api.MessageType
- func (m *WireguardPeerAddReply) Marshal(b []byte) ([]byte, error)
- func (m *WireguardPeerAddReply) Reset()
- func (m *WireguardPeerAddReply) Size() (size int)
- func (m *WireguardPeerAddReply) Unmarshal(b []byte) error
- type WireguardPeerFlags
- type WireguardPeerRemove
- func (*WireguardPeerRemove) GetCrcString() string
- func (*WireguardPeerRemove) GetMessageName() string
- func (*WireguardPeerRemove) GetMessageType() api.MessageType
- func (m *WireguardPeerRemove) Marshal(b []byte) ([]byte, error)
- func (m *WireguardPeerRemove) Reset()
- func (m *WireguardPeerRemove) Size() (size int)
- func (m *WireguardPeerRemove) Unmarshal(b []byte) error
- type WireguardPeerRemoveReply
- func (*WireguardPeerRemoveReply) GetCrcString() string
- func (*WireguardPeerRemoveReply) GetMessageName() string
- func (*WireguardPeerRemoveReply) GetMessageType() api.MessageType
- func (m *WireguardPeerRemoveReply) Marshal(b []byte) ([]byte, error)
- func (m *WireguardPeerRemoveReply) Reset()
- func (m *WireguardPeerRemoveReply) Size() (size int)
- func (m *WireguardPeerRemoveReply) Unmarshal(b []byte) error
- type WireguardPeersDetails
- func (*WireguardPeersDetails) GetCrcString() string
- func (*WireguardPeersDetails) GetMessageName() string
- func (*WireguardPeersDetails) GetMessageType() api.MessageType
- func (m *WireguardPeersDetails) Marshal(b []byte) ([]byte, error)
- func (m *WireguardPeersDetails) Reset()
- func (m *WireguardPeersDetails) Size() (size int)
- func (m *WireguardPeersDetails) Unmarshal(b []byte) error
- type WireguardPeersDump
- func (*WireguardPeersDump) GetCrcString() string
- func (*WireguardPeersDump) GetMessageName() string
- func (*WireguardPeersDump) GetMessageType() api.MessageType
- func (m *WireguardPeersDump) Marshal(b []byte) ([]byte, error)
- func (m *WireguardPeersDump) Reset()
- func (m *WireguardPeersDump) Size() (size int)
- func (m *WireguardPeersDump) Unmarshal(b []byte) error
Constants ¶
const ( APIFile = "wireguard" APIVersion = "0.1.0" VersionCrc = 0xcd532184 )
Variables ¶
var ( WireguardPeerFlags_name = map[uint8]string{ 1: "WIREGUARD_PEER_STATUS_DEAD", } WireguardPeerFlags_value = map[string]uint8{ "WIREGUARD_PEER_STATUS_DEAD": 1, } )
Functions ¶
func AllMessages ¶
Messages returns list of all messages in this module.
Types ¶
type RPCService ¶
type RPCService interface { WireguardInterfaceCreate(ctx context.Context, in *WireguardInterfaceCreate) (*WireguardInterfaceCreateReply, error) WireguardInterfaceDelete(ctx context.Context, in *WireguardInterfaceDelete) (*WireguardInterfaceDeleteReply, error) WireguardInterfaceDump(ctx context.Context, in *WireguardInterfaceDump) (RPCService_WireguardInterfaceDumpClient, error) WireguardPeerAdd(ctx context.Context, in *WireguardPeerAdd) (*WireguardPeerAddReply, error) WireguardPeerRemove(ctx context.Context, in *WireguardPeerRemove) (*WireguardPeerRemoveReply, error) WireguardPeersDump(ctx context.Context, in *WireguardPeersDump) (RPCService_WireguardPeersDumpClient, error) }
RPCService defines RPC service wireguard.
func NewServiceClient ¶
func NewServiceClient(conn api.Connection) RPCService
type RPCService_WireguardInterfaceDumpClient ¶
type RPCService_WireguardInterfaceDumpClient interface { Recv() (*WireguardInterfaceDetails, error) api.Stream }
type RPCService_WireguardPeersDumpClient ¶
type RPCService_WireguardPeersDumpClient interface { Recv() (*WireguardPeersDetails, error) api.Stream }
type WireguardInterface ¶
type WireguardInterface struct { UserInstance uint32 `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` PrivateKey []byte `binapi:"u8[32],name=private_key" json:"private_key,omitempty"` PublicKey []byte `binapi:"u8[32],name=public_key" json:"public_key,omitempty"` Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` SrcIP ip_types.Address `binapi:"address,name=src_ip" json:"src_ip,omitempty"` }
WireguardInterface defines type 'wireguard_interface'.
type WireguardInterfaceCreate ¶
type WireguardInterfaceCreate struct { Interface WireguardInterface `binapi:"wireguard_interface,name=interface" json:"interface,omitempty"` GenerateKey bool `binapi:"bool,name=generate_key" json:"generate_key,omitempty"` }
WireguardInterfaceCreate defines message 'wireguard_interface_create'. InProgress: the message form may change in the future versions
func (*WireguardInterfaceCreate) GetCrcString ¶
func (*WireguardInterfaceCreate) GetCrcString() string
func (*WireguardInterfaceCreate) GetMessageName ¶
func (*WireguardInterfaceCreate) GetMessageName() string
func (*WireguardInterfaceCreate) GetMessageType ¶
func (*WireguardInterfaceCreate) GetMessageType() api.MessageType
func (*WireguardInterfaceCreate) Marshal ¶
func (m *WireguardInterfaceCreate) Marshal(b []byte) ([]byte, error)
func (*WireguardInterfaceCreate) Reset ¶
func (m *WireguardInterfaceCreate) Reset()
func (*WireguardInterfaceCreate) Size ¶
func (m *WireguardInterfaceCreate) Size() (size int)
func (*WireguardInterfaceCreate) Unmarshal ¶
func (m *WireguardInterfaceCreate) Unmarshal(b []byte) error
type WireguardInterfaceCreateReply ¶
type WireguardInterfaceCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` }
WireguardInterfaceCreateReply defines message 'wireguard_interface_create_reply'. InProgress: the message form may change in the future versions
func (*WireguardInterfaceCreateReply) GetCrcString ¶
func (*WireguardInterfaceCreateReply) GetCrcString() string
func (*WireguardInterfaceCreateReply) GetMessageName ¶
func (*WireguardInterfaceCreateReply) GetMessageName() string
func (*WireguardInterfaceCreateReply) GetMessageType ¶
func (*WireguardInterfaceCreateReply) GetMessageType() api.MessageType
func (*WireguardInterfaceCreateReply) Marshal ¶
func (m *WireguardInterfaceCreateReply) Marshal(b []byte) ([]byte, error)
func (*WireguardInterfaceCreateReply) Reset ¶
func (m *WireguardInterfaceCreateReply) Reset()
func (*WireguardInterfaceCreateReply) Size ¶
func (m *WireguardInterfaceCreateReply) Size() (size int)
func (*WireguardInterfaceCreateReply) Unmarshal ¶
func (m *WireguardInterfaceCreateReply) Unmarshal(b []byte) error
type WireguardInterfaceDelete ¶
type WireguardInterfaceDelete struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
WireguardInterfaceDelete defines message 'wireguard_interface_delete'. InProgress: the message form may change in the future versions
func (*WireguardInterfaceDelete) GetCrcString ¶
func (*WireguardInterfaceDelete) GetCrcString() string
func (*WireguardInterfaceDelete) GetMessageName ¶
func (*WireguardInterfaceDelete) GetMessageName() string
func (*WireguardInterfaceDelete) GetMessageType ¶
func (*WireguardInterfaceDelete) GetMessageType() api.MessageType
func (*WireguardInterfaceDelete) Marshal ¶
func (m *WireguardInterfaceDelete) Marshal(b []byte) ([]byte, error)
func (*WireguardInterfaceDelete) Reset ¶
func (m *WireguardInterfaceDelete) Reset()
func (*WireguardInterfaceDelete) Size ¶
func (m *WireguardInterfaceDelete) Size() (size int)
func (*WireguardInterfaceDelete) Unmarshal ¶
func (m *WireguardInterfaceDelete) Unmarshal(b []byte) error
type WireguardInterfaceDeleteReply ¶
type WireguardInterfaceDeleteReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
WireguardInterfaceDeleteReply defines message 'wireguard_interface_delete_reply'. InProgress: the message form may change in the future versions
func (*WireguardInterfaceDeleteReply) GetCrcString ¶
func (*WireguardInterfaceDeleteReply) GetCrcString() string
func (*WireguardInterfaceDeleteReply) GetMessageName ¶
func (*WireguardInterfaceDeleteReply) GetMessageName() string
func (*WireguardInterfaceDeleteReply) GetMessageType ¶
func (*WireguardInterfaceDeleteReply) GetMessageType() api.MessageType
func (*WireguardInterfaceDeleteReply) Marshal ¶
func (m *WireguardInterfaceDeleteReply) Marshal(b []byte) ([]byte, error)
func (*WireguardInterfaceDeleteReply) Reset ¶
func (m *WireguardInterfaceDeleteReply) Reset()
func (*WireguardInterfaceDeleteReply) Size ¶
func (m *WireguardInterfaceDeleteReply) Size() (size int)
func (*WireguardInterfaceDeleteReply) Unmarshal ¶
func (m *WireguardInterfaceDeleteReply) Unmarshal(b []byte) error
type WireguardInterfaceDetails ¶
type WireguardInterfaceDetails struct {
Interface WireguardInterface `binapi:"wireguard_interface,name=interface" json:"interface,omitempty"`
}
WireguardInterfaceDetails defines message 'wireguard_interface_details'. InProgress: the message form may change in the future versions
func (*WireguardInterfaceDetails) GetCrcString ¶
func (*WireguardInterfaceDetails) GetCrcString() string
func (*WireguardInterfaceDetails) GetMessageName ¶
func (*WireguardInterfaceDetails) GetMessageName() string
func (*WireguardInterfaceDetails) GetMessageType ¶
func (*WireguardInterfaceDetails) GetMessageType() api.MessageType
func (*WireguardInterfaceDetails) Marshal ¶
func (m *WireguardInterfaceDetails) Marshal(b []byte) ([]byte, error)
func (*WireguardInterfaceDetails) Reset ¶
func (m *WireguardInterfaceDetails) Reset()
func (*WireguardInterfaceDetails) Size ¶
func (m *WireguardInterfaceDetails) Size() (size int)
func (*WireguardInterfaceDetails) Unmarshal ¶
func (m *WireguardInterfaceDetails) Unmarshal(b []byte) error
type WireguardInterfaceDump ¶
type WireguardInterfaceDump struct { ShowPrivateKey bool `binapi:"bool,name=show_private_key" json:"show_private_key,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` }
WireguardInterfaceDump defines message 'wireguard_interface_dump'. InProgress: the message form may change in the future versions
func (*WireguardInterfaceDump) GetCrcString ¶
func (*WireguardInterfaceDump) GetCrcString() string
func (*WireguardInterfaceDump) GetMessageName ¶
func (*WireguardInterfaceDump) GetMessageName() string
func (*WireguardInterfaceDump) GetMessageType ¶
func (*WireguardInterfaceDump) GetMessageType() api.MessageType
func (*WireguardInterfaceDump) Marshal ¶
func (m *WireguardInterfaceDump) Marshal(b []byte) ([]byte, error)
func (*WireguardInterfaceDump) Reset ¶
func (m *WireguardInterfaceDump) Reset()
func (*WireguardInterfaceDump) Size ¶
func (m *WireguardInterfaceDump) Size() (size int)
func (*WireguardInterfaceDump) Unmarshal ¶
func (m *WireguardInterfaceDump) Unmarshal(b []byte) error
type WireguardPeer ¶
type WireguardPeer struct { PublicKey []byte `binapi:"u8[32],name=public_key" json:"public_key,omitempty"` Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` PersistentKeepalive uint16 `binapi:"u16,name=persistent_keepalive" json:"persistent_keepalive,omitempty"` TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` Endpoint ip_types.Address `binapi:"address,name=endpoint" json:"endpoint,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Flags WireguardPeerFlags `binapi:"wireguard_peer_flags,name=flags" json:"flags,omitempty"` NAllowedIps uint8 `binapi:"u8,name=n_allowed_ips" json:"-"` AllowedIps []ip_types.Prefix `binapi:"prefix[n_allowed_ips],name=allowed_ips" json:"allowed_ips,omitempty"` }
WireguardPeer defines type 'wireguard_peer'.
type WireguardPeerAdd ¶
type WireguardPeerAdd struct {
Peer WireguardPeer `binapi:"wireguard_peer,name=peer" json:"peer,omitempty"`
}
WireguardPeerAdd defines message 'wireguard_peer_add'. InProgress: the message form may change in the future versions
func (*WireguardPeerAdd) GetCrcString ¶
func (*WireguardPeerAdd) GetCrcString() string
func (*WireguardPeerAdd) GetMessageName ¶
func (*WireguardPeerAdd) GetMessageName() string
func (*WireguardPeerAdd) GetMessageType ¶
func (*WireguardPeerAdd) GetMessageType() api.MessageType
func (*WireguardPeerAdd) Reset ¶
func (m *WireguardPeerAdd) Reset()
func (*WireguardPeerAdd) Size ¶
func (m *WireguardPeerAdd) Size() (size int)
func (*WireguardPeerAdd) Unmarshal ¶
func (m *WireguardPeerAdd) Unmarshal(b []byte) error
type WireguardPeerAddReply ¶
type WireguardPeerAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` PeerIndex uint32 `binapi:"u32,name=peer_index" json:"peer_index,omitempty"` }
WireguardPeerAddReply defines message 'wireguard_peer_add_reply'. InProgress: the message form may change in the future versions
func (*WireguardPeerAddReply) GetCrcString ¶
func (*WireguardPeerAddReply) GetCrcString() string
func (*WireguardPeerAddReply) GetMessageName ¶
func (*WireguardPeerAddReply) GetMessageName() string
func (*WireguardPeerAddReply) GetMessageType ¶
func (*WireguardPeerAddReply) GetMessageType() api.MessageType
func (*WireguardPeerAddReply) Marshal ¶
func (m *WireguardPeerAddReply) Marshal(b []byte) ([]byte, error)
func (*WireguardPeerAddReply) Reset ¶
func (m *WireguardPeerAddReply) Reset()
func (*WireguardPeerAddReply) Size ¶
func (m *WireguardPeerAddReply) Size() (size int)
func (*WireguardPeerAddReply) Unmarshal ¶
func (m *WireguardPeerAddReply) Unmarshal(b []byte) error
type WireguardPeerFlags ¶
type WireguardPeerFlags uint8
WireguardPeerFlags defines enum 'wireguard_peer_flags'.
const (
WIREGUARD_PEER_STATUS_DEAD WireguardPeerFlags = 1
)
func (WireguardPeerFlags) String ¶
func (x WireguardPeerFlags) String() string
type WireguardPeerRemove ¶
type WireguardPeerRemove struct {
PeerIndex uint32 `binapi:"u32,name=peer_index" json:"peer_index,omitempty"`
}
WireguardPeerRemove defines message 'wireguard_peer_remove'. InProgress: the message form may change in the future versions
func (*WireguardPeerRemove) GetCrcString ¶
func (*WireguardPeerRemove) GetCrcString() string
func (*WireguardPeerRemove) GetMessageName ¶
func (*WireguardPeerRemove) GetMessageName() string
func (*WireguardPeerRemove) GetMessageType ¶
func (*WireguardPeerRemove) GetMessageType() api.MessageType
func (*WireguardPeerRemove) Marshal ¶
func (m *WireguardPeerRemove) Marshal(b []byte) ([]byte, error)
func (*WireguardPeerRemove) Reset ¶
func (m *WireguardPeerRemove) Reset()
func (*WireguardPeerRemove) Size ¶
func (m *WireguardPeerRemove) Size() (size int)
func (*WireguardPeerRemove) Unmarshal ¶
func (m *WireguardPeerRemove) Unmarshal(b []byte) error
type WireguardPeerRemoveReply ¶
type WireguardPeerRemoveReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
WireguardPeerRemoveReply defines message 'wireguard_peer_remove_reply'. InProgress: the message form may change in the future versions
func (*WireguardPeerRemoveReply) GetCrcString ¶
func (*WireguardPeerRemoveReply) GetCrcString() string
func (*WireguardPeerRemoveReply) GetMessageName ¶
func (*WireguardPeerRemoveReply) GetMessageName() string
func (*WireguardPeerRemoveReply) GetMessageType ¶
func (*WireguardPeerRemoveReply) GetMessageType() api.MessageType
func (*WireguardPeerRemoveReply) Marshal ¶
func (m *WireguardPeerRemoveReply) Marshal(b []byte) ([]byte, error)
func (*WireguardPeerRemoveReply) Reset ¶
func (m *WireguardPeerRemoveReply) Reset()
func (*WireguardPeerRemoveReply) Size ¶
func (m *WireguardPeerRemoveReply) Size() (size int)
func (*WireguardPeerRemoveReply) Unmarshal ¶
func (m *WireguardPeerRemoveReply) Unmarshal(b []byte) error
type WireguardPeersDetails ¶
type WireguardPeersDetails struct {
Peer WireguardPeer `binapi:"wireguard_peer,name=peer" json:"peer,omitempty"`
}
WireguardPeersDetails defines message 'wireguard_peers_details'. InProgress: the message form may change in the future versions
func (*WireguardPeersDetails) GetCrcString ¶
func (*WireguardPeersDetails) GetCrcString() string
func (*WireguardPeersDetails) GetMessageName ¶
func (*WireguardPeersDetails) GetMessageName() string
func (*WireguardPeersDetails) GetMessageType ¶
func (*WireguardPeersDetails) GetMessageType() api.MessageType
func (*WireguardPeersDetails) Marshal ¶
func (m *WireguardPeersDetails) Marshal(b []byte) ([]byte, error)
func (*WireguardPeersDetails) Reset ¶
func (m *WireguardPeersDetails) Reset()
func (*WireguardPeersDetails) Size ¶
func (m *WireguardPeersDetails) Size() (size int)
func (*WireguardPeersDetails) Unmarshal ¶
func (m *WireguardPeersDetails) Unmarshal(b []byte) error
type WireguardPeersDump ¶
type WireguardPeersDump struct{}
WireguardPeersDump defines message 'wireguard_peers_dump'. InProgress: the message form may change in the future versions
func (*WireguardPeersDump) GetCrcString ¶
func (*WireguardPeersDump) GetCrcString() string
func (*WireguardPeersDump) GetMessageName ¶
func (*WireguardPeersDump) GetMessageName() string
func (*WireguardPeersDump) GetMessageType ¶
func (*WireguardPeersDump) GetMessageType() api.MessageType
func (*WireguardPeersDump) Reset ¶
func (m *WireguardPeersDump) Reset()
func (*WireguardPeersDump) Size ¶
func (m *WireguardPeersDump) Size() (size int)
func (*WireguardPeersDump) Unmarshal ¶
func (m *WireguardPeersDump) Unmarshal(b []byte) error