secrets

package
v1.16.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSecretsProvider

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

AWSSecretsProvider is a provider for AWS Secrets Manager

func NewAWSSecretsProvider

func NewAWSSecretsProvider(accessKeyID, secretAccessKey, region string) (*AWSSecretsProvider, error)

NewAWSSecretsProvider creates a new instance of AWSSecretsProvider

func (*AWSSecretsProvider) Get

func (p *AWSSecretsProvider) Get(key string) (string, error)

Get gets a secret from AWS Secrets Manager

type AnsibleVaultProvider added in v1.8.0

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

AnsibleVaultProvider is a provider for ansible-vault files

func NewAnsibleVaultProvider added in v1.8.0

func NewAnsibleVaultProvider(vaultPath, secret string) (*AnsibleVaultProvider, error)

NewAnsibleVaultProvider creates a new instance of AnsibleVaultProvider

func (*AnsibleVaultProvider) Get added in v1.8.0

func (p *AnsibleVaultProvider) Get(key string) (string, error)

Get decrypted data from ansible-vault file

type HashiVaultProvider

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

HashiVaultProvider is a provider for HashiCorp Vault

func NewHashiVaultProvider

func NewHashiVaultProvider(addr, path, token string) (*HashiVaultProvider, error)

NewHashiVaultProvider creates a new HashiCorp Vault provider

func (*HashiVaultProvider) Get

func (p *HashiVaultProvider) Get(key string) (string, error)

Get gets a secret from HashiCorp Vault

type InternalProvider

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

InternalProvider is a secret provider that stores secrets in a database, encrypted. supported database types: sqlite, postgres, mysql

func NewInternalProvider

func NewInternalProvider(conn string, key []byte) (*InternalProvider, error)

NewInternalProvider creates a new InternalProvider.

func (*InternalProvider) Delete

func (p *InternalProvider) Delete(key string) error

Delete removes a secret from the database.

func (*InternalProvider) Get

func (p *InternalProvider) Get(key string) (string, error)

Get retrieves a secret from the database, decrypts it, and returns it.

func (*InternalProvider) List

func (p *InternalProvider) List(prefix string) ([]string, error)

List retrieves a list of secret keys from the database with an optional prefix filter.

func (*InternalProvider) Set

func (p *InternalProvider) Set(key, value string) error

Set stores a secret in the database, encrypted.

type MemoryProvider added in v0.14.4

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

MemoryProvider is a secret provider that stores secrets in memory. Not recommended for production use, made for testing purposes.

func NewMemoryProvider added in v0.14.4

func NewMemoryProvider(secrets map[string]string) *MemoryProvider

NewMemoryProvider creates a new MemoryProvider with the given secrets.

func (*MemoryProvider) Get added in v0.14.4

func (m *MemoryProvider) Get(key string) (string, error)

Get returns the secret for the given key.

type NoOpProvider

type NoOpProvider struct{}

NoOpProvider is a provider that does nothing.

func (*NoOpProvider) Get

func (p *NoOpProvider) Get(_ string) (string, error)

Get returns an error on every key.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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