secretstorage

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Get retrieves a CaraML secret from the secret storage
	Get(name string, project string) (string, error)
	// Set creates or updates a CaraML secret in the secret storage
	Set(name string, secretValue string, project string) error
	// List lists all CaraML secrets in the secret storage
	List(project string) (map[string]string, error)
	// SetAll creates or updates all CaraML secrets of a project in the secret storage
	SetAll(secrets map[string]string, project string) error
	// Delete deletes a CaraML secret from the secret storage
	Delete(name string, project string) error
	// DeleteAll deletes all CaraML secrets from the secret storage
	DeleteAll(project string) error
}

func NewClient

func NewClient(ss *models.SecretStorage) (Client, error)

NewClient creates a new secret storage client

func NewVaultSecretStorageClient

func NewVaultSecretStorageClient(ss *models.SecretStorage) (Client, error)

NewVaultSecretStorageClient creates a new secret storage client backed by Vault

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(secretStorages []*models.SecretStorage) (*Registry, error)

func (*Registry) Get

func (r *Registry) Get(secretStorageID models.ID) (Client, bool)

func (*Registry) Set

func (r *Registry) Set(secretStorageID models.ID, client Client)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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