secretmanager

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const VersionID = "version_id"

Variables

This section is empty.

Functions

func NewSecreteManager

func NewSecreteManager(logger logger.Logger) secretstores.SecretStore

NewSecreteManager returns new instance of `SecretManagerStore`.

Types

type GcpSecretManagerMetadata added in v1.10.1

type GcpSecretManagerMetadata struct {
	// Ignored by metadata parser because included in built-in authentication profile
	Type                string `json:"type" mapstructure:"type" mdignore:"true"`
	ProjectID           string `json:"project_id" mapstructure:"projectID" mdignore:"true" mapstructurealiases:"project_id"`
	PrivateKeyID        string `json:"private_key_id" mapstructure:"privateKeyID" mdignore:"true" mapstructurealiases:"private_key_id"`
	PrivateKey          string `json:"private_key" mapstructure:"privateKey" mdignore:"true" mapstructurealiases:"private_key"`
	ClientEmail         string `json:"client_email" mapstructure:"clientEmail" mdignore:"true" mapstructurealiases:"client_email"`
	ClientID            string `json:"client_id" mapstructure:"clientID" mdignore:"true" mapstructurealiases:"client_id"`
	AuthURI             string `json:"auth_uri" mapstructure:"authURI" mdignore:"true" mapstructurealiases:"auth_uri"`
	TokenURI            string `json:"token_uri" mapstructure:"tokenURI" mdignore:"true" mapstructurealiases:"token_uri"`
	AuthProviderCertURL string `` /* 139-byte string literal not displayed */
	ClientCertURL       string `json:"client_x509_cert_url" mapstructure:"clientX509CertURL" mdignore:"true" mapstructurealiases:"client_x509_cert_url"`
}

type Store

type Store struct {
	ProjectID string
	// contains filtered or unexported fields
}

Store contains and GCP secret manager client and project id.

func (*Store) BulkGetSecret added in v1.0.0

BulkGetSecret retrieves all secrets in the store and returns a map of decrypted string/string values.

func (*Store) Close added in v1.10.1

func (s *Store) Close() error

func (*Store) Features added in v1.9.0

func (s *Store) Features() []secretstores.Feature

Features returns the features available in this secret store.

func (*Store) GetComponentMetadata added in v1.10.1

func (s *Store) GetComponentMetadata() (metadataInfo metadata.MetadataMap)

func (*Store) GetSecret

GetSecret retrieves a secret using a key and returns a map of decrypted string.

func (*Store) Init

func (s *Store) Init(ctx context.Context, metadataRaw secretstores.Metadata) error

Init creates a GCP secret manager client.

Jump to

Keyboard shortcuts

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