proto

package
v0.0.0-...-c32710b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CrypterRequest_PayloadType_name = map[int32]string{
		0: "PDF",
	}
	CrypterRequest_PayloadType_value = map[string]int32{
		"PDF": 0,
	}
)

Enum value maps for CrypterRequest_PayloadType.

View Source
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.

View Source
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 (*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) Enum

func (CrypterRequest_PayloadType) EnumDescriptor deprecated

func (CrypterRequest_PayloadType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CrypterRequest_PayloadType.Descriptor instead.

func (CrypterRequest_PayloadType) Number

func (CrypterRequest_PayloadType) String

func (CrypterRequest_PayloadType) Type

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 (*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) Enum

func (CrypterResponse_OperationResult) EnumDescriptor deprecated

func (CrypterResponse_OperationResult) EnumDescriptor() ([]byte, []int)

Deprecated: Use CrypterResponse_OperationResult.Descriptor instead.

func (CrypterResponse_OperationResult) Number

func (CrypterResponse_OperationResult) String

func (CrypterResponse_OperationResult) Type

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

Jump to

Keyboard shortcuts

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