Documentation ¶
Overview ¶
Package cloudkms provides a Google Cloud Key Management Service (KMS) implementation of the crypto.Signer interface.
The documentation for Google Cloud KMS can be found here: https://cloud.google.com/kms/docs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for interacting with the Google Cloud KMS API using types native to the Flow Go SDK.
func (*Client) GetPublicKey ¶
func (c *Client) GetPublicKey(ctx context.Context, key Key) (crypto.PublicKey, crypto.HashAlgorithm, error)
GetPublicKey fetches the public key portion of a KMS asymmetric signing key version.
ECDSA_P256 is currently the only Flow signature algorithm supported by Google Cloud KMS.
type Key ¶
type Key struct { ProjectID string `json:"projectId"` LocationID string `json:"locationId"` KeyRingID string `json:"keyRingId"` KeyID string `json:"keyId"` KeyVersion string `json:"keyVersion"` }
Key is a reference to a Google Cloud KMS asymmetric signing key version.
Ref: https://cloud.google.com/kms/docs/creating-asymmetric-keys#create_an_asymmetric_signing_key
func KeyFromResourceID ¶
func (Key) ResourceID ¶
ResourceID returns the resource ID for this KMS key version.