signaling

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Signaling_GetBuildInfo_FullMethodName = "/cunicu.signaling.Signaling/GetBuildInfo"
	Signaling_Subscribe_FullMethodName    = "/cunicu.signaling.Signaling/Subscribe"
	Signaling_Publish_FullMethodName      = "/cunicu.signaling.Signaling/Publish"
)
View Source
const (
	RelayRegistry_GetRelays_FullMethodName = "/cunicu.signaling.RelayRegistry/GetRelays"
)

Variables

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

View Source
var File_signaling_relay_proto protoreflect.FileDescriptor
View Source
var File_signaling_signaling_proto protoreflect.FileDescriptor
View Source
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)

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

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) Marshal

func (s *EncryptedMessage) Marshal(msg proto.Message, kp *crypto.KeyPair) error

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

func (*EncryptedMessage) Unmarshal

func (s *EncryptedMessage) Unmarshal(msg proto.Message, kp *crypto.KeyPair) error

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) Decrypt

func (e *Envelope) Decrypt(kp *crypto.KeyPair) (*Message, error)

func (*Envelope) DeepCopyInto

func (e *Envelope) DeepCopyInto(out *Envelope)

func (*Envelope) Descriptor deprecated

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

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetContents

func (x *Envelope) GetContents() *EncryptedMessage

func (*Envelope) GetRecipient

func (x *Envelope) GetRecipient() []byte

func (*Envelope) GetSender

func (x *Envelope) GetSender() []byte

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)

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) Encrypt

func (e *Message) Encrypt(kp *crypto.KeyPair) (*Envelope, error)

func (*Message) GetCandidate

func (x *Message) GetCandidate() *epdisc.Candidate

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use RelayInfo.ProtoReflect.Descriptor instead.

func (*RelayInfo) GetExpires

func (x *RelayInfo) GetExpires() *proto.Timestamp

func (*RelayInfo) GetPassword

func (x *RelayInfo) GetPassword() string

func (*RelayInfo) GetUrl

func (x *RelayInfo) GetUrl() string

func (*RelayInfo) GetUsername

func (x *RelayInfo) GetUsername() string

func (*RelayInfo) ProtoMessage

func (*RelayInfo) ProtoMessage()

func (*RelayInfo) ProtoReflect

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

func (*RelayInfo) Reset

func (x *RelayInfo) Reset()

func (*RelayInfo) String

func (x *RelayInfo) String() string

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.

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

type UnimplementedSignalingServer

type UnimplementedSignalingServer struct {
}

UnimplementedSignalingServer must be embedded to have forward compatible implementations.

func (UnimplementedSignalingServer) GetBuildInfo

func (UnimplementedSignalingServer) Publish

func (UnimplementedSignalingServer) Subscribe

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.

Jump to

Keyboard shortcuts

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