cliapi

package
v0.0.0-...-a7f6a6d Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Control_Connect_FullMethodName    = "/cliapi.Control/Connect"
	Control_Disconnect_FullMethodName = "/cliapi.Control/Disconnect"
	Control_GetStatus_FullMethodName  = "/cliapi.Control/GetStatus"
)
View Source
const (
	Peer_GetPeers_FullMethodName   = "/cliapi.Peer/GetPeers"
	Peer_SetPeer_FullMethodName    = "/cliapi.Peer/SetPeer"
	Peer_RemovePeer_FullMethodName = "/cliapi.Peer/RemovePeer"
)
View Source
const (
	Tunnel_Create_FullMethodName = "/cliapi.Tunnel/Create"
	Tunnel_List_FullMethodName   = "/cliapi.Tunnel/List"
	Tunnel_Delete_FullMethodName = "/cliapi.Tunnel/Delete"
)

Variables

View Source
var Control_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cliapi.Control",
	HandlerType: (*ControlServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Connect",
			Handler:    _Control_Connect_Handler,
		},
		{
			MethodName: "Disconnect",
			Handler:    _Control_Disconnect_Handler,
		},
		{
			MethodName: "GetStatus",
			Handler:    _Control_GetStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "control.proto",
}

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

View Source
var File_control_proto protoreflect.FileDescriptor
View Source
var File_tunnel_proto protoreflect.FileDescriptor
View Source
var Peer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cliapi.Peer",
	HandlerType: (*PeerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPeers",
			Handler:    _Peer_GetPeers_Handler,
		},
		{
			MethodName: "SetPeer",
			Handler:    _Peer_SetPeer_Handler,
		},
		{
			MethodName: "RemovePeer",
			Handler:    _Peer_RemovePeer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "peer.proto",
}

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

View Source
var Tunnel_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cliapi.Tunnel",
	HandlerType: (*TunnelServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Tunnel_Create_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Tunnel_List_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Tunnel_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tunnel.proto",
}

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

Functions

func RegisterControlServer

func RegisterControlServer(s grpc.ServiceRegistrar, srv ControlServer)

func RegisterPeerServer

func RegisterPeerServer(s grpc.ServiceRegistrar, srv PeerServer)

func RegisterTunnelServer

func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)

Types

type ConnectRequest

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

func (*ConnectRequest) Descriptor deprecated

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

Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.

func (*ConnectRequest) GetAddress

func (x *ConnectRequest) GetAddress() string

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) ProtoReflect

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

func (*ConnectRequest) Reset

func (x *ConnectRequest) Reset()

func (*ConnectRequest) String

func (x *ConnectRequest) String() string

func (*ConnectRequest) Validate

func (m *ConnectRequest) Validate() error

Validate checks the field values on ConnectRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConnectRequest) ValidateAll

func (m *ConnectRequest) ValidateAll() error

ValidateAll checks the field values on ConnectRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConnectRequestMultiError, or nil if none found.

type ConnectRequestMultiError

type ConnectRequestMultiError []error

ConnectRequestMultiError is an error wrapping multiple validation errors returned by ConnectRequest.ValidateAll() if the designated constraints aren't met.

func (ConnectRequestMultiError) AllErrors

func (m ConnectRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConnectRequestMultiError) Error

func (m ConnectRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConnectRequestValidationError

type ConnectRequestValidationError struct {
	// contains filtered or unexported fields
}

ConnectRequestValidationError is the validation error returned by ConnectRequest.Validate if the designated constraints aren't met.

func (ConnectRequestValidationError) Cause

Cause function returns cause value.

func (ConnectRequestValidationError) Error

Error satisfies the builtin error interface

func (ConnectRequestValidationError) ErrorName

func (e ConnectRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ConnectRequestValidationError) Field

Field function returns field value.

func (ConnectRequestValidationError) Key

Key function returns key value.

func (ConnectRequestValidationError) Reason

Reason function returns reason value.

type ControlClient

type ControlClient interface {
	Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Disconnect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RelayStatusResponse, error)
}

ControlClient is the client API for Control 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 NewControlClient

func NewControlClient(cc grpc.ClientConnInterface) ControlClient

type ControlServer

