dke

package
v0.0.0-...-a1e40cf Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package dke is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAzureDKEKeyManagementServiceHandler

func RegisterAzureDKEKeyManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAzureDKEKeyManagementServiceHandler registers the http handlers for service AzureDKEKeyManagementService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAzureDKEKeyManagementServiceHandlerClient

func RegisterAzureDKEKeyManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AzureDKEKeyManagementServiceClient) error

RegisterAzureDKEKeyManagementServiceHandlerClient registers the http handlers for service AzureDKEKeyManagementService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AzureDKEKeyManagementServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AzureDKEKeyManagementServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AzureDKEKeyManagementServiceClient" to call the correct interceptors.

func RegisterAzureDKEKeyManagementServiceHandlerFromEndpoint

func RegisterAzureDKEKeyManagementServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAzureDKEKeyManagementServiceHandlerFromEndpoint is same as RegisterAzureDKEKeyManagementServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAzureDKEKeyManagementServiceHandlerServer

func RegisterAzureDKEKeyManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AzureDKEKeyManagementServiceServer) error

RegisterAzureDKEKeyManagementServiceHandlerServer registers the http handlers for service AzureDKEKeyManagementService to "mux". UnaryRPC :call AzureDKEKeyManagementServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterAzureDKEKeyManagementServiceServer

func RegisterAzureDKEKeyManagementServiceServer(s *grpc.Server, srv AzureDKEKeyManagementServiceServer)

Types

type AzureDKEKeyManagementServiceClient

type AzureDKEKeyManagementServiceClient interface {
	// Gets the public key
	GetPublicKey(ctx context.Context, in *PublicKeyRequest, opts ...grpc.CallOption) (*PublicKeyResponse, error)
	// Decrypts using the private key. Credentials need to be provided via the
	// Authorization header with the Bearer JWT token.
	Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error)
}

AzureDKEKeyManagementServiceClient is the client API for AzureDKEKeyManagementService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAzureDKEKeyManagementServiceClient

func NewAzureDKEKeyManagementServiceClient(cc *grpc.ClientConn) AzureDKEKeyManagementServiceClient

type AzureDKEKeyManagementServiceServer

type AzureDKEKeyManagementServiceServer interface {
	// Gets the public key
	GetPublicKey(context.Context, *PublicKeyRequest) (*PublicKeyResponse, error)
	// Decrypts using the private key. Credentials need to be provided via the
	// Authorization header with the Bearer JWT token.
	Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error)
}

AzureDKEKeyManagementServiceServer is the server API for AzureDKEKeyManagementService service.

type DecryptRequest

