proto

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Wireguard_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Wireguard",
	HandlerType: (*WireguardServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InitializeI",
			Handler:    _Wireguard_InitializeI_Handler,
		},
		{
			MethodName: "AddPeer",
			Handler:    _Wireguard_AddPeer_Handler,
		},
		{
			MethodName: "DelPeer",
			Handler:    _Wireguard_DelPeer_Handler,
		},
		{
			MethodName: "ListPeers",
			Handler:    _Wireguard_ListPeers_Handler,
		},
		{
			MethodName: "ManageNIC",
			Handler:    _Wireguard_ManageNIC_Handler,
		},
		{
			MethodName: "GetPeerStatus",
			Handler:    _Wireguard_GetPeerStatus_Handler,
		},
		{
			MethodName: "GetNICInfo",
			Handler:    _Wireguard_GetNICInfo_Handler,
		},
		{
			MethodName: "GenPublicKey",
			Handler:    _Wireguard_GenPublicKey_Handler,
		},
		{
			MethodName: "GenPrivateKey",
			Handler:    _Wireguard_GenPrivateKey_Handler,
		},
		{
			MethodName: "GetPrivateKey",
			Handler:    _Wireguard_GetPrivateKey_Handler,
		},
		{
			MethodName: "GetPublicKey",
			Handler:    _Wireguard_GetPublicKey_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wg.proto",
}

Wireguard_ServiceDesc is the grpc.ServiceDesc for Wireguard service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWireguardServer

func RegisterWireguardServer(s grpc.ServiceRegistrar, srv WireguardServer)

Types

type AddPReq

type AddPReq struct {
	Nic        string `protobuf:"bytes,1,opt,name=nic,proto3" json:"nic,omitempty"`
	AllowedIPs string `protobuf:"bytes,2,opt,name=allowedIPs,proto3" json:"allowedIPs,omitempty"`
	PublicKey  string `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPReq) Descriptor deprecated

func (*AddPReq) Descriptor() ([]byte, []int)

Deprecated: Use AddPReq.ProtoReflect.Descriptor instead.

func (*AddPReq) GetAllowedIPs

func (x *AddPReq) GetAllowedIPs() string

func (*AddPReq) GetNic

func (x *AddPReq) GetNic() string

func (*AddPReq) GetPublicKey

func (x *AddPReq) GetPublicKey() string

func (*AddPReq) ProtoMessage

func (*AddPReq) ProtoMessage()

func (*AddPReq) ProtoReflect added in v1.0.5

func (x *AddPReq) ProtoReflect() protoreflect.Message

func (*AddPReq) Reset

func (x *AddPReq) Reset()

func (*AddPReq) String

func (x *AddPReq) String() string

type AddPResp

type AddPResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPResp) Descriptor deprecated

func (*AddPResp) Descriptor() ([]byte, []int)

Deprecated: Use AddPResp.ProtoReflect.Descriptor instead.

func (*AddPResp) GetMessage

func (x *AddPResp) GetMessage() string

func (*AddPResp) ProtoMessage

func (*AddPResp) ProtoMessage()

func (*AddPResp) ProtoReflect added in v1.0.5

func (x *AddPResp) ProtoReflect() protoreflect.Message

func (*AddPResp) Reset

func (x *AddPResp) Reset()

func (*AddPResp) String

func (x *AddPResp) String() string

type DelPReq

type DelPReq struct {
	PeerPublicKey string `protobuf:"bytes,1,opt,name=peerPublicKey,proto3" json:"peerPublicKey,omitempty"`
	IpAddress     string `protobuf:"bytes,2,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*DelPReq) Descriptor deprecated

func (*DelPReq) Descriptor() ([]byte, []int)

Deprecated: Use DelPReq.ProtoReflect.Descriptor instead.

func (*DelPReq) GetIpAddress

func (x *DelPReq) GetIpAddress() string

func (*DelPReq) GetPeerPublicKey

func (x *DelPReq) GetPeerPublicKey() string

func (*DelPReq) ProtoMessage

func (*DelPReq) ProtoMessage()

func (*DelPReq) ProtoReflect added in v1.0.5

func (x *DelPReq) ProtoReflect() protoreflect.Message

func (*DelPReq) Reset

func (x *DelPReq) Reset()

func (*DelPReq) String

func (x *DelPReq) String() string

type DelPResp

type DelPResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*DelPResp) Descriptor deprecated

