Documentation ¶
Index ¶
- Variables
- func NewEncryptEndpoints() []*api.Endpoint
- func RegisterEncryptHandler(s server.Server, hdlr EncryptHandler, opts ...server.HandlerOption) error
- type DecryptRequest
- func (*DecryptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DecryptRequest) GetCipherText() string
- func (x *DecryptRequest) GetId() int64
- func (*DecryptRequest) ProtoMessage()
- func (x *DecryptRequest) ProtoReflect() protoreflect.Message
- func (x *DecryptRequest) Reset()
- func (x *DecryptRequest) String() string
- type DecryptResponse
- type EncryptHandler
- type EncryptRequest
- func (*EncryptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptRequest) GetId() int64
- func (x *EncryptRequest) GetOriginal() string
- func (*EncryptRequest) ProtoMessage()
- func (x *EncryptRequest) ProtoReflect() protoreflect.Message
- func (x *EncryptRequest) Reset()
- func (x *EncryptRequest) String() string
- type EncryptResponse
- type EncryptService
- type GetPublicKeyRequest
- type GetPublicKeyResponse
- func (*GetPublicKeyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPublicKeyResponse) GetId() int64
- func (x *GetPublicKeyResponse) GetPublicKey() string
- func (*GetPublicKeyResponse) ProtoMessage()
- func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message
- func (x *GetPublicKeyResponse) Reset()
- func (x *GetPublicKeyResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_encrypt_proto protoreflect.FileDescriptor
Functions ¶
func NewEncryptEndpoints ¶
func RegisterEncryptHandler ¶
func RegisterEncryptHandler(s server.Server, hdlr EncryptHandler, opts ...server.HandlerOption) error
Types ¶
type DecryptRequest ¶
type DecryptRequest struct { CipherText string `protobuf:"bytes,1,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DecryptRequest) Descriptor
deprecated
func (*DecryptRequest) Descriptor() ([]byte, []int)
Deprecated: Use DecryptRequest.ProtoReflect.Descriptor instead.
func (*DecryptRequest) GetCipherText ¶
func (x *DecryptRequest) GetCipherText() string
func (*DecryptRequest) GetId ¶
func (x *DecryptRequest) GetId() int64
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 { Original string `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` // contains filtered or unexported fields }
func (*DecryptResponse) Descriptor
deprecated
func (*DecryptResponse) Descriptor() ([]byte, []int)
Deprecated: Use DecryptResponse.ProtoReflect.Descriptor instead.
func (*DecryptResponse) GetOriginal ¶
func (x *DecryptResponse) GetOriginal() string
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 EncryptHandler ¶
type EncryptHandler interface { GetPublicKey(context.Context, *GetPublicKeyRequest, *GetPublicKeyResponse) error Encrypt(context.Context, *EncryptRequest, *EncryptResponse) error Decrypt(context.Context, *DecryptRequest, *DecryptResponse) error }
type EncryptRequest ¶
type EncryptRequest struct { Original string `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*EncryptRequest) Descriptor
deprecated
func (*EncryptRequest) Descriptor() ([]byte, []int)
Deprecated: Use EncryptRequest.ProtoReflect.Descriptor instead.
func (*EncryptRequest) GetId ¶
func (x *EncryptRequest) GetId() int64
func (*EncryptRequest) GetOriginal ¶
func (x *EncryptRequest) GetOriginal() string
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 string `protobuf:"bytes,1,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"` // contains filtered or unexported fields }
func (*EncryptResponse) Descriptor
deprecated
func (*EncryptResponse) Descriptor() ([]byte, []int)
Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead.
func (*EncryptResponse) GetCipherText ¶
func (x *EncryptResponse) GetCipherText() 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 EncryptService ¶
type EncryptService interface { GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...client.CallOption) (*GetPublicKeyResponse, error) Encrypt(ctx context.Context, in *EncryptRequest, opts ...client.CallOption) (*EncryptResponse, error) Decrypt(ctx context.Context, in *DecryptRequest, opts ...client.CallOption) (*DecryptResponse, error) }
func NewEncryptService ¶
func NewEncryptService(name string, c client.Client) EncryptService
type GetPublicKeyRequest ¶
type GetPublicKeyRequest struct {
// contains filtered or unexported fields
}
func (*GetPublicKeyRequest) Descriptor
deprecated
func (*GetPublicKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPublicKeyRequest.ProtoReflect.Descriptor instead.
func (*GetPublicKeyRequest) ProtoMessage ¶
func (*GetPublicKeyRequest) ProtoMessage()
func (*GetPublicKeyRequest) ProtoReflect ¶
func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message
func (*GetPublicKeyRequest) Reset ¶
func (x *GetPublicKeyRequest) Reset()
func (*GetPublicKeyRequest) String ¶
func (x *GetPublicKeyRequest) String() string
type GetPublicKeyResponse ¶
type GetPublicKeyResponse struct { PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPublicKeyResponse) Descriptor
deprecated
func (*GetPublicKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPublicKeyResponse.ProtoReflect.Descriptor instead.
func (*GetPublicKeyResponse) GetId ¶
func (x *GetPublicKeyResponse) GetId() int64
func (*GetPublicKeyResponse) GetPublicKey ¶
func (x *GetPublicKeyResponse) GetPublicKey() string
func (*GetPublicKeyResponse) ProtoMessage ¶
func (*GetPublicKeyResponse) ProtoMessage()
func (*GetPublicKeyResponse) ProtoReflect ¶
func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message
func (*GetPublicKeyResponse) Reset ¶
func (x *GetPublicKeyResponse) Reset()
func (*GetPublicKeyResponse) String ¶
func (x *GetPublicKeyResponse) String() string
Click to show internal directories.
Click to hide internal directories.