cryption

package
v0.0.0-...-13c49c2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CryptionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spec.proto.extension.v1.cryption.CryptionService",
	HandlerType: (*CryptionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Encrypt",
			Handler:    _CryptionService_Encrypt_Handler,
		},
		{
			MethodName: "Decrypt",
			Handler:    _CryptionService_Decrypt_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cryption.proto",
}

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

View Source
var File_cryption_proto protoreflect.FileDescriptor

Functions

func RegisterCryptionServiceServer

func RegisterCryptionServiceServer(s grpc.ServiceRegistrar, srv CryptionServiceServer)

Types

type CryptionServiceClient

type CryptionServiceClient interface {
	// Encrypt data
	Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error)
	// Decrypt data
	Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error)
}

CryptionServiceClient is the client API for CryptionService 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.

type CryptionServiceServer

type CryptionServiceServer interface {
	// Encrypt data
	Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error)
	// Decrypt data
	Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error)
}

CryptionServiceServer is the server API for CryptionService service. All implementations should embed UnimplementedCryptionServiceServer for forward compatibility

type DecryptRequest

type DecryptRequest struct {

	// The cryption service name, e.g. 'aliyun.kms'
	ComponentName string `protobuf:"bytes,1,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	// Required. The encrypted text
	CipherText []byte `protobuf:"bytes,2,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"`
	// contains filtered or unexported fields
}

DecryptRequest is the request of the `Decrypt` method.

func (*DecryptRequest) Descriptor deprecated

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

Deprecated: Use DecryptRequest.ProtoReflect.Descriptor instead.

func (*DecryptRequest) GetCipherText

func (x *DecryptRequest) GetCipherText() []byte

func (*DecryptRequest) GetComponentName

func (x *DecryptRequest) GetComponentName() 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 {

	// Raw plaintext.
	PlainText []byte `protobuf:"bytes,1,opt,name=plain_text,json=plainText,proto3" json:"plain_text,omitempty"`
	// The id of the key used to decrypt this text.
	KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// The version of the key
	KeyVersionId string `protobuf:"bytes,3,opt,name=key_version_id,json=keyVersionId,proto3" json:"key_version_id,omitempty"`
	// The request id of Decrypt
	RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// contains filtered or unexported fields
}

DecryptResponse is the response of the `Decrypt` method.

func (*DecryptResponse) Descriptor deprecated

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

Deprecated: Use DecryptResponse.ProtoReflect.Descriptor instead.

func (*DecryptResponse) GetKeyId

func (x *DecryptResponse) GetKeyId() string

func (*DecryptResponse) GetKeyVersionId

func (x *DecryptResponse) GetKeyVersionId() string

func (*DecryptResponse) GetPlainText

func (x *DecryptResponse) GetPlainText() []byte

func (*DecryptResponse) GetRequestId

func (x *DecryptResponse) GetRequestId() 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 EncryptRequest

type EncryptRequest struct {

	// The cryption service name, e.g. 'aliyun.kms'
	ComponentName string `protobuf:"bytes,1,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	// Required. Raw plaintext.
	PlainText []byte `protobuf:"bytes,2,opt,name=plain_text,json=plainText,proto3" json:"plain_text,omitempty"`
	// Required.
	KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// contains filtered or unexported fields
}

EncryptRequest is the request to encrypt data.

func (*EncryptRequest) Descriptor deprecated

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

Deprecated: Use EncryptRequest.ProtoReflect.Descriptor instead.

func (*EncryptRequest) GetComponentName

func (x *EncryptRequest) GetComponentName() string

func (*EncryptRequest) GetKeyId

func (x *EncryptRequest) GetKeyId() 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 {

	// The encrypted text
	CipherText []byte `protobuf:"bytes,1,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"`
	// The id of the key used to decrypt this text.
	KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// The version of the key
	KeyVersionId string `protobuf:"bytes,3,opt,name=key_version_id,json=keyVersionId,proto3" json:"key_version_id,omitempty"`
	// The request id of Encrypt
	RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// contains filtered or unexported fields
}

EncryptResponse is the response of the `Encrypt` method.

func (*EncryptResponse) Descriptor deprecated

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

Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead.

func (*EncryptResponse) GetCipherText

func (x *EncryptResponse) GetCipherText() []byte

func (*EncryptResponse) GetKeyId

func (x *EncryptResponse) GetKeyId() string

func (*EncryptResponse) GetKeyVersionId

func (x *EncryptResponse) GetKeyVersionId() string

func (*EncryptResponse) GetRequestId

func (x *EncryptResponse) GetRequestId() 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 UnimplementedCryptionServiceServer

type UnimplementedCryptionServiceServer struct {
}

UnimplementedCryptionServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedCryptionServiceServer) Decrypt

func (UnimplementedCryptionServiceServer) Encrypt

type UnsafeCryptionServiceServer

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

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

Jump to

Keyboard shortcuts

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