func (*DelPResp) Descriptor() ([]byte, []int)

Deprecated: Use DelPResp.ProtoReflect.Descriptor instead.

func (*DelPResp) GetMessage

func (x *DelPResp) GetMessage() string

func (*DelPResp) ProtoMessage

func (*DelPResp) ProtoMessage()

func (*DelPResp) ProtoReflect added in v1.0.5

func (x *DelPResp) ProtoReflect() protoreflect.Message

func (*DelPResp) Reset

func (x *DelPResp) Reset()

func (*DelPResp) String

func (x *DelPResp) String() string

type IReq

type IReq struct {
	Address            string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	ListenPort         uint32 `protobuf:"varint,2,opt,name=listenPort,proto3" json:"listenPort,omitempty"`
	SaveConfig         bool   `protobuf:"varint,3,opt,name=saveConfig,proto3" json:"saveConfig,omitempty"`
	PrivateKey         string `protobuf:"bytes,4,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	Eth                string `protobuf:"bytes,5,opt,name=eth,proto3" json:"eth,omitempty"`
	IName              string `protobuf:"bytes,6,opt,name=iName,proto3" json:"iName,omitempty"`
	DownInterfacesFile string `protobuf:"bytes,7,opt,name=downInterfacesFile,proto3" json:"downInterfacesFile,omitempty"`
	// contains filtered or unexported fields
}

func (*IReq) Descriptor deprecated

func (*IReq) Descriptor() ([]byte, []int)

Deprecated: Use IReq.ProtoReflect.Descriptor instead.

func (*IReq) GetAddress

func (x *IReq) GetAddress() string

func (*IReq) GetDownInterfacesFile added in v1.0.5

func (x *IReq) GetDownInterfacesFile() string

func (*IReq) GetEth

func (x *IReq) GetEth() string

func (*IReq) GetIName

func (x *IReq) GetIName() string

func (*IReq) GetListenPort

func (x *IReq) GetListenPort() uint32

func (*IReq) GetPrivateKey

func (x *IReq) GetPrivateKey() string

func (*IReq) GetSaveConfig

func (x *IReq) GetSaveConfig() bool

func (*IReq) ProtoMessage

func (*IReq) ProtoMessage()

func (*IReq) ProtoReflect added in v1.0.5

func (x *IReq) ProtoReflect() protoreflect.Message

func (*IReq) Reset

func (x *IReq) Reset()

func (*IReq) String

func (x *IReq) String() string

type IResp

type IResp struct {

	// message could be error or ordinary result depend on function result.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*IResp) Descriptor deprecated

func (*IResp) Descriptor() ([]byte, []int)

Deprecated: Use IResp.ProtoReflect.Descriptor instead.

func (*IResp) GetMessage

func (x *IResp) GetMessage() string

func (*IResp) ProtoMessage

func (*IResp) ProtoMessage()

func (*IResp) ProtoReflect added in v1.0.5

func (x *IResp) ProtoReflect() protoreflect.Message

func (*IResp) Reset

func (x *IResp) Reset()

func (*IResp) String

func (x *IResp) String() string

type ListPeersReq

type ListPeersReq struct {
	Nicname string `protobuf:"bytes,1,opt,name=nicname,proto3" json:"nicname,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPeersReq) Descriptor deprecated

func (*ListPeersReq) Descriptor() ([]byte, []int)

Deprecated: Use ListPeersReq.ProtoReflect.Descriptor instead.

func (*ListPeersReq) GetError

func (x *ListPeersReq) GetError() string

func (*ListPeersReq) GetNicname

func (x *ListPeersReq) GetNicname() string

func (*ListPeersReq) ProtoMessage

func (*ListPeersReq) ProtoMessage()

func (*ListPeersReq) ProtoReflect added in v1.0.5

func (x *ListPeersReq) ProtoReflect() protoreflect.Message

func (*ListPeersReq) Reset

func (x *ListPeersReq) Reset()

func (*ListPeersReq) String

func (x *ListPeersReq) String() string

type ListPeersResp

type ListPeersResp struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPeersResp) Descriptor deprecated

func (*ListPeersResp) Descriptor() ([]byte, []int)

Deprecated: Use ListPeersResp.ProtoReflect.Descriptor instead.

func (*ListPeersResp) GetResponse

