gcpsigner

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package gcpsigner utilizes the Key Management Service (KMS) from the Google Cloud Platform (GCP).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManagedKey

func NewManagedKey(ctx context.Context, client KeyClient, keyName string) (signer.Signer, error)

NewManagedKey executes a fail-fast initialization. Key names from the Google cloud are slash-separated paths.

Types

type KeyClient

type KeyClient interface {
	// GetPublicKey gets the public key for the given key name.
	GetPublicKey(context.Context, *kmspb.GetPublicKeyRequest, ...gax.CallOption) (*kmspb.PublicKey, error)
	// AsymmetricSign signs the given data using the given key name.
	AsymmetricSign(context.Context, *kmspb.AsymmetricSignRequest, ...gax.CallOption) (*kmspb.AsymmetricSignResponse, error)
}

KeyClient defines the interface for a GCP Key Management Service client.

Directories

Path Synopsis
Package gcpmock provides a mock client for testing purposes.
Package gcpmock provides a mock client for testing purposes.

Jump to

Keyboard shortcuts

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