proto

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KMS_Encrypt_FullMethodName = "/proto.KMS/Encrypt"
	KMS_Decrypt_FullMethodName = "/proto.KMS/Decrypt"
)

Variables

View Source
var File_proto_kms_proto protoreflect.FileDescriptor
View Source
var KMS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.KMS",
	HandlerType: (*KMSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Encrypt",
			Handler:    _KMS_Encrypt_Handler,
		},
		{
			MethodName: "Decrypt",
			Handler:    _KMS_Decrypt_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/kms.proto",
}

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

Functions

func RegisterKMSServer

func RegisterKMSServer(s grpc.ServiceRegistrar, srv KMSServer)

Types

type DecryptRequest

type DecryptRequest struct {
	Payload        string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Key            string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	AdditionalData string `protobuf:"bytes,3,opt,name=additional_data,json=additionalData,proto3" json:"additional_data,omitempty"`
	Mode           int32  `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
	Url            string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
	MasterKey      string `protobuf:"bytes,6,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"`
	// contains filtered or unexported fields
}

func (*DecryptRequest) Descriptor deprecated

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

Deprecated: Use DecryptRequest.ProtoReflect.Descriptor instead.

func (*DecryptRequest) GetAdditionalData

func (x *DecryptRequest) GetAdditionalData() string

func (*DecryptRequest) GetKey

func (x *DecryptRequest) GetKey() string

func (*DecryptRequest) GetMasterKey

func (x *DecryptRequest) GetMasterKey() string

func (*DecryptRequest) GetMode

func (x *DecryptRequest) GetMode() int32

func (*DecryptRequest) GetPayload

func (x *DecryptRequest) GetPayload() string

func (*DecryptRequest) GetUrl

func (x *DecryptRequest) GetUrl() 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 {
	Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*DecryptResponse) Descriptor deprecated

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

Deprecated: Use DecryptResponse.ProtoReflect.Descriptor instead.

func (*DecryptResponse) GetPayload

func (x *DecryptResponse) GetPayload() 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 {
	Payload        string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	AdditionalData string `protobuf:"bytes,2,opt,name=additional_data,json=additionalData,proto3" json:"additional_data,omitempty"`
	Url            string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	MasterKey      string `protobuf:"bytes,4,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"`
	// contains filtered or unexported fields
}

func (*EncryptRequest) Descriptor deprecated

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

Deprecated: Use EncryptRequest.ProtoReflect.Descriptor instead.

func (*EncryptRequest) GetAdditionalData

func (x *EncryptRequest) GetAdditionalData() string

func (*EncryptRequest) GetMasterKey

func (x *EncryptRequest) GetMasterKey() string

func (*EncryptRequest) GetPayload

func (x *EncryptRequest) GetPayload() string

func (*EncryptRequest) GetUrl

func (x *EncryptRequest) GetUrl() 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 {
	Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Key     string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Mode    int32  `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

func (*EncryptResponse) Descriptor deprecated

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

Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead.

func (*EncryptResponse) GetKey

func (x *EncryptResponse) GetKey() string

func (*EncryptResponse) GetMode

func (x *EncryptResponse) GetMode() int32

func (*EncryptResponse) GetPayload

func (x *EncryptResponse) GetPayload() 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 KMSClient

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

KMSClient is the client API for KMS 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 NewKMSClient

func NewKMSClient(cc grpc.ClientConnInterface) KMSClient

type KMSServer

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

KMSServer is the server API for KMS service. All implementations should embed UnimplementedKMSServer for forward compatibility

type UnimplementedKMSServer

type UnimplementedKMSServer struct {
}

UnimplementedKMSServer should be embedded to have forward compatible implementations.

func (UnimplementedKMSServer) Decrypt

func (UnimplementedKMSServer) Encrypt

type UnsafeKMSServer added in v0.1.3

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

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

Jump to

Keyboard shortcuts

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