func (x *ListPeersResp) GetResponse() string

func (*ListPeersResp) ProtoMessage

func (*ListPeersResp) ProtoMessage()

func (*ListPeersResp) ProtoReflect added in v1.0.5

func (x *ListPeersResp) ProtoReflect() protoreflect.Message

func (*ListPeersResp) Reset

func (x *ListPeersResp) Reset()

func (*ListPeersResp) String

func (x *ListPeersResp) String() string

type ManageNICReq

type ManageNICReq struct {

	//    manage NIC is responsible to up and down given interface
	Nic string `protobuf:"bytes,1,opt,name=nic,proto3" json:"nic,omitempty"`
	Cmd string `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` // up or down
	// contains filtered or unexported fields
}

func (*ManageNICReq) Descriptor deprecated

func (*ManageNICReq) Descriptor() ([]byte, []int)

Deprecated: Use ManageNICReq.ProtoReflect.Descriptor instead.

func (*ManageNICReq) GetCmd

func (x *ManageNICReq) GetCmd() string

func (*ManageNICReq) GetNic

func (x *ManageNICReq) GetNic() string

func (*ManageNICReq) ProtoMessage

func (*ManageNICReq) ProtoMessage()

func (*ManageNICReq) ProtoReflect added in v1.0.5

func (x *ManageNICReq) ProtoReflect() protoreflect.Message

func (*ManageNICReq) Reset

func (x *ManageNICReq) Reset()

func (*ManageNICReq) String

func (x *ManageNICReq) String() string

type ManageNICResp

type ManageNICResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ManageNICResp) Descriptor deprecated

func (*ManageNICResp) Descriptor() ([]byte, []int)

Deprecated: Use ManageNICResp.ProtoReflect.Descriptor instead.

func (*ManageNICResp) GetMessage

func (x *ManageNICResp) GetMessage() string

func (*ManageNICResp) ProtoMessage

func (*ManageNICResp) ProtoMessage()

func (*ManageNICResp) ProtoReflect added in v1.0.5

func (x *ManageNICResp) ProtoReflect() protoreflect.Message

func (*ManageNICResp) Reset

func (x *ManageNICResp) Reset()

func (*ManageNICResp) String

func (x *ManageNICResp) String() string

type NICInfoReq

type NICInfoReq struct {
	Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
	// contains filtered or unexported fields
}

func (*NICInfoReq) Descriptor deprecated

func (*NICInfoReq) Descriptor() ([]byte, []int)

Deprecated: Use NICInfoReq.ProtoReflect.Descriptor instead.

func (*NICInfoReq) GetInterface

func (x *NICInfoReq) GetInterface() string

func (*NICInfoReq) ProtoMessage

func (*NICInfoReq) ProtoMessage()

func (*NICInfoReq) ProtoReflect added in v1.0.5

func (x *NICInfoReq) ProtoReflect() protoreflect.Message

func (*NICInfoReq) Reset

func (x *NICInfoReq) Reset()

func (*NICInfoReq) String

func (x *NICInfoReq) String() string

type NICInfoResp

type NICInfoResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*NICInfoResp) Descriptor deprecated

func (*NICInfoResp) Descriptor() ([]byte, []int)

Deprecated: Use NICInfoResp.ProtoReflect.Descriptor instead.

func (*NICInfoResp) GetMessage

func (x *NICInfoResp) GetMessage() string

func (*NICInfoResp) ProtoMessage

func (*NICInfoResp) ProtoMessage()

func (*NICInfoResp) ProtoReflect added in v1.0.5

func (x *NICInfoResp) ProtoReflect() protoreflect.Message

func (*NICInfoResp) Reset

func (x *NICInfoResp) Reset()

func (*NICInfoResp) String

func (x *NICInfoResp) String() string

type PeerStatusReq

type PeerStatusReq struct {
	NicName   string `protobuf:"bytes,1,opt,name=nicName,proto3" json:"nicName,omitempty"`
	PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerStatusReq) Descriptor deprecated

func (*PeerStatusReq) Descriptor() ([]byte, []int)

Deprecated: Use PeerStatusReq.ProtoReflect.Descriptor instead.

func (*PeerStatusReq) GetNicName

func (x *PeerStatusReq) GetNicName() string

func (*PeerStatusReq) GetPublicKey

func (x *PeerStatusReq) GetPublicKey() string

func (*PeerStatusReq) ProtoMessage

func (*PeerStatusReq) ProtoMessage()

func (*PeerStatusReq) ProtoReflect added in v1.0.5

func (x *PeerStatusReq) ProtoReflect() protoreflect.Message

func (*PeerStatusReq) Reset

func (x *PeerStatusReq) Reset()

func (*PeerStatusReq) String

func (x *PeerStatusReq) String() string

type PeerStatusResp

type PeerStatusResp struct {

	// connected or not connected
	Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerStatusResp) Descriptor deprecated

func (*PeerStatusResp) Descriptor() ([]byte, []int)

Deprecated: Use PeerStatusResp.ProtoReflect.Descriptor instead.

func (*PeerStatusResp) GetStatus

func (x *PeerStatusResp) GetStatus() bool

func (*PeerStatusResp) ProtoMessage

func (*PeerStatusResp) ProtoMessage()

func (*PeerStatusResp) ProtoReflect added in v1.0.5

func (x *PeerStatusResp) ProtoReflect() protoreflect.Message

func (*PeerStatusResp) Reset

func (x *PeerStatusResp) Reset()

func (*PeerStatusResp) String

func (x *PeerStatusResp) String() string

type PrivKeyReq

type PrivKeyReq struct {
	PrivateKeyName string `protobuf:"bytes,1,opt,name=privateKeyName,proto3" json:"privateKeyName,omitempty"`
	// contains filtered or unexported fields
}

func (*PrivKeyReq) Descriptor deprecated

func (*PrivKeyReq) Descriptor() ([]byte, []int)

Deprecated: Use PrivKeyReq.ProtoReflect.Descriptor instead.

func (*PrivKeyReq) GetPrivateKeyName

func (x *PrivKeyReq) GetPrivateKeyName() string

func (*PrivKeyReq) ProtoMessage

func (*PrivKeyReq) ProtoMessage()

func (*PrivKeyReq) ProtoReflect added in v1.0.5

func (x *PrivKeyReq) ProtoReflect() protoreflect.Message

func (*PrivKeyReq) Reset

func (x *PrivKeyReq) Reset()

func (*PrivKeyReq) String

func (x *PrivKeyReq) String() string

type PrivKeyResp

type PrivKeyResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PrivKeyResp) Descriptor deprecated

func (*PrivKeyResp) Descriptor() ([]byte, []int)

Deprecated: Use PrivKeyResp.ProtoReflect.Descriptor instead.

func (*PrivKeyResp) GetMessage

func (x *PrivKeyResp) GetMessage() string

func (*PrivKeyResp) ProtoMessage

func (*PrivKeyResp) ProtoMessage()

func (*PrivKeyResp) ProtoReflect added in v1.0.5

func (x *PrivKeyResp) ProtoReflect() protoreflect.Message

func (*PrivKeyResp) Reset

func (x *PrivKeyResp) Reset()

func (*PrivKeyResp) String

func (x *PrivKeyResp) String() string

type PubKeyReq

type PubKeyReq struct {
	PubKeyName  string `protobuf:"bytes,1,opt,name=pubKeyName,proto3" json:"pubKeyName,omitempty"` // name of wireguard interface
	PrivKeyName string `protobuf:"bytes,2,opt,name=privKeyName,proto3" json:"privKeyName,omitempty"`
	// contains filtered or unexported fields
}

func (*PubKeyReq) Descriptor deprecated

func (*PubKeyReq) Descriptor() ([]byte, []int)

Deprecated: Use PubKeyReq.ProtoReflect.Descriptor instead.

func (*PubKeyReq) GetPrivKeyName

func (x *PubKeyReq) GetPrivKeyName() string

func (*PubKeyReq) GetPubKeyName

func (x *PubKeyReq) GetPubKeyName() string

func (*PubKeyReq) ProtoMessage

func (*PubKeyReq) ProtoMessage()

func (*PubKeyReq) ProtoReflect added in v1.0.5

func (x *PubKeyReq) ProtoReflect() protoreflect.Message

func (*PubKeyReq) Reset

func (x *PubKeyReq) Reset()

func (*PubKeyReq) String

func (x *PubKeyReq) String() string

type PubKeyResp

type PubKeyResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PubKeyResp) Descriptor deprecated

func (*PubKeyResp) Descriptor() ([]byte, []int)

Deprecated: Use PubKeyResp.ProtoReflect.Descriptor instead.

func (*PubKeyResp) GetMessage

func (x *PubKeyResp) GetMessage() string

func (*PubKeyResp) ProtoMessage

func (*PubKeyResp) ProtoMessage()

func (*PubKeyResp) ProtoReflect added in v1.0.5

func (x *PubKeyResp) ProtoReflect() protoreflect.Message

func (*PubKeyResp) Reset

func (x *PubKeyResp) Reset()

func (*PubKeyResp) String

func (x *PubKeyResp) String() string

type UnimplementedWireguardServer

type UnimplementedWireguardServer struct {
}

UnimplementedWireguardServer must be embedded to have forward compatible implementations.

func (UnimplementedWireguardServer) AddPeer

func (UnimplementedWireguardServer) DelPeer

func (UnimplementedWireguardServer) GenPrivateKey

func (UnimplementedWireguardServer) GenPublicKey

func (UnimplementedWireguardServer) GetNICInfo

func (UnimplementedWireguardServer) GetPeerStatus

func (UnimplementedWireguardServer) GetPrivateKey

func (UnimplementedWireguardServer) GetPublicKey

func (UnimplementedWireguardServer) InitializeI

func (UnimplementedWireguardServer) ListPeers

func (UnimplementedWireguardServer) ManageNIC

type UnsafeWireguardServer added in v1.0.5

type UnsafeWireguardServer interface {
	// contains filtered or unexported methods
}

UnsafeWireguardServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WireguardServer will result in compilation errors.

type WireguardClient

type WireguardClient interface {
	InitializeI(ctx context.Context, in *IReq, opts ...grpc.CallOption) (*IResp, error)
	AddPeer(ctx context.Context, in *AddPReq, opts ...grpc.CallOption) (*AddPResp, error)
	DelPeer(ctx context.Context, in *DelPReq, opts ...grpc.CallOption) (*DelPResp, error)
	ListPeers(ctx context.Context, in *ListPeersReq, opts ...grpc.CallOption) (*ListPeersResp, error)
	ManageNIC(ctx context.Context, in *ManageNICReq, opts ...grpc.CallOption) (*ManageNICResp, error)
	GetPeerStatus(ctx context.Context, in *PeerStatusReq, opts ...grpc.CallOption) (*PeerStatusResp, error)
	GetNICInfo(ctx context.Context, in *NICInfoReq, opts ...grpc.CallOption) (*NICInfoResp, error)
	GenPublicKey(ctx context.Context, in *PubKeyReq, opts ...grpc.CallOption) (*PubKeyResp, error)
	GenPrivateKey(ctx context.Context, in *PrivKeyReq, opts ...grpc.CallOption) (*PrivKeyResp, error)
	GetPrivateKey(ctx context.Context, in *PrivKeyReq, opts ...grpc.CallOption) (*PrivKeyResp, error)
	GetPublicKey(ctx context.Context, in *PubKeyReq, opts ...grpc.CallOption) (*PubKeyResp, error)
}

WireguardClient is the client API for Wireguard service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewWireguardClient

func NewWireguardClient(cc grpc.ClientConnInterface) WireguardClient

type WireguardServer

type WireguardServer interface {
	InitializeI(context.Context, *IReq) (*IResp, error)
	AddPeer(context.Context, *AddPReq) (*AddPResp, error)
	DelPeer(context.Context, *DelPReq) (*DelPResp, error)
	ListPeers(context.Context, *ListPeersReq) (*ListPeersResp, error)
	ManageNIC(context.Context, *ManageNICReq) (*ManageNICResp, error)
	GetPeerStatus(context.Context, *PeerStatusReq) (*PeerStatusResp, error)
	GetNICInfo(context.Context, *NICInfoReq) (*NICInfoResp, error)
	GenPublicKey(context.Context, *PubKeyReq) (*PubKeyResp, error)
	GenPrivateKey(context.Context, *PrivKeyReq) (*PrivKeyResp, error)
	GetPrivateKey(context.Context, *PrivKeyReq) (*PrivKeyResp, error)
	GetPublicKey(context.Context, *PubKeyReq) (*PubKeyResp, error)
	// contains filtered or unexported methods
}

WireguardServer is the server API for Wireguard service. All implementations must embed UnimplementedWireguardServer for forward compatibility

Jump to

Keyboard shortcuts

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