Documentation ¶
Overview ¶
Package provider is a generated GoMock package.
Package provider is a generated GoMock package.
Index ¶
- type CloudKMSClient
- type CloudKMSSignatureProvider
- type MockCloudKMSClient
- func (m *MockCloudKMSClient) AsymmetricSign(arg0 context.Context, arg1 *kmspb.AsymmetricSignRequest, ...) (*kmspb.AsymmetricSignResponse, error)
- func (m *MockCloudKMSClient) EXPECT() *MockCloudKMSClientMockRecorder
- func (m *MockCloudKMSClient) GetPublicKey(arg0 context.Context, arg1 *kmspb.GetPublicKeyRequest, arg2 ...gax.CallOption) (*kmspb.PublicKey, error)
- type MockCloudKMSClientMockRecorder
- type MockSignatureProvider
- type MockSignatureProviderMockRecorder
- type SignatureProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudKMSClient ¶
type CloudKMSClient interface { GetPublicKey(ctx context.Context, req *kmspb.GetPublicKeyRequest, opts ...gax.CallOption) (*kmspb.PublicKey, error) AsymmetricSign(context context.Context, req *kmspb.AsymmetricSignRequest, opts ...gax.CallOption) (*kmspb.AsymmetricSignResponse, error) }
type CloudKMSSignatureProvider ¶
type CloudKMSSignatureProvider struct {
// contains filtered or unexported fields
}
func (*CloudKMSSignatureProvider) GetPublicKey ¶
func (c *CloudKMSSignatureProvider) GetPublicKey( ctx context.Context, keyName string, ) ([]byte, error)
GetPublicKey returns a decoded secp256k1 public key.
func (*CloudKMSSignatureProvider) SignDigest ¶
func (c *CloudKMSSignatureProvider) SignDigest( ctx context.Context, keyName string, digest []byte, ) ([]byte, error)
SignDigest signs the digest with a given Cloud KMS keyname and returns a compact recoverable signature. If the keyName provided is not a EC_SIGN_SECP256K1_SHA256 key, the result will be an error.
type MockCloudKMSClient ¶
type MockCloudKMSClient struct {
// contains filtered or unexported fields
}
MockCloudKMSClient is a mock of CloudKMSClient interface.
func NewMockCloudKMSClient ¶
func NewMockCloudKMSClient(ctrl *gomock.Controller) *MockCloudKMSClient
NewMockCloudKMSClient creates a new mock instance.
func (*MockCloudKMSClient) AsymmetricSign ¶
func (m *MockCloudKMSClient) AsymmetricSign(arg0 context.Context, arg1 *kmspb.AsymmetricSignRequest, arg2 ...gax.CallOption) (*kmspb.AsymmetricSignResponse, error)
AsymmetricSign mocks base method.
func (*MockCloudKMSClient) EXPECT ¶
func (m *MockCloudKMSClient) EXPECT() *MockCloudKMSClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCloudKMSClient) GetPublicKey ¶
func (m *MockCloudKMSClient) GetPublicKey(arg0 context.Context, arg1 *kmspb.GetPublicKeyRequest, arg2 ...gax.CallOption) (*kmspb.PublicKey, error)
GetPublicKey mocks base method.
type MockCloudKMSClientMockRecorder ¶
type MockCloudKMSClientMockRecorder struct {
// contains filtered or unexported fields
}
MockCloudKMSClientMockRecorder is the mock recorder for MockCloudKMSClient.
func (*MockCloudKMSClientMockRecorder) AsymmetricSign ¶
func (mr *MockCloudKMSClientMockRecorder) AsymmetricSign(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
AsymmetricSign indicates an expected call of AsymmetricSign.
func (*MockCloudKMSClientMockRecorder) GetPublicKey ¶
func (mr *MockCloudKMSClientMockRecorder) GetPublicKey(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
GetPublicKey indicates an expected call of GetPublicKey.
type MockSignatureProvider ¶
type MockSignatureProvider struct {
// contains filtered or unexported fields
}
MockSignatureProvider is a mock of SignatureProvider interface.
func NewMockSignatureProvider ¶
func NewMockSignatureProvider(ctrl *gomock.Controller) *MockSignatureProvider
NewMockSignatureProvider creates a new mock instance.
func (*MockSignatureProvider) EXPECT ¶
func (m *MockSignatureProvider) EXPECT() *MockSignatureProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSignatureProvider) GetPublicKey ¶
GetPublicKey mocks base method.
func (*MockSignatureProvider) SignDigest ¶
func (m *MockSignatureProvider) SignDigest(arg0 context.Context, arg1 string, arg2 []byte) ([]byte, error)
SignDigest mocks base method.
type MockSignatureProviderMockRecorder ¶
type MockSignatureProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockSignatureProviderMockRecorder is the mock recorder for MockSignatureProvider.
func (*MockSignatureProviderMockRecorder) GetPublicKey ¶
func (mr *MockSignatureProviderMockRecorder) GetPublicKey(arg0, arg1 interface{}) *gomock.Call
GetPublicKey indicates an expected call of GetPublicKey.
func (*MockSignatureProviderMockRecorder) SignDigest ¶
func (mr *MockSignatureProviderMockRecorder) SignDigest(arg0, arg1, arg2 interface{}) *gomock.Call
SignDigest indicates an expected call of SignDigest.
type SignatureProvider ¶
type SignatureProvider interface { SignDigest(ctx context.Context, keyName string, digest []byte) ([]byte, error) GetPublicKey(ctx context.Context, keyName string) ([]byte, error) }
func NewCloudKMSSignatureProvider ¶
func NewCloudKMSSignatureProvider(logger log.Logger) SignatureProvider
func NewCloudKMSSignatureProviderWithClient ¶
func NewCloudKMSSignatureProviderWithClient(logger log.Logger, client CloudKMSClient) SignatureProvider