Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRelayRegistryServer(s grpc.ServiceRegistrar, srv RelayRegistryServer)
- func RegisterSignalingServer(s grpc.ServiceRegistrar, srv SignalingServer)
- type BackendType
- func (BackendType) Descriptor() protoreflect.EnumDescriptor
- func (x BackendType) Enum() *BackendType
- func (BackendType) EnumDescriptor() ([]byte, []int)deprecated
- func (x BackendType) Number() protoreflect.EnumNumber
- func (x BackendType) String() string
- func (BackendType) Type() protoreflect.EnumType
- type EncryptedMessage
- func (*EncryptedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptedMessage) GetBody() []byte
- func (x *EncryptedMessage) GetNonce() []byte
- func (s *EncryptedMessage) Marshal(msg proto.Message, kp *crypto.KeyPair) error
- func (*EncryptedMessage) ProtoMessage()
- func (x *EncryptedMessage) ProtoReflect() protoreflect.Message
- func (x *EncryptedMessage) Reset()
- func (x *EncryptedMessage) String() string
- func (s *EncryptedMessage) Unmarshal(msg proto.Message, kp *crypto.KeyPair) error
- type Envelope
- func (e *Envelope) Decrypt(kp *crypto.KeyPair) (*Message, error)
- func (e *Envelope) DeepCopyInto(out *Envelope)
- func (*Envelope) Descriptor() ([]byte, []int)deprecated
- func (x *Envelope) GetContents() *EncryptedMessage
- func (x *Envelope) GetRecipient() []byte
- func (x *Envelope) GetSender() []byte
- func (*Envelope) ProtoMessage()
- func (x *Envelope) ProtoReflect() protoreflect.Message
- func (e *Envelope) PublicKeyPair() (crypto.PublicKeyPair, error)
- func (x *Envelope) Reset()
- func (x *Envelope) String() string
- type GetRelaysParams
- type GetRelaysResp
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (e *Message) Encrypt(kp *crypto.KeyPair) (*Envelope, error)
- func (x *Message) GetCandidate() *epdisc.Candidate
- func (x *Message) GetCredentials() *epdisc.Credentials
- func (x *Message) GetPeer() *pdisc.PeerDescription
- func (x *Message) GetPske() *pske.PresharedKeyEstablishment
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type RelayInfo
- func (*RelayInfo) Descriptor() ([]byte, []int)deprecated
- func (x *RelayInfo) GetExpires() *proto.Timestamp
- func (x *RelayInfo) GetPassword() string
- func (x *RelayInfo) GetUrl() string
- func (x *RelayInfo) GetUsername() string
- func (*RelayInfo) ProtoMessage()
- func (x *RelayInfo) ProtoReflect() protoreflect.Message
- func (x *RelayInfo) Reset()
- func (x *RelayInfo) String() string
- type RelayRegistryClient
- type RelayRegistryServer
- type SignalingClient
- type SignalingServer
- type Signaling_SubscribeClient
- type Signaling_SubscribeServer
- type SubscribeParams
- type UnimplementedRelayRegistryServer
- type UnimplementedSignalingServer
- type UnsafeRelayRegistryServer
- type UnsafeSignalingServer
Constants ¶
const ( Signaling_GetBuildInfo_FullMethodName = "/cunicu.signaling.Signaling/GetBuildInfo" Signaling_Subscribe_FullMethodName = "/cunicu.signaling.Signaling/Subscribe" Signaling_Publish_FullMethodName = "/cunicu.signaling.Signaling/Publish" )
const (
RelayRegistry_GetRelays_FullMethodName = "/cunicu.signaling.RelayRegistry/GetRelays"
)
Variables ¶
var ( BackendType_name = map[int32]string{ 0: "MULTI", 1: "GRPC", 2: "INPROCESS", } BackendType_value = map[string]int32{ "MULTI": 0, "GRPC": 1, "INPROCESS": 2, } )
Enum value maps for BackendType.
var File_signaling_relay_proto protoreflect.FileDescriptor
var File_signaling_signaling_proto protoreflect.FileDescriptor
var RelayRegistry_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cunicu.signaling.RelayRegistry", HandlerType: (*RelayRegistryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetRelays", Handler: _RelayRegistry_GetRelays_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "signaling/relay.proto", }
RelayRegistry_ServiceDesc is the grpc.ServiceDesc for RelayRegistry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Signaling_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cunicu.signaling.Signaling", HandlerType: (*SignalingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetBuildInfo", Handler: _Signaling_GetBuildInfo_Handler, }, { MethodName: "Publish", Handler: _Signaling_Publish_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Signaling_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "signaling/signaling.proto", }
Signaling_ServiceDesc is the grpc.ServiceDesc for Signaling service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRelayRegistryServer ¶
func RegisterRelayRegistryServer(s grpc.ServiceRegistrar, srv RelayRegistryServer)
func RegisterSignalingServer ¶
func RegisterSignalingServer(s grpc.ServiceRegistrar, srv SignalingServer)
Types ¶
type BackendType ¶
type BackendType int32
const ( BackendType_MULTI BackendType = 0 BackendType_GRPC BackendType = 1 BackendType_INPROCESS BackendType = 2 )
func (BackendType) Descriptor ¶
func (BackendType) Descriptor() protoreflect.EnumDescriptor
func (BackendType) Enum ¶
func (x BackendType) Enum() *BackendType
func (BackendType) EnumDescriptor
deprecated
func (BackendType) EnumDescriptor() ([]byte, []int)
Deprecated: Use BackendType.Descriptor instead.
func (BackendType) Number ¶
func (x BackendType) Number() protoreflect.EnumNumber
func (BackendType) String ¶
func (x BackendType) String() string
func (BackendType) Type ¶
func (BackendType) Type() protoreflect.EnumType
type EncryptedMessage ¶
type EncryptedMessage struct { Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
A container for an encrypted protobuf message
func (*EncryptedMessage) Descriptor
deprecated
func (*EncryptedMessage) Descriptor() ([]byte, []int)
Deprecated: Use EncryptedMessage.ProtoReflect.Descriptor instead.
func (*EncryptedMessage) GetBody ¶
func (x *EncryptedMessage) GetBody() []byte
func (*EncryptedMessage) GetNonce ¶
func (x *EncryptedMessage) GetNonce() []byte
func (*EncryptedMessage) ProtoMessage ¶
func (*EncryptedMessage) ProtoMessage()
func (*EncryptedMessage) ProtoReflect ¶
func (x *EncryptedMessage) ProtoReflect() protoreflect.Message
func (*EncryptedMessage) Reset ¶
func (x *EncryptedMessage) Reset()
func (*EncryptedMessage) String ¶
func (x *EncryptedMessage) String() string
type Envelope ¶
type Envelope struct { Sender []byte `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Recipient []byte `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` Contents *EncryptedMessage `protobuf:"bytes,3,opt,name=contents,proto3" json:"contents,omitempty"` // of type SignalingMessage // contains filtered or unexported fields }
func (*Envelope) DeepCopyInto ¶
func (*Envelope) Descriptor
deprecated
func (*Envelope) GetContents ¶
func (x *Envelope) GetContents() *EncryptedMessage
func (*Envelope) GetRecipient ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) ProtoReflect ¶
func (x *Envelope) ProtoReflect() protoreflect.Message
func (*Envelope) PublicKeyPair ¶
func (e *Envelope) PublicKeyPair() (crypto.PublicKeyPair, error)
type GetRelaysParams ¶
type GetRelaysParams struct { // Public key of peer which requestes the credentials PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // contains filtered or unexported fields }
func (*GetRelaysParams) Descriptor
deprecated
func (*GetRelaysParams) Descriptor() ([]byte, []int)
Deprecated: Use GetRelaysParams.ProtoReflect.Descriptor instead.
func (*GetRelaysParams) GetPublicKey ¶
func (x *GetRelaysParams) GetPublicKey() []byte
func (*GetRelaysParams) ProtoMessage ¶
func (*GetRelaysParams) ProtoMessage()
func (*GetRelaysParams) ProtoReflect ¶
func (x *GetRelaysParams) ProtoReflect() protoreflect.Message
func (*GetRelaysParams) Reset ¶
func (x *GetRelaysParams) Reset()
func (*GetRelaysParams) String ¶
func (x *GetRelaysParams) String() string
type GetRelaysResp ¶
type GetRelaysResp struct { Relays []*RelayInfo `protobuf:"bytes,1,rep,name=relays,proto3" json:"relays,omitempty"` // contains filtered or unexported fields }
func (*GetRelaysResp) Descriptor
deprecated
func (*GetRelaysResp) Descriptor() ([]byte, []int)
Deprecated: Use GetRelaysResp.ProtoReflect.Descriptor instead.
func (*GetRelaysResp) GetRelays ¶
func (x *GetRelaysResp) GetRelays() []*RelayInfo
func (*GetRelaysResp) ProtoMessage ¶
func (*GetRelaysResp) ProtoMessage()
func (*GetRelaysResp) ProtoReflect ¶
func (x *GetRelaysResp) ProtoReflect() protoreflect.Message
func (*GetRelaysResp) Reset ¶
func (x *GetRelaysResp) Reset()
func (*GetRelaysResp) String ¶
func (x *GetRelaysResp) String() string
type Message ¶
type Message struct { Credentials *epdisc.Credentials `protobuf:"bytes,1,opt,name=credentials,proto3" json:"credentials,omitempty"` Candidate *epdisc.Candidate `protobuf:"bytes,2,opt,name=candidate,proto3" json:"candidate,omitempty"` Peer *pdisc.PeerDescription `protobuf:"bytes,3,opt,name=peer,proto3" json:"peer,omitempty"` Pske *pske.PresharedKeyEstablishment `protobuf:"bytes,4,opt,name=pske,proto3" json:"pske,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetCandidate ¶
func (*Message) GetCredentials ¶
func (x *Message) GetCredentials() *epdisc.Credentials
func (*Message) GetPeer ¶
func (x *Message) GetPeer() *pdisc.PeerDescription
func (*Message) GetPske ¶
func (x *Message) GetPske() *pske.PresharedKeyEstablishment
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type RelayInfo ¶
type RelayInfo struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Expires *proto.Timestamp `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"` // contains filtered or unexported fields }
func (*RelayInfo) Descriptor
deprecated
func (*RelayInfo) GetExpires ¶
func (*RelayInfo) GetPassword ¶
func (*RelayInfo) GetUsername ¶
func (*RelayInfo) ProtoMessage ¶
func (*RelayInfo) ProtoMessage()
func (*RelayInfo) ProtoReflect ¶
func (x *RelayInfo) ProtoReflect() protoreflect.Message
type RelayRegistryClient ¶
type RelayRegistryClient interface {
GetRelays(ctx context.Context, in *GetRelaysParams, opts ...grpc.CallOption) (*GetRelaysResp, error)
}
RelayRegistryClient is the client API for RelayRegistry 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 NewRelayRegistryClient ¶
func NewRelayRegistryClient(cc grpc.ClientConnInterface) RelayRegistryClient
type RelayRegistryServer ¶
type RelayRegistryServer interface { GetRelays(context.Context, *GetRelaysParams) (*GetRelaysResp, error) // contains filtered or unexported methods }
RelayRegistryServer is the server API for RelayRegistry service. All implementations must embed UnimplementedRelayRegistryServer for forward compatibility
type SignalingClient ¶
type SignalingClient interface { GetBuildInfo(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.BuildInfo, error) Subscribe(ctx context.Context, in *SubscribeParams, opts ...grpc.CallOption) (Signaling_SubscribeClient, error) Publish(ctx context.Context, in *Envelope, opts ...grpc.CallOption) (*proto.Empty, error) }
SignalingClient is the client API for Signaling 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 NewSignalingClient ¶
func NewSignalingClient(cc grpc.ClientConnInterface) SignalingClient
type SignalingServer ¶
type SignalingServer interface { GetBuildInfo(context.Context, *proto.Empty) (*proto.BuildInfo, error) Subscribe(*SubscribeParams, Signaling_SubscribeServer) error Publish(context.Context, *Envelope) (*proto.Empty, error) // contains filtered or unexported methods }
SignalingServer is the server API for Signaling service. All implementations must embed UnimplementedSignalingServer for forward compatibility
type Signaling_SubscribeClient ¶
type Signaling_SubscribeClient interface { Recv() (*Envelope, error) grpc.ClientStream }
type Signaling_SubscribeServer ¶
type Signaling_SubscribeServer interface { Send(*Envelope) error grpc.ServerStream }
type SubscribeParams ¶
type SubscribeParams struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*SubscribeParams) Descriptor
deprecated
func (*SubscribeParams) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeParams.ProtoReflect.Descriptor instead.
func (*SubscribeParams) GetKey ¶
func (x *SubscribeParams) GetKey() []byte
func (*SubscribeParams) ProtoMessage ¶
func (*SubscribeParams) ProtoMessage()
func (*SubscribeParams) ProtoReflect ¶
func (x *SubscribeParams) ProtoReflect() protoreflect.Message
func (*SubscribeParams) Reset ¶
func (x *SubscribeParams) Reset()
func (*SubscribeParams) String ¶
func (x *SubscribeParams) String() string
type UnimplementedRelayRegistryServer ¶
type UnimplementedRelayRegistryServer struct { }
UnimplementedRelayRegistryServer must be embedded to have forward compatible implementations.
func (UnimplementedRelayRegistryServer) GetRelays ¶
func (UnimplementedRelayRegistryServer) GetRelays(context.Context, *GetRelaysParams) (*GetRelaysResp, error)
type UnimplementedSignalingServer ¶
type UnimplementedSignalingServer struct { }
UnimplementedSignalingServer must be embedded to have forward compatible implementations.
func (UnimplementedSignalingServer) GetBuildInfo ¶
func (UnimplementedSignalingServer) Subscribe ¶
func (UnimplementedSignalingServer) Subscribe(*SubscribeParams, Signaling_SubscribeServer) error
type UnsafeRelayRegistryServer ¶
type UnsafeRelayRegistryServer interface {
// contains filtered or unexported methods
}
UnsafeRelayRegistryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RelayRegistryServer will result in compilation errors.
type UnsafeSignalingServer ¶
type UnsafeSignalingServer interface {
// contains filtered or unexported methods
}
UnsafeSignalingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignalingServer will result in compilation errors.