pbk

package
v0.0.0-...-15e8950 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SignResponse_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCEEDED",
		2: "DENIED",
		3: "FAILED",
	}
	SignResponse_Status_value = map[string]int32{
		"UNKNOWN":   0,
		"SUCCEEDED": 1,
		"DENIED":    2,
		"FAILED":    3,
	}
)

Enum value maps for SignResponse_Status.

View Source
var File_keymanager_keymanager_proto protoreflect.FileDescriptor

Functions

func RegisterKeyManagerServer

func RegisterKeyManagerServer(s *grpc.Server, srv KeyManagerServer)

Types

type KeyManagerClient

type KeyManagerClient interface {
	// Fetch public keys managed by server.
	ListPublicKeys(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error)
	// Sign a request via gRPC.
	Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error)
}

KeyManagerClient is the client API for KeyManager service.

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

func NewKeyManagerClient

func NewKeyManagerClient(cc grpc.ClientConnInterface) KeyManagerClient

type KeyManagerServer

type KeyManagerServer interface {
	// Fetch public keys managed by server.
	ListPublicKeys(context.Context, *emptypb.Empty) (*ListPublicKeysResponse, error)
	// Sign a request via gRPC.
	Sign(context.Context, *SignRequest) (*SignResponse, error)
}

KeyManagerServer is the server API for KeyManager service.

type ListPublicKeysResponse

type ListPublicKeysResponse struct {

	// List of 48-byte, BLS12-381 public keys.
	PublicKeys [][]byte `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`
	// contains filtered or unexported fields
}

ListPublicKeysResponse contains public keys for the secrets managed by the remote key manager server.

func (*ListPublicKeysResponse) Descriptor deprecated

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

Deprecated: Use ListPublicKeysResponse.ProtoReflect.Descriptor instead.

func (*ListPublicKeysResponse) GetPublicKeys

func (x *ListPublicKeysResponse) GetPublicKeys() [][]byte

func (*ListPublicKeysResponse) ProtoMessage

func (*ListPublicKeysResponse) ProtoMessage()

func (*ListPublicKeysResponse) ProtoReflect

func (x *ListPublicKeysResponse) ProtoReflect() protoreflect.Message

func (*ListPublicKeysResponse) Reset

func (x *ListPublicKeysResponse) Reset()

func (*ListPublicKeysResponse) String

func (x *ListPublicKeysResponse) String() string

type SignRequest

type SignRequest struct {

	// 48-byte public key corresponding to an associated secret key
	// being requested to sign data.
	PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// 32-byte hash of raw data the client is requesting to sign.
	Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

SignRequest is a message type that requests for signing of the given hash.

func (*SignRequest) Descriptor deprecated

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

Deprecated: Use SignRequest.ProtoReflect.Descriptor instead.

func (*SignRequest) GetHash

func (x *SignRequest) GetHash() []byte

func (*SignRequest) GetPublicKey

func (x *SignRequest) GetPublicKey() []byte

func (*SignRequest) ProtoMessage

func (*SignRequest) ProtoMessage()

func (*SignRequest) ProtoReflect

func (x *SignRequest) ProtoReflect() protoreflect.Message

func (*SignRequest) Reset

func (x *SignRequest) Reset()

func (*SignRequest) String

func (x *SignRequest) String() string

type SignResponse

type SignResponse struct {

	// BLS12-381 signature for the hash specified in the request.
	Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// Status of the signing response, standardized as an enum
	// to ensure different remote signing servers follow the
	// same conventions.
	Status SignResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=photon.keymanager.SignResponse_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

SignResponse returned by a KeyManager gRPC service.

func (*SignResponse) Descriptor deprecated

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

Deprecated: Use SignResponse.ProtoReflect.Descriptor instead.

func (*SignResponse) GetSignature

func (x *SignResponse) GetSignature() []byte

func (*SignResponse) GetStatus

func (x *SignResponse) GetStatus() SignResponse_Status

func (*SignResponse) ProtoMessage

func (*SignResponse) ProtoMessage()

func (*SignResponse) ProtoReflect

func (x *SignResponse) ProtoReflect() protoreflect.Message

func (*SignResponse) Reset

func (x *SignResponse) Reset()

func (*SignResponse) String

func (x *SignResponse) String() string

type SignResponse_Status

type SignResponse_Status int32
const (
	SignResponse_UNKNOWN   SignResponse_Status = 0
	SignResponse_SUCCEEDED SignResponse_Status = 1
	SignResponse_DENIED    SignResponse_Status = 2
	SignResponse_FAILED    SignResponse_Status = 3
)

func (SignResponse_Status) Descriptor

func (SignResponse_Status) Enum

func (SignResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use SignResponse_Status.Descriptor instead.

func (SignResponse_Status) Number

func (SignResponse_Status) String

func (x SignResponse_Status) String() string

func (SignResponse_Status) Type

type UnimplementedKeyManagerServer

type UnimplementedKeyManagerServer struct {
}

UnimplementedKeyManagerServer can be embedded to have forward compatible implementations.

func (*UnimplementedKeyManagerServer) ListPublicKeys

func (*UnimplementedKeyManagerServer) Sign

Jump to

Keyboard shortcuts

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