Documentation
¶
Index ¶
- Variables
- func RegisterGenericServer(s grpc.ServiceRegistrar, srv GenericServer)
- type DecryptRequest
- func (*DecryptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DecryptRequest) GetAssociatedData() []byte
- func (x *DecryptRequest) GetCiphertext() []byte
- func (x *DecryptRequest) GetObjectId() string
- func (*DecryptRequest) ProtoMessage()
- func (x *DecryptRequest) ProtoReflect() protoreflect.Message
- func (x *DecryptRequest) Reset()
- func (x *DecryptRequest) String() string
- type DecryptResponse
- func (*DecryptResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DecryptResponse) GetAssociatedData() []byte
- func (x *DecryptResponse) GetPlaintext() []byte
- func (*DecryptResponse) ProtoMessage()
- func (x *DecryptResponse) ProtoReflect() protoreflect.Message
- func (x *DecryptResponse) Reset()
- func (x *DecryptResponse) String() string
- type EncryptRequest
- func (*EncryptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptRequest) GetAssociatedData() []byte
- func (x *EncryptRequest) GetGroupIds() []string
- func (x *EncryptRequest) GetPlaintext() []byte
- func (*EncryptRequest) ProtoMessage()
- func (x *EncryptRequest) ProtoReflect() protoreflect.Message
- func (x *EncryptRequest) Reset()
- func (x *EncryptRequest) String() string
- type EncryptResponse
- func (*EncryptResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptResponse) GetAssociatedData() []byte
- func (x *EncryptResponse) GetCiphertext() []byte
- func (x *EncryptResponse) GetObjectId() string
- func (*EncryptResponse) ProtoMessage()
- func (x *EncryptResponse) ProtoReflect() protoreflect.Message
- func (x *EncryptResponse) Reset()
- func (x *EncryptResponse) String() string
- type GenericClient
- type GenericServer
- type UnimplementedGenericServer
- type UnsafeGenericServer
Constants ¶
This section is empty.
Variables ¶
var File_generic_proto protoreflect.FileDescriptor
var Generic_ServiceDesc = grpc.ServiceDesc{ ServiceName: "d1.generic.Generic", HandlerType: (*GenericServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Encrypt", Handler: _Generic_Encrypt_Handler, }, { MethodName: "Decrypt", Handler: _Generic_Decrypt_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "generic.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 DecryptRequest ¶
type DecryptRequest struct { // Data to decrypt. Ciphertext []byte `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` // Associated data. AssociatedData []byte `protobuf:"bytes,2,opt,name=associated_data,json=associatedData,proto3" json:"associated_data,omitempty"` // The object ID of the data. ObjectId string `protobuf:"bytes,3,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` // contains filtered or unexported fields }
Represents a request to decrypt data.
func (*DecryptRequest) Descriptor
deprecated
func (*DecryptRequest) Descriptor() ([]byte, []int)
Deprecated: Use DecryptRequest.ProtoReflect.Descriptor instead.
func (*DecryptRequest) GetAssociatedData ¶
func (x *DecryptRequest) GetAssociatedData() []byte
func (*DecryptRequest) GetCiphertext ¶
func (x *DecryptRequest) GetCiphertext() []byte
func (*DecryptRequest) GetObjectId ¶
func (x *DecryptRequest) GetObjectId() string
func (*DecryptRequest) ProtoMessage ¶
func (*DecryptRequest) ProtoMessage()
func (*DecryptRequest) ProtoReflect ¶
func (x *DecryptRequest) ProtoReflect() protoreflect.Message
func (*DecryptRequest) Reset ¶
func (x *DecryptRequest) Reset()
func (*DecryptRequest) String ¶
func (x *DecryptRequest) String() string
type DecryptResponse ¶
type DecryptResponse struct { // Decrypted data. Plaintext []byte `protobuf:"bytes,1,opt,name=plaintext,proto3" json:"plaintext,omitempty"` // Associated data. AssociatedData []byte `protobuf:"bytes,2,opt,name=associated_data,json=associatedData,proto3" json:"associated_data,omitempty"` // contains filtered or unexported fields }
Represents a response to a decryption request.
func (*DecryptResponse) Descriptor
deprecated
func (*DecryptResponse) Descriptor() ([]byte, []int)
Deprecated: Use DecryptResponse.ProtoReflect.Descriptor instead.
func (*DecryptResponse) GetAssociatedData ¶
func (x *DecryptResponse) GetAssociatedData() []byte
func (*DecryptResponse) GetPlaintext ¶
func (x *DecryptResponse) GetPlaintext() []byte
func (*DecryptResponse) ProtoMessage ¶
func (*DecryptResponse) ProtoMessage()
func (*DecryptResponse) ProtoReflect ¶
func (x *DecryptResponse) ProtoReflect() protoreflect.Message
func (*DecryptResponse) Reset ¶
func (x *DecryptResponse) Reset()
func (*DecryptResponse) String ¶
func (x *DecryptResponse) String() string
type EncryptRequest ¶
type EncryptRequest struct { // Data to encrypt. Plaintext []byte `protobuf:"bytes,1,opt,name=plaintext,proto3" json:"plaintext,omitempty"` // Associated data. AssociatedData []byte `protobuf:"bytes,2,opt,name=associated_data,json=associatedData,proto3" json:"associated_data,omitempty"` // Optional additional groups to add to the access list. GroupIds []string `protobuf:"bytes,3,rep,name=group_ids,json=groupIds,proto3" json:"group_ids,omitempty"` // contains filtered or unexported fields }
Represents a request to encrypt data.
func (*EncryptRequest) Descriptor
deprecated
func (*EncryptRequest) Descriptor() ([]byte, []int)
Deprecated: Use EncryptRequest.ProtoReflect.Descriptor instead.
func (*EncryptRequest) GetAssociatedData ¶
func (x *EncryptRequest) GetAssociatedData() []byte
func (*EncryptRequest) GetGroupIds ¶
func (x *EncryptRequest) GetGroupIds() []string
func (*EncryptRequest) GetPlaintext ¶
func (x *EncryptRequest) GetPlaintext() []byte
func (*EncryptRequest) ProtoMessage ¶
func (*EncryptRequest) ProtoMessage()
func (*EncryptRequest) ProtoReflect ¶
func (x *EncryptRequest) ProtoReflect() protoreflect.Message
func (*EncryptRequest) Reset ¶
func (x *EncryptRequest) Reset()
func (*EncryptRequest) String ¶
func (x *EncryptRequest) String() string
type EncryptResponse ¶
type EncryptResponse struct { // Ciphertext of the provided plaintext. Ciphertext []byte `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` // Associated data. AssociatedData []byte `protobuf:"bytes,2,opt,name=associated_data,json=associatedData,proto3" json:"associated_data,omitempty"` // The object ID of the encrypted data. ObjectId string `protobuf:"bytes,3,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` // contains filtered or unexported fields }
Represents a response to an encryption request.
func (*EncryptResponse) Descriptor
deprecated
func (*EncryptResponse) Descriptor() ([]byte, []int)
Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead.
func (*EncryptResponse) GetAssociatedData ¶
func (x *EncryptResponse) GetAssociatedData() []byte
func (*EncryptResponse) GetCiphertext ¶
func (x *EncryptResponse) GetCiphertext() []byte
func (*EncryptResponse) GetObjectId ¶
func (x *EncryptResponse) GetObjectId() string
func (*EncryptResponse) ProtoMessage ¶
func (*EncryptResponse) ProtoMessage()
func (*EncryptResponse) ProtoReflect ¶
func (x *EncryptResponse) ProtoReflect() protoreflect.Message
func (*EncryptResponse) Reset ¶
func (x *EncryptResponse) Reset()
func (*EncryptResponse) String ¶
func (x *EncryptResponse) String() string
type GenericClient ¶
type GenericClient interface { // Encrypts data and returns the ciphertext without storing it. Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error) // Authorizes the user for access permissions and if accessible, returns the decrypted content. Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, 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 { // Encrypts data and returns the ciphertext without storing it. Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error) // Authorizes the user for access permissions and if accessible, returns the decrypted content. Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error) // contains filtered or unexported methods }
GenericServer is the server API for Generic service. All implementations must embed UnimplementedGenericServer for forward compatibility
type UnimplementedGenericServer ¶
type UnimplementedGenericServer struct { }
UnimplementedGenericServer must be embedded to have forward compatible implementations.
func (UnimplementedGenericServer) Decrypt ¶
func (UnimplementedGenericServer) Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error)
func (UnimplementedGenericServer) Encrypt ¶
func (UnimplementedGenericServer) Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, 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.