gcpsigner

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package gcpsigner utilizes the Key Management Service (KMS) from the Google Cloud Platform (GCP). this package is loosely based on https://pkg.go.dev/github.com/pascaldekloe/etherkeyms

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