messages

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 9 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_messages_proto protoreflect.FileDescriptor
View Source
var Generic_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "messages.Generic",
	HandlerType: (*GenericServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AuthenticateToken",
			Handler:    _Generic_AuthenticateToken_Handler,
		},
		{
			MethodName: "RequestToken",
			Handler:    _Generic_RequestToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "messages.proto",
}

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

Functions

func RegisterGenericServer

func RegisterGenericServer(s grpc.ServiceRegistrar, srv GenericServer)

Types

type Ack

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

Generic response message providing an error message from remote servers

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetError

func (x *Ack) GetError() string

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type AssignToken

type AssignToken struct {
	Token []byte `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	// contains filtered or unexported fields
}

Provides a token to establish reverse identity to any type of client

func (*AssignToken) Descriptor deprecated

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

Deprecated: Use AssignToken.ProtoReflect.Descriptor instead.

func (*AssignToken) GetToken

func (x *AssignToken) GetToken() []byte

func (*AssignToken) ProtoMessage

func (*AssignToken) ProtoMessage()

func (*AssignToken) ProtoReflect

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

func (*AssignToken) Reset

func (x *AssignToken) Reset()

func (*AssignToken) String

func (x *AssignToken) String() string

type AuthenticatedMessage

type AuthenticatedMessage struct {
	ID        []byte     `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Signature []byte     `protobuf:"bytes,2,opt,name=Signature,proto3" json:"Signature,omitempty"`
	Token     []byte     `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
	Client    *ClientID  `protobuf:"bytes,4,opt,name=Client,proto3" json:"Client,omitempty"`
	Message   *anypb.Any `protobuf:"bytes,5,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

Wrapper for authenticated messages that also ensure integrity

func (*AuthenticatedMessage) Descriptor deprecated

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

Deprecated: Use AuthenticatedMessage.ProtoReflect.Descriptor instead.

func (*AuthenticatedMessage) GetClient

func (x *AuthenticatedMessage) GetClient() *ClientID

func (*AuthenticatedMessage) GetID

func (x *AuthenticatedMessage) GetID() []byte

func (*AuthenticatedMessage) GetMessage

func (x *AuthenticatedMessage) GetMessage() *anypb.Any

func (*AuthenticatedMessage) GetSignature

func (x *AuthenticatedMessage) GetSignature() []byte

func (*AuthenticatedMessage) GetToken

func (x *AuthenticatedMessage) GetToken() []byte

func (*AuthenticatedMessage) ProtoMessage

func (*AuthenticatedMessage) ProtoMessage()

func (*AuthenticatedMessage) ProtoReflect

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

func (*AuthenticatedMessage) Reset

func (x *AuthenticatedMessage) Reset()

func (*AuthenticatedMessage) String

func (x *AuthenticatedMessage) String() string

type ClientID

type ClientID struct {
	Salt      []byte `protobuf:"bytes,1,opt,name=Salt,proto3" json:"Salt,omitempty"`
	PublicKey string `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	// contains filtered or unexported fields
}

Message used for assembly of Client IDs in the system

func (*ClientID) Descriptor deprecated

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

Deprecated: Use ClientID.ProtoReflect.Descriptor instead.

func (*ClientID) GetPublicKey

func (x *ClientID) GetPublicKey() string

func (*ClientID) GetSalt

func (x *ClientID) GetSalt() []byte

func (*ClientID) ProtoMessage

func (*ClientID) ProtoMessage()

func (*ClientID) ProtoReflect

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

func (*ClientID) Reset

func (x *ClientID) Reset()

func (*ClientID) String

func (x *ClientID) String() string

type ECCSignature

type ECCSignature struct {
	Nonce     []byte `protobuf:"bytes,1,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	Signature []byte `protobuf:"bytes,2,opt,name=Signature,proto3" json:"Signature,omitempty"`
	// contains filtered or unexported fields
}

ECCSignature is a digital signature for the ECC algorithm

func (*ECCSignature) Descriptor deprecated

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

Deprecated: Use ECCSignature.ProtoReflect.Descriptor instead.

func (*ECCSignature) GetNonce

func (x *ECCSignature) GetNonce() []byte

func (*ECCSignature) GetSignature

func (x *ECCSignature) GetSignature() []byte

func (*ECCSignature) ProtoMessage

func (*ECCSignature) ProtoMessage()

func (*ECCSignature) ProtoReflect

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

func (*ECCSignature) Reset

func (x *ECCSignature) Reset()

func (*ECCSignature) String

func (x *ECCSignature) String() string

type GenericClient

type GenericClient interface {
	// Authenticate a token with the server
	AuthenticateToken(ctx context.Context, in *AuthenticatedMessage, opts ...grpc.CallOption) (*Ack, error)
	// Request a token from the server
	RequestToken(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*AssignToken, error)
}

GenericClient is the client API for Generic 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 NewGenericClient

func NewGenericClient(cc grpc.ClientConnInterface) GenericClient

type GenericServer

type GenericServer interface {
	// Authenticate a token with the server
	AuthenticateToken(context.Context, *AuthenticatedMessage) (*Ack, error)
	// Request a token from the server
	RequestToken(context.Context, *Ping) (*AssignToken, error)
	// contains filtered or unexported methods
}

GenericServer is the server API for Generic service. All implementations must embed UnimplementedGenericServer for forward compatibility

type Ping

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

Empty message for requesting action from any type of server

func (*Ping) Descriptor deprecated

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

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect

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

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type RSASignature

type RSASignature struct {
	Nonce     []byte `protobuf:"bytes,1,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	Signature []byte `protobuf:"bytes,2,opt,name=Signature,proto3" json:"Signature,omitempty"`
	// contains filtered or unexported fields
}

RSASignature is a digital signature for the RSA algorithm

func (*RSASignature) Descriptor deprecated

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

Deprecated: Use RSASignature.ProtoReflect.Descriptor instead.

func (*RSASignature) GetNonce

func (x *RSASignature) GetNonce() []byte

func (*RSASignature) GetSignature

func (x *RSASignature) GetSignature() []byte

func (*RSASignature) ProtoMessage

func (*RSASignature) ProtoMessage()

func (*RSASignature) ProtoReflect

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

func (*RSASignature) Reset

func (x *RSASignature) Reset()

func (*RSASignature) String

func (x *RSASignature) String() string

type UnimplementedGenericServer

type UnimplementedGenericServer struct {
}

UnimplementedGenericServer must be embedded to have forward compatible implementations.

func (UnimplementedGenericServer) AuthenticateToken

func (UnimplementedGenericServer) RequestToken

type UnsafeGenericServer

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

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

Jump to

Keyboard shortcuts

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