Documentation ¶
Index ¶
- type CredentialsCompatibilier
- type Encrypter
- type LocalStore
- func (s *LocalStore) All() ([]*credentials.Credential, error)
- func (s *LocalStore) Get(id string) (*credentials.Credential, error)
- func (s *LocalStore) Options(opts ...OptionsFunc)
- func (s *LocalStore) SafeStore(id string, credential *credentials.Credential) error
- func (s *LocalStore) Store(id string, credential *credentials.Credential) (err error)
- type LocalStoreWithSafeStore
- type OptionsFunc
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 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
Click to show internal directories.
Click to hide internal directories.