Documentation ¶
Index ¶
- Variables
- func RegisterGenericServer(s grpc.ServiceRegistrar, srv GenericServer)
- type Ack
- type AssignToken
- type AuthenticatedMessage
- func (*AuthenticatedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticatedMessage) GetClient() *ClientID
- func (x *AuthenticatedMessage) GetID() []byte
- func (x *AuthenticatedMessage) GetMessage() *anypb.Any
- func (x *AuthenticatedMessage) GetSignature() []byte
- func (x *AuthenticatedMessage) GetToken() []byte
- func (*AuthenticatedMessage) ProtoMessage()
- func (x *AuthenticatedMessage) ProtoReflect() protoreflect.Message
- func (x *AuthenticatedMessage) Reset()
- func (x *AuthenticatedMessage) String() string
- type ClientID
- type ECCSignature
- func (*ECCSignature) Descriptor() ([]byte, []int)deprecated
- func (x *ECCSignature) GetNonce() []byte
- func (x *ECCSignature) GetSignature() []byte
- func (*ECCSignature) ProtoMessage()
- func (x *ECCSignature) ProtoReflect() protoreflect.Message
- func (x *ECCSignature) Reset()
- func (x *ECCSignature) String() string
- type GenericClient
- type GenericServer
- type Ping
- type RSASignature
- func (*RSASignature) Descriptor() ([]byte, []int)deprecated
- func (x *RSASignature) GetNonce() []byte
- func (x *RSASignature) GetSignature() []byte
- func (*RSASignature) ProtoMessage()
- func (x *RSASignature) ProtoReflect() protoreflect.Message
- func (x *RSASignature) Reset()
- func (x *RSASignature) String() string
- type UnimplementedGenericServer
- type UnsafeGenericServer
Constants ¶
This section is empty.
Variables ¶
var File_messages_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
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) GetPublicKey ¶
func (*ClientID) ProtoMessage ¶
func (*ClientID) ProtoMessage()
func (*ClientID) ProtoReflect ¶
func (x *ClientID) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) ProtoReflect ¶
func (x *Ping) ProtoReflect() protoreflect.Message
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) AuthenticateToken(context.Context, *AuthenticatedMessage) (*Ack, error)
func (UnimplementedGenericServer) RequestToken ¶
func (UnimplementedGenericServer) RequestToken(context.Context, *Ping) (*AssignToken, error)
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.