type DecryptRequest struct {
	// Required. Name of the key
	// e.g. `TestKey1`.
	KeyName string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"`
	// Required. The identifier of the key
	// (as provided by [AzureDKEKeyManagementService.GetKey][])
	// e.g.
	// `D798B899-3350-4F5C-A608-2EDA37CB0EBD`
	KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// Required. Algorithm
	// e.g. `RSA-OAEP-256`
	Alg string `protobuf:"bytes,3,opt,name=alg,proto3" json:"alg,omitempty"`
	// Required. Encrypted value
	Value                []byte   `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Decrypt using the private key. The encrypted text must have been encrypted using the private key.

func (*DecryptRequest) Descriptor

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

func (*DecryptRequest) GetAlg

func (m *DecryptRequest) GetAlg() string

func (*DecryptRequest) GetKeyId

func (m *DecryptRequest) GetKeyId() string

func (*DecryptRequest) GetKeyName

func (m *DecryptRequest) GetKeyName() string

func (*DecryptRequest) GetValue

func (m *DecryptRequest) GetValue() []byte

func (*DecryptRequest) ProtoMessage

func (*DecryptRequest) ProtoMessage()

func (*DecryptRequest) Reset

func (m *DecryptRequest) Reset()

func (*DecryptRequest) String

func (m *DecryptRequest) String() string

func (*DecryptRequest) XXX_DiscardUnknown

func (m *DecryptRequest) XXX_DiscardUnknown()

func (*DecryptRequest) XXX_Marshal

func (m *DecryptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DecryptRequest) XXX_Merge

func (m *DecryptRequest) XXX_Merge(src proto.Message)

func (*DecryptRequest) XXX_Size

func (m *DecryptRequest) XXX_Size() int

func (*DecryptRequest) XXX_Unmarshal

func (m *DecryptRequest) XXX_Unmarshal(b []byte) error

type DecryptResponse

type DecryptResponse struct {
	// The decrypted data
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response message for [AzureDKEKeyManagementService.Decrypt][].

func (*DecryptResponse) Descriptor

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

func (*DecryptResponse) GetValue

func (m *DecryptResponse) GetValue() []byte

func (*DecryptResponse) ProtoMessage

func (*DecryptResponse) ProtoMessage()

func (*DecryptResponse) Reset

func (m *DecryptResponse) Reset()

func (*DecryptResponse) String

func (m *DecryptResponse) String() string

func (*DecryptResponse) XXX_DiscardUnknown

func (m *DecryptResponse) XXX_DiscardUnknown()

func (*DecryptResponse) XXX_Marshal

func (m *DecryptResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DecryptResponse) XXX_Merge

func (m *DecryptResponse) XXX_Merge(src proto.Message)

func (*DecryptResponse) XXX_Size

func (m *DecryptResponse) XXX_Size() int

func (*DecryptResponse) XXX_Unmarshal

func (m *DecryptResponse) XXX_Unmarshal(b []byte) error

type PublicKeyRequest

type PublicKeyRequest struct {
	// Required. Key Name
	// e.g. `TestKey1`.
	KeyName              string   `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Gets the public key

func (*PublicKeyRequest) Descriptor

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

func (*PublicKeyRequest) GetKeyName

func (m *PublicKeyRequest) GetKeyName() string

func (*PublicKeyRequest) ProtoMessage

func (*PublicKeyRequest) ProtoMessage()

func (*PublicKeyRequest) Reset

func (m *PublicKeyRequest) Reset()

func (*PublicKeyRequest) String

func (m *PublicKeyRequest) String() string

func (*PublicKeyRequest) XXX_DiscardUnknown

func (m *PublicKeyRequest) XXX_DiscardUnknown()

func (*PublicKeyRequest) XXX_Marshal

func (m *PublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PublicKeyRequest) XXX_Merge

func (m *PublicKeyRequest) XXX_Merge(src proto.Message)

func (*PublicKeyRequest) XXX_Size

func (m *PublicKeyRequest) XXX_Size() int

func (*PublicKeyRequest) XXX_Unmarshal

func (m *PublicKeyRequest) XXX_Unmarshal(b []byte) error

type PublicKeyResponse

type PublicKeyResponse struct {
	// The key
	Key                  *PublicKeyResponse_Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

Response message for [AzureDKEKeyManagementService.GetPublicKey][].

func (*PublicKeyResponse) Descriptor

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

func (*PublicKeyResponse) GetKey

func (*PublicKeyResponse) ProtoMessage

func (*PublicKeyResponse) ProtoMessage()

func (*PublicKeyResponse) Reset

func (m *PublicKeyResponse) Reset()

func (*PublicKeyResponse) String

func (m *PublicKeyResponse) String() string

func (*PublicKeyResponse) XXX_DiscardUnknown

func (m *PublicKeyResponse) XXX_DiscardUnknown()

func (*PublicKeyResponse) XXX_Marshal

func (m *PublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PublicKeyResponse) XXX_Merge

func (m *PublicKeyResponse) XXX_Merge(src proto.Message)

func (*PublicKeyResponse) XXX_Size

func (m *PublicKeyResponse) XXX_Size() int

func (*PublicKeyResponse) XXX_Unmarshal

func (m *PublicKeyResponse) XXX_Unmarshal(b []byte) error

type PublicKeyResponse_Key

type PublicKeyResponse_Key struct {
	// Key type
	Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"`
	// Modulus
	N []byte `protobuf:"bytes,2,opt,name=n,proto3" json:"n,omitempty"`
	// Key exponent (typically 65537)
	E int32 `protobuf:"varint,3,opt,name=e,proto3" json:"e,omitempty"`
	// Algorithm
	Alg string `protobuf:"bytes,4,opt,name=alg,proto3" json:"alg,omitempty"`
	// Key ID
	Kid                  string   `protobuf:"bytes,5,opt,name=kid,proto3" json:"kid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Key information

func (*PublicKeyResponse_Key) Descriptor

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

func (*PublicKeyResponse_Key) GetAlg

func (m *PublicKeyResponse_Key) GetAlg() string

func (*PublicKeyResponse_Key) GetE

func (m *PublicKeyResponse_Key) GetE() int32

func (*PublicKeyResponse_Key) GetKid

func (m *PublicKeyResponse_Key) GetKid() string

func (*PublicKeyResponse_Key) GetKty

func (m *PublicKeyResponse_Key) GetKty() string

func (*PublicKeyResponse_Key) GetN

func (m *PublicKeyResponse_Key) GetN() []byte

func (*PublicKeyResponse_Key) ProtoMessage

func (*PublicKeyResponse_Key) ProtoMessage()

func (*PublicKeyResponse_Key) Reset

func (m *PublicKeyResponse_Key) Reset()

func (*PublicKeyResponse_Key) String

func (m *PublicKeyResponse_Key) String() string

func (*PublicKeyResponse_Key) XXX_DiscardUnknown

func (m *PublicKeyResponse_Key) XXX_DiscardUnknown()

func (*PublicKeyResponse_Key) XXX_Marshal

func (m *PublicKeyResponse_Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PublicKeyResponse_Key) XXX_Merge

func (m *PublicKeyResponse_Key) XXX_Merge(src proto.Message)

func (*PublicKeyResponse_Key) XXX_Size

func (m *PublicKeyResponse_Key) XXX_Size() int

func (*PublicKeyResponse_Key) XXX_Unmarshal

func (m *PublicKeyResponse_Key) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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