Documentation ¶
Index ¶
- Variables
- func RegisterCrypterServer(s *grpc.Server, srv CrypterServer)
- type CrypterClient
- type CrypterRequest
- func (*CrypterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CrypterRequest) GetAuthToken() string
- func (x *CrypterRequest) GetInitPassword() string
- func (x *CrypterRequest) GetNewPassword() string
- func (x *CrypterRequest) GetPayload() []byte
- func (x *CrypterRequest) GetType() CrypterRequest_PayloadType
- func (*CrypterRequest) ProtoMessage()
- func (x *CrypterRequest) ProtoReflect() protoreflect.Message
- func (x *CrypterRequest) Reset()
- func (x *CrypterRequest) String() string
- type CrypterRequest_PayloadType
- func (CrypterRequest_PayloadType) Descriptor() protoreflect.EnumDescriptor
- func (x CrypterRequest_PayloadType) Enum() *CrypterRequest_PayloadType
- func (CrypterRequest_PayloadType) EnumDescriptor() ([]byte, []int)deprecated
- func (x CrypterRequest_PayloadType) Number() protoreflect.EnumNumber
- func (x CrypterRequest_PayloadType) String() string
- func (CrypterRequest_PayloadType) Type() protoreflect.EnumType
- type CrypterResponse
- func (*CrypterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CrypterResponse) GetMessage() string
- func (x *CrypterResponse) GetPayload() []byte
- func (x *CrypterResponse) GetResult() CrypterResponse_OperationResult
- func (*CrypterResponse) ProtoMessage()
- func (x *CrypterResponse) ProtoReflect() protoreflect.Message
- func (x *CrypterResponse) Reset()
- func (x *CrypterResponse) String() string
- type CrypterResponse_OperationResult
- func (CrypterResponse_OperationResult) Descriptor() protoreflect.EnumDescriptor
- func (x CrypterResponse_OperationResult) Enum() *CrypterResponse_OperationResult
- func (CrypterResponse_OperationResult) EnumDescriptor() ([]byte, []int)deprecated
- func (x CrypterResponse_OperationResult) Number() protoreflect.EnumNumber
- func (x CrypterResponse_OperationResult) String() string
- func (CrypterResponse_OperationResult) Type() protoreflect.EnumType
- type CrypterServer
- type UnimplementedCrypterServer
Constants ¶
This section is empty.
Variables ¶
var ( CrypterRequest_PayloadType_name = map[int32]string{ 0: "PDF", } CrypterRequest_PayloadType_value = map[string]int32{ "PDF": 0, } )
Enum value maps for CrypterRequest_PayloadType.
var ( CrypterResponse_OperationResult_name = map[int32]string{ 0: "SUCCESS", 1: "ERROR", } CrypterResponse_OperationResult_value = map[string]int32{ "SUCCESS": 0, "ERROR": 1, } )
Enum value maps for CrypterResponse_OperationResult.
var File_filecrypt_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCrypterServer ¶
func RegisterCrypterServer(s *grpc.Server, srv CrypterServer)
Types ¶
type CrypterClient ¶
type CrypterClient interface { // Encrypt takes a CrypterRequest and performs encryption operation // the result of the operation is returned as a CrypterResponse Encrypt(ctx context.Context, in *CrypterRequest, opts ...grpc.CallOption) (*CrypterResponse, error) }
CrypterClient is the client API for Crypter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCrypterClient ¶
func NewCrypterClient(cc grpc.ClientConnInterface) CrypterClient
type CrypterRequest ¶
type CrypterRequest struct { AuthToken string `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Type CrypterRequest_PayloadType `protobuf:"varint,3,opt,name=type,proto3,enum=CrypterRequest_PayloadType" json:"type,omitempty"` InitPassword string `protobuf:"bytes,4,opt,name=initPassword,proto3" json:"initPassword,omitempty"` NewPassword string `protobuf:"bytes,5,opt,name=newPassword,proto3" json:"newPassword,omitempty"` // contains filtered or unexported fields }
CrypterRequest contains the binary payload, the initial password and the new password a authToken needs to be supplied which is evaluated to check if the usage of the service is allowed
func (*CrypterRequest) Descriptor
deprecated
func (*CrypterRequest) Descriptor() ([]byte, []int)
Deprecated: Use CrypterRequest.ProtoReflect.Descriptor instead.
func (*CrypterRequest) GetAuthToken ¶
func (x *CrypterRequest) GetAuthToken() string
func (*CrypterRequest) GetInitPassword ¶
func (x *CrypterRequest) GetInitPassword() string
func (*CrypterRequest) GetNewPassword ¶
func (x *CrypterRequest) GetNewPassword() string
func (*CrypterRequest) GetPayload ¶
func (x *CrypterRequest) GetPayload() []byte
func (*CrypterRequest) GetType ¶
func (x *CrypterRequest) GetType() CrypterRequest_PayloadType
func (*CrypterRequest) ProtoMessage ¶
func (*CrypterRequest) ProtoMessage()
func (*CrypterRequest) ProtoReflect ¶
func (x *CrypterRequest) ProtoReflect() protoreflect.Message
func (*CrypterRequest) Reset ¶
func (x *CrypterRequest) Reset()
func (*CrypterRequest) String ¶
func (x *CrypterRequest) String() string
type CrypterRequest_PayloadType ¶
type CrypterRequest_PayloadType int32
const (
CrypterRequest_PDF CrypterRequest_PayloadType = 0
)
func (CrypterRequest_PayloadType) Descriptor ¶
func (CrypterRequest_PayloadType) Descriptor() protoreflect.EnumDescriptor
func (CrypterRequest_PayloadType) Enum ¶
func (x CrypterRequest_PayloadType) Enum() *CrypterRequest_PayloadType
func (CrypterRequest_PayloadType) EnumDescriptor
deprecated
func (CrypterRequest_PayloadType) EnumDescriptor() ([]byte, []int)
Deprecated: Use CrypterRequest_PayloadType.Descriptor instead.
func (CrypterRequest_PayloadType) Number ¶
func (x CrypterRequest_PayloadType) Number() protoreflect.EnumNumber
func (CrypterRequest_PayloadType) String ¶
func (x CrypterRequest_PayloadType) String() string
func (CrypterRequest_PayloadType) Type ¶
func (CrypterRequest_PayloadType) Type() protoreflect.EnumType
type CrypterResponse ¶
type CrypterResponse struct { Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Result CrypterResponse_OperationResult `protobuf:"varint,2,opt,name=result,proto3,enum=CrypterResponse_OperationResult" json:"result,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
CrypterResponse returns the encrypted payload, an operation result and optional message
func (*CrypterResponse) Descriptor
deprecated
func (*CrypterResponse) Descriptor() ([]byte, []int)
Deprecated: Use CrypterResponse.ProtoReflect.Descriptor instead.
func (*CrypterResponse) GetMessage ¶
func (x *CrypterResponse) GetMessage() string
func (*CrypterResponse) GetPayload ¶
func (x *CrypterResponse) GetPayload() []byte
func (*CrypterResponse) GetResult ¶
func (x *CrypterResponse) GetResult() CrypterResponse_OperationResult
func (*CrypterResponse) ProtoMessage ¶
func (*CrypterResponse) ProtoMessage()
func (*CrypterResponse) ProtoReflect ¶
func (x *CrypterResponse) ProtoReflect() protoreflect.Message
func (*CrypterResponse) Reset ¶
func (x *CrypterResponse) Reset()
func (*CrypterResponse) String ¶
func (x *CrypterResponse) String() string
type CrypterResponse_OperationResult ¶
type CrypterResponse_OperationResult int32
const ( CrypterResponse_SUCCESS CrypterResponse_OperationResult = 0 CrypterResponse_ERROR CrypterResponse_OperationResult = 1 )
func (CrypterResponse_OperationResult) Descriptor ¶
func (CrypterResponse_OperationResult) Descriptor() protoreflect.EnumDescriptor
func (CrypterResponse_OperationResult) Enum ¶
func (x CrypterResponse_OperationResult) Enum() *CrypterResponse_OperationResult
func (CrypterResponse_OperationResult) EnumDescriptor
deprecated
func (CrypterResponse_OperationResult) EnumDescriptor() ([]byte, []int)
Deprecated: Use CrypterResponse_OperationResult.Descriptor instead.
func (CrypterResponse_OperationResult) Number ¶
func (x CrypterResponse_OperationResult) Number() protoreflect.EnumNumber
func (CrypterResponse_OperationResult) String ¶
func (x CrypterResponse_OperationResult) String() string
func (CrypterResponse_OperationResult) Type ¶
func (CrypterResponse_OperationResult) Type() protoreflect.EnumType
type CrypterServer ¶
type CrypterServer interface { // Encrypt takes a CrypterRequest and performs encryption operation // the result of the operation is returned as a CrypterResponse Encrypt(context.Context, *CrypterRequest) (*CrypterResponse, error) }
CrypterServer is the server API for Crypter service.
type UnimplementedCrypterServer ¶
type UnimplementedCrypterServer struct { }
UnimplementedCrypterServer can be embedded to have forward compatible implementations.
func (*UnimplementedCrypterServer) Encrypt ¶
func (*UnimplementedCrypterServer) Encrypt(context.Context, *CrypterRequest) (*CrypterResponse, error)