Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleWriter ¶
type ConsoleWriter interface { Info(msg ...interface{}) Warn(msg ...interface{}) Error(msg ...interface{}) Debug(msg ...interface{}) }
type EnvvarsBackender ¶
type EnvvarsStore ¶
type EnvvarsStore struct {
// contains filtered or unexported fields
}
EnvvarsStore is a store for credentials
func NewEnvvarsStore ¶
func NewEnvvarsStore(opts ...OptionsFunc) *EnvvarsStore
NewEnvvarsStore creates a new mocked store for credentials
func (*EnvvarsStore) All ¶
func (s *EnvvarsStore) All() ([]*credentials.Credential, error)
All returns all credentials
func (*EnvvarsStore) Get ¶
func (s *EnvvarsStore) Get(id string) (*credentials.Credential, error)
Get returns a auth for the credential id
func (*EnvvarsStore) Options ¶
func (s *EnvvarsStore) Options(opts ...OptionsFunc)
Options provides the options to envvars credentials store
func (*EnvvarsStore) Store ¶
func (s *EnvvarsStore) Store(id string, credential *credentials.Credential) error
Store stores a credential
type OptionsFunc ¶
type OptionsFunc func(opts *EnvvarsStore)
OptionsFunc defines the signature for an option function to set envvars credentials store
func WithBackend ¶
func WithBackend(backend EnvvarsBackender) OptionsFunc
WithBackend sets the writer to envvars credentials store
func WithConsole ¶
func WithConsole(console ConsoleWriter) OptionsFunc
WithConsole sets the writer to envvars credentials store
func WithEncryption ¶
func WithEncryption(e Encrypter) OptionsFunc
func WithFormater ¶
func WithFormater(formater repository.Formater) OptionsFunc
WithFormater sets the formater to envvars credentials store
Click to show internal directories.
Click to hide internal directories.