secrets

package
v2.0.0-...-d6aa69e Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAwsSession

func NewAwsSession() *session.Session

NewAwsSession returns a session singleton

Types

type EscapeProvider

type EscapeProvider struct{}

EscapeProvider is a provider that returns the value with the prefix "\" removed

func (*EscapeProvider) GetSecret

func (s *EscapeProvider) GetSecret(name string) (string, error)

GetSecret returns the resolved value

type GetProviderFunction

type GetProviderFunction func(string) Provider

GetProviderFunction is a function that returns a provider

type PassThruProvider

type PassThruProvider struct{}

PassThruProvider is a provider that simply returns the value

func (*PassThruProvider) GetSecret

func (s *PassThruProvider) GetSecret(name string) (string, error)

GetSecret returns the resolved value

type Provider

type Provider interface {
	GetSecret(string) (string, error)
}

Provider defines an interface for retrieving a secret

func GetProvider

func GetProvider(key string) Provider

GetProvider returns a secret provider based on the prefix of the value

type SSMProvider

type SSMProvider struct {
	Client ssmiface.SSMAPI
}

SSMProvider implements an SSM secrets provider

func NewSSMProvider

func NewSSMProvider() *SSMProvider

NewSSMProvider returns an initialised SSM provider singleton

func (*SSMProvider) GetSecret

func (s *SSMProvider) GetSecret(name string) (string, error)

GetSecret returns the resolved value of an SSM key

type SecretsManagerProvider

type SecretsManagerProvider struct {
	Client secretsmanageriface.SecretsManagerAPI
}

SecretsManagerProvider implements an SSM secrets provider

func NewSecretsManagerProvider

func NewSecretsManagerProvider() *SecretsManagerProvider

NewSecretsManagerProvider returns an initialised SSM provider

func (*SecretsManagerProvider) GetSecret

func (s *SecretsManagerProvider) GetSecret(name string) (string, error)

GetSecret returns the resolved value of an SSM key

Jump to

Keyboard shortcuts

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