type ControlServer interface {
	Connect(context.Context, *ConnectRequest) (*emptypb.Empty, error)
	Disconnect(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	GetStatus(context.Context, *emptypb.Empty) (*RelayStatusResponse, error)
	// contains filtered or unexported methods
}

ControlServer is the server API for Control service. All implementations must embed UnimplementedControlServer for forward compatibility

type CreateTunnelRequest

type CreateTunnelRequest struct {
	PeerId     string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	LocalPort  uint32 `protobuf:"varint,2,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
	RemoteHost string `protobuf:"bytes,3,opt,name=remote_host,json=remoteHost,proto3" json:"remote_host,omitempty"`
	RemotePort uint32 `protobuf:"varint,4,opt,name=remote_port,json=remotePort,proto3" json:"remote_port,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTunnelRequest) Descriptor deprecated

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

Deprecated: Use CreateTunnelRequest.ProtoReflect.Descriptor instead.

func (*CreateTunnelRequest) GetLocalPort

func (x *CreateTunnelRequest) GetLocalPort() uint32

func (*CreateTunnelRequest) GetPeerId

func (x *CreateTunnelRequest) GetPeerId() string

func (*CreateTunnelRequest) GetRemoteHost

func (x *CreateTunnelRequest) GetRemoteHost() string

func (*CreateTunnelRequest) GetRemotePort

func (x *CreateTunnelRequest) GetRemotePort() uint32

func (*CreateTunnelRequest) ProtoMessage

func (*CreateTunnelRequest) ProtoMessage()

func (*CreateTunnelRequest) ProtoReflect

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

func (*CreateTunnelRequest) Reset

func (x *CreateTunnelRequest) Reset()

func (*CreateTunnelRequest) String

func (x *CreateTunnelRequest) String() string

func (*CreateTunnelRequest) Validate

func (m *CreateTunnelRequest) Validate() error

Validate checks the field values on CreateTunnelRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CreateTunnelRequest) ValidateAll

func (m *CreateTunnelRequest) ValidateAll() error

ValidateAll checks the field values on CreateTunnelRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateTunnelRequestMultiError, or nil if none found.

type CreateTunnelRequestMultiError

type CreateTunnelRequestMultiError []error

CreateTunnelRequestMultiError is an error wrapping multiple validation errors returned by CreateTunnelRequest.ValidateAll() if the designated constraints aren't met.

func (CreateTunnelRequestMultiError) AllErrors

func (m CreateTunnelRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateTunnelRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CreateTunnelRequestValidationError

type CreateTunnelRequestValidationError struct {
	// contains filtered or unexported fields
}

CreateTunnelRequestValidationError is the validation error returned by CreateTunnelRequest.Validate if the designated constraints aren't met.

func (CreateTunnelRequestValidationError) Cause

Cause function returns cause value.

func (CreateTunnelRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateTunnelRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateTunnelRequestValidationError) Field

Field function returns field value.

func (CreateTunnelRequestValidationError) Key

Key function returns key value.

func (CreateTunnelRequestValidationError) Reason

Reason function returns reason value.

type DeleteRequest

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

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

func (*DeleteRequest) Validate

func (m *DeleteRequest) Validate() error

Validate checks the field values on DeleteRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeleteRequest) ValidateAll

func (m *DeleteRequest) ValidateAll() error

ValidateAll checks the field values on DeleteRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteRequestMultiError, or nil if none found.

type DeleteRequestMultiError

type DeleteRequestMultiError []error

DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.

func (DeleteRequestMultiError) AllErrors

func (m DeleteRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteRequestMultiError) Error

func (m DeleteRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DeleteRequestValidationError

type DeleteRequestValidationError struct {
	// contains filtered or unexported fields
}

DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.

func (DeleteRequestValidationError) Cause

Cause function returns cause value.

func (DeleteRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteRequestValidationError) ErrorName

func (e DeleteRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteRequestValidationError) Field

Field function returns field value.

func (DeleteRequestValidationError) Key

Key function returns key value.

func (DeleteRequestValidationError) Reason

Reason function returns reason value.

type ListResponse

type ListResponse struct {
	Tunnels []*TunnelResponse `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetTunnels

func (x *ListResponse) GetTunnels() []*TunnelResponse

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

func (*ListResponse) Validate

func (m *ListResponse) Validate() error

Validate checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListResponse) ValidateAll

func (m *ListResponse) ValidateAll() error

ValidateAll checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListResponseMultiError, or nil if none found.

type ListResponseMultiError

type ListResponseMultiError []error

ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.

func (ListResponseMultiError) AllErrors

func (m ListResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListResponseMultiError) Error

func (m ListResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ListResponseValidationError

type ListResponseValidationError struct {
	// contains filtered or unexported fields
}

ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.

func (ListResponseValidationError) Cause

Cause function returns cause value.

func (ListResponseValidationError) Error

Error satisfies the builtin error interface

func (ListResponseValidationError) ErrorName

func (e ListResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ListResponseValidationError) Field

Field function returns field value.

func (ListResponseValidationError) Key

Key function returns key value.

func (ListResponseValidationError) Reason

Reason function returns reason value.

type PeerClient

type PeerClient interface {
	GetPeers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PeerList, error)
	SetPeer(ctx context.Context, in *SetPeerRequest, opts ...grpc.CallOption) (*PeerResponse, error)
	RemovePeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

PeerClient is the client API for Peer 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 NewPeerClient

func NewPeerClient(cc grpc.ClientConnInterface) PeerClient

type PeerList

type PeerList struct {
	Peers []*PeerResponse `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerList) Descriptor deprecated

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

Deprecated: Use PeerList.ProtoReflect.Descriptor instead.

func (*PeerList) GetPeers

func (x *PeerList) GetPeers() []*PeerResponse

func (*PeerList) ProtoMessage

func (*PeerList) ProtoMessage()

func (*PeerList) ProtoReflect

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

func (*PeerList) Reset

func (x *PeerList) Reset()

func (*PeerList) String

func (x *PeerList) String() string

func (*PeerList) Validate

func (m *PeerList) Validate() error

Validate checks the field values on PeerList with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PeerList) ValidateAll

func (m *PeerList) ValidateAll() error

ValidateAll checks the field values on PeerList with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PeerListMultiError, or nil if none found.

type PeerListMultiError

type PeerListMultiError []error

PeerListMultiError is an error wrapping multiple validation errors returned by PeerList.ValidateAll() if the designated constraints aren't met.

func (PeerListMultiError) AllErrors

func (m PeerListMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PeerListMultiError) Error

func (m PeerListMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PeerListValidationError

type PeerListValidationError struct {
	// contains filtered or unexported fields
}

PeerListValidationError is the validation error returned by PeerList.Validate if the designated constraints aren't met.

func (PeerListValidationError) Cause

func (e PeerListValidationError) Cause() error

Cause function returns cause value.

func (PeerListValidationError) Error

func (e PeerListValidationError) Error() string

Error satisfies the builtin error interface

func (PeerListValidationError) ErrorName

func (e PeerListValidationError) ErrorName() string

ErrorName returns error name.

func (PeerListValidationError) Field

func (e PeerListValidationError) Field() string

Field function returns field value.

func (PeerListValidationError) Key

func (e PeerListValidationError) Key() bool

Key function returns key value.

func (PeerListValidationError) Reason

func (e PeerListValidationError) Reason() string

Reason function returns reason value.

type PeerResponse

type PeerResponse struct {
	Id          string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Ports       []string `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty"`
	LocalPorts  []string `protobuf:"bytes,3,rep,name=local_ports,json=localPorts,proto3" json:"local_ports,omitempty"`
	RemotePorts []string `protobuf:"bytes,4,rep,name=remote_ports,json=remotePorts,proto3" json:"remote_ports,omitempty"`
	Connected   bool     `protobuf:"varint,5,opt,name=connected,proto3" json:"connected,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerResponse) Descriptor deprecated

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

Deprecated: Use PeerResponse.ProtoReflect.Descriptor instead.

func (*PeerResponse) GetConnected

func (x *PeerResponse) GetConnected() bool

func (*PeerResponse) GetId

func (x *PeerResponse) GetId() string

func (*PeerResponse) GetLocalPorts

func (x *PeerResponse) GetLocalPorts() []string

func (*PeerResponse) GetPorts

func (x *PeerResponse) GetPorts() []string

func (*PeerResponse) GetRemotePorts

func (x *PeerResponse) GetRemotePorts() []string

func (*PeerResponse) ProtoMessage

func (*PeerResponse) ProtoMessage()

func (*PeerResponse) ProtoReflect

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

func (*PeerResponse) Reset

func (x *PeerResponse) Reset()

func (*PeerResponse) String

func (x *PeerResponse) String() string

func (*PeerResponse) Validate

func (m *PeerResponse) Validate() error

Validate checks the field values on PeerResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PeerResponse) ValidateAll

func (m *PeerResponse) ValidateAll() error

ValidateAll checks the field values on PeerResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PeerResponseMultiError, or nil if none found.

type PeerResponseMultiError

type PeerResponseMultiError []error

PeerResponseMultiError is an error wrapping multiple validation errors returned by PeerResponse.ValidateAll() if the designated constraints aren't met.

func (PeerResponseMultiError) AllErrors

func (m PeerResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PeerResponseMultiError) Error

func (m PeerResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PeerResponseValidationError

type PeerResponseValidationError struct {
	// contains filtered or unexported fields
}

PeerResponseValidationError is the validation error returned by PeerResponse.Validate if the designated constraints aren't met.

func (PeerResponseValidationError) Cause

Cause function returns cause value.

func (PeerResponseValidationError) Error

Error satisfies the builtin error interface

func (PeerResponseValidationError) ErrorName

func (e PeerResponseValidationError) ErrorName() string

ErrorName returns error name.

func (PeerResponseValidationError) Field

Field function returns field value.

func (PeerResponseValidationError) Key

Key function returns key value.

func (PeerResponseValidationError) Reason

Reason function returns reason value.

type PeerServer

type PeerServer interface {
	GetPeers(context.Context, *emptypb.Empty) (*PeerList, error)
	SetPeer(context.Context, *SetPeerRequest) (*PeerResponse, error)
	RemovePeer(context.Context, *RemovePeerRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

PeerServer is the server API for Peer service. All implementations must embed UnimplementedPeerServer for forward compatibility

type RelayStatusResponse

type RelayStatusResponse struct {
	Connected       bool   `protobuf:"varint,1,opt,name=connected,proto3" json:"connected,omitempty"`
	RetryCount      uint32 `protobuf:"varint,2,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
	Uptime          uint32 `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
	SignalingServer string `protobuf:"bytes,4,opt,name=signaling_server,json=signalingServer,proto3" json:"signaling_server,omitempty"`
	// contains filtered or unexported fields
}

func (*RelayStatusResponse) Descriptor deprecated

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

Deprecated: Use RelayStatusResponse.ProtoReflect.Descriptor instead.

func (*RelayStatusResponse) GetConnected

func (x *RelayStatusResponse) GetConnected() bool

func (*RelayStatusResponse) GetRetryCount

func (x *RelayStatusResponse) GetRetryCount() uint32

func (*RelayStatusResponse) GetSignalingServer

func (x *RelayStatusResponse) GetSignalingServer() string

func (*RelayStatusResponse) GetUptime

func (x *RelayStatusResponse) GetUptime() uint32

func (*RelayStatusResponse) ProtoMessage

func (*RelayStatusResponse) ProtoMessage()

func (*RelayStatusResponse) ProtoReflect

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

func (*RelayStatusResponse) Reset

func (x *RelayStatusResponse) Reset()

func (*RelayStatusResponse) String

func (x *RelayStatusResponse) String() string

func (*RelayStatusResponse) Validate

func (m *RelayStatusResponse) Validate() error

Validate checks the field values on RelayStatusResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RelayStatusResponse) ValidateAll

func (m *RelayStatusResponse) ValidateAll() error

ValidateAll checks the field values on RelayStatusResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RelayStatusResponseMultiError, or nil if none found.

type RelayStatusResponseMultiError

type RelayStatusResponseMultiError []error

RelayStatusResponseMultiError is an error wrapping multiple validation errors returned by RelayStatusResponse.ValidateAll() if the designated constraints aren't met.

func (RelayStatusResponseMultiError) AllErrors

func (m RelayStatusResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RelayStatusResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RelayStatusResponseValidationError

type RelayStatusResponseValidationError struct {
	// contains filtered or unexported fields
}

RelayStatusResponseValidationError is the validation error returned by RelayStatusResponse.Validate if the designated constraints aren't met.

func (RelayStatusResponseValidationError) Cause

Cause function returns cause value.

func (RelayStatusResponseValidationError) Error

Error satisfies the builtin error interface

func (RelayStatusResponseValidationError) ErrorName

ErrorName returns error name.

func (RelayStatusResponseValidationError) Field

Field function returns field value.

func (RelayStatusResponseValidationError) Key

Key function returns key value.

func (RelayStatusResponseValidationError) Reason

Reason function returns reason value.

type RemovePeerRequest

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

func (*RemovePeerRequest) Descriptor deprecated

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

Deprecated: Use RemovePeerRequest.ProtoReflect.Descriptor instead.

func (*RemovePeerRequest) GetId

func (x *RemovePeerRequest) GetId() string

func (*RemovePeerRequest) ProtoMessage

func (*RemovePeerRequest) ProtoMessage()

func (*RemovePeerRequest) ProtoReflect

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

func (*RemovePeerRequest) Reset

func (x *RemovePeerRequest) Reset()

func (*RemovePeerRequest) String

func (x *RemovePeerRequest) String() string

func (*RemovePeerRequest) Validate

func (m *RemovePeerRequest) Validate() error

Validate checks the field values on RemovePeerRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RemovePeerRequest) ValidateAll

func (m *RemovePeerRequest) ValidateAll() error

ValidateAll checks the field values on RemovePeerRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RemovePeerRequestMultiError, or nil if none found.

type RemovePeerRequestMultiError

type RemovePeerRequestMultiError []error

RemovePeerRequestMultiError is an error wrapping multiple validation errors returned by RemovePeerRequest.ValidateAll() if the designated constraints aren't met.

func (RemovePeerRequestMultiError) AllErrors

func (m RemovePeerRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RemovePeerRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RemovePeerRequestValidationError

type RemovePeerRequestValidationError struct {
	// contains filtered or unexported fields
}

RemovePeerRequestValidationError is the validation error returned by RemovePeerRequest.Validate if the designated constraints aren't met.

func (RemovePeerRequestValidationError) Cause

Cause function returns cause value.

func (RemovePeerRequestValidationError) Error

Error satisfies the builtin error interface

func (RemovePeerRequestValidationError) ErrorName

ErrorName returns error name.

func (RemovePeerRequestValidationError) Field

Field function returns field value.

func (RemovePeerRequestValidationError) Key

Key function returns key value.

func (RemovePeerRequestValidationError) Reason

Reason function returns reason value.

type SetPeerRequest

type SetPeerRequest struct {
	Id      string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Ports   []uint32 `protobuf:"varint,2,rep,packed,name=ports,proto3" json:"ports,omitempty"`
	Connect bool     `protobuf:"varint,3,opt,name=connect,proto3" json:"connect,omitempty"`
	// contains filtered or unexported fields
}

func (*SetPeerRequest) Descriptor deprecated

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

Deprecated: Use SetPeerRequest.ProtoReflect.Descriptor instead.

func (*SetPeerRequest) GetConnect

func (x *SetPeerRequest) GetConnect() bool

func (*SetPeerRequest) GetId

func (x *SetPeerRequest) GetId() string

func (*SetPeerRequest) GetPorts

func (x *SetPeerRequest) GetPorts() []uint32

func (*SetPeerRequest) ProtoMessage

func (*SetPeerRequest) ProtoMessage()

func (*SetPeerRequest) ProtoReflect

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

func (*SetPeerRequest) Reset

func (x *SetPeerRequest) Reset()

func (*SetPeerRequest) String

func (x *SetPeerRequest) String() string

func (*SetPeerRequest) Validate

func (m *SetPeerRequest) Validate() error

Validate checks the field values on SetPeerRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SetPeerRequest) ValidateAll

func (m *SetPeerRequest) ValidateAll() error

ValidateAll checks the field values on SetPeerRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SetPeerRequestMultiError, or nil if none found.

type SetPeerRequestMultiError

type SetPeerRequestMultiError []error

SetPeerRequestMultiError is an error wrapping multiple validation errors returned by SetPeerRequest.ValidateAll() if the designated constraints aren't met.

func (SetPeerRequestMultiError) AllErrors

func (m SetPeerRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SetPeerRequestMultiError) Error

func (m SetPeerRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SetPeerRequestValidationError

type SetPeerRequestValidationError struct {
	// contains filtered or unexported fields
}

SetPeerRequestValidationError is the validation error returned by SetPeerRequest.Validate if the designated constraints aren't met.

func (SetPeerRequestValidationError) Cause

Cause function returns cause value.

func (SetPeerRequestValidationError) Error

Error satisfies the builtin error interface

func (SetPeerRequestValidationError) ErrorName

func (e SetPeerRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SetPeerRequestValidationError) Field

Field function returns field value.

func (SetPeerRequestValidationError) Key

Key function returns key value.

func (SetPeerRequestValidationError) Reason

Reason function returns reason value.

type TunnelClient

type TunnelClient interface {
	Create(ctx context.Context, in *CreateTunnelRequest, opts ...grpc.CallOption) (*TunnelResponse, error)
	List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

TunnelClient is the client API for Tunnel 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 NewTunnelClient

func NewTunnelClient(cc grpc.ClientConnInterface) TunnelClient

type TunnelResponse

type TunnelResponse struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	PeerId     string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	LocalPort  uint32 `protobuf:"varint,3,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
	RemotePort uint32 `protobuf:"varint,4,opt,name=remote_port,json=remotePort,proto3" json:"remote_port,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelResponse) Descriptor deprecated

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

Deprecated: Use TunnelResponse.ProtoReflect.Descriptor instead.

func (*TunnelResponse) GetId

func (x *TunnelResponse) GetId() string

func (*TunnelResponse) GetLocalPort

func (x *TunnelResponse) GetLocalPort() uint32

func (*TunnelResponse) GetPeerId

func (x *TunnelResponse) GetPeerId() string

func (*TunnelResponse) GetRemotePort

func (x *TunnelResponse) GetRemotePort() uint32

func (*TunnelResponse) ProtoMessage

func (*TunnelResponse) ProtoMessage()

func (*TunnelResponse) ProtoReflect

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

func (*TunnelResponse) Reset

func (x *TunnelResponse) Reset()

func (*TunnelResponse) String

func (x *TunnelResponse) String() string

func (*TunnelResponse) Validate

func (m *TunnelResponse) Validate() error

Validate checks the field values on TunnelResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TunnelResponse) ValidateAll

func (m *TunnelResponse) ValidateAll() error

ValidateAll checks the field values on TunnelResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TunnelResponseMultiError, or nil if none found.

type TunnelResponseMultiError

type TunnelResponseMultiError []error

TunnelResponseMultiError is an error wrapping multiple validation errors returned by TunnelResponse.ValidateAll() if the designated constraints aren't met.

func (TunnelResponseMultiError) AllErrors

func (m TunnelResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TunnelResponseMultiError) Error

func (m TunnelResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TunnelResponseValidationError

type TunnelResponseValidationError struct {
	// contains filtered or unexported fields
}

TunnelResponseValidationError is the validation error returned by TunnelResponse.Validate if the designated constraints aren't met.

func (TunnelResponseValidationError) Cause

Cause function returns cause value.

func (TunnelResponseValidationError) Error

Error satisfies the builtin error interface

func (TunnelResponseValidationError) ErrorName

func (e TunnelResponseValidationError) ErrorName() string

ErrorName returns error name.

func (TunnelResponseValidationError) Field

Field function returns field value.

func (TunnelResponseValidationError) Key

Key function returns key value.

func (TunnelResponseValidationError) Reason

Reason function returns reason value.

type TunnelServer

type TunnelServer interface {
	Create(context.Context, *CreateTunnelRequest) (*TunnelResponse, error)
	List(context.Context, *emptypb.Empty) (*ListResponse, error)
	Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

TunnelServer is the server API for Tunnel service. All implementations must embed UnimplementedTunnelServer for forward compatibility

type UnimplementedControlServer

type UnimplementedControlServer struct {
}

UnimplementedControlServer must be embedded to have forward compatible implementations.

func (UnimplementedControlServer) Connect

func (UnimplementedControlServer) Disconnect

func (UnimplementedControlServer) GetStatus

type UnimplementedPeerServer

type UnimplementedPeerServer struct {
}

UnimplementedPeerServer must be embedded to have forward compatible implementations.

func (UnimplementedPeerServer) GetPeers

func (UnimplementedPeerServer) RemovePeer

func (UnimplementedPeerServer) SetPeer

type UnimplementedTunnelServer

type UnimplementedTunnelServer struct {
}

UnimplementedTunnelServer must be embedded to have forward compatible implementations.

func (UnimplementedTunnelServer) Create

func (UnimplementedTunnelServer) Delete

func (UnimplementedTunnelServer) List

type UnsafeControlServer

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

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

type UnsafePeerServer

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

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

type UnsafeTunnelServer

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

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

Jump to

Keyboard shortcuts

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