local

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialsCompatibilier

type CredentialsCompatibilier interface {
	CheckCompatibility(credential *credentials.Credential) error
}

type Encrypter

type Encrypter interface {
	Encrypt(text string) (string, error)
	Decrypt(ciphertext string) (string, error)
}

type LocalStore

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

LocalStore is a local store for credentials

func NewLocalStore

func NewLocalStore(opts ...OptionsFunc) *LocalStore

NewLocalStore creates a new local store for credentials

func (*LocalStore) All

func (s *LocalStore) All() ([]*credentials.Credential, error)

All returns all credentials from the store

func (*LocalStore) Get

func (s *LocalStore) Get(id string) (*credentials.Credential, error)

Get returns a auth for the credential id

func (*LocalStore) Options

func (s *LocalStore) Options(opts ...OptionsFunc)

Options provides the options to envvars credentials store

func (*LocalStore) SafeStore

func (s *LocalStore) SafeStore(id string, credential *credentials.Credential) error

func (*LocalStore) Store

func (s *LocalStore) Store(id string, credential *credentials.Credential) (err error)

Store save a credential in the local store

type LocalStoreWithSafeStore

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

LocalStoreWithSafeStore is a local store for credentials

func NewLocalStoreWithSafeStore

func NewLocalStoreWithSafeStore(opts ...OptionsFunc) *LocalStoreWithSafeStore

NewLocalStoreWithSafeStore creates a new local store for credentials

func (*LocalStoreWithSafeStore) Store

func (s *LocalStoreWithSafeStore) Store(id string, credential *credentials.Credential) error

type OptionsFunc

type OptionsFunc func(opts *LocalStore)

OptionsFunc defines the signature for an option function to set local credentials store

func WithCompatibility

func WithCompatibility(compatibility CredentialsCompatibilier) OptionsFunc

func WithEncryption

func WithEncryption(e Encrypter) OptionsFunc

func WithFilesystem

func WithFilesystem(fs afero.Fs) OptionsFunc

func WithFormater

func WithFormater(formater repository.Formater) OptionsFunc

WithFormater sets the formater to envvars credentials store

func WithPath

func WithPath(path string) OptionsFunc

Jump to

Keyboard shortcuts

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