stores

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvStoreProtocol added in v0.8.0

type EnvStoreProtocol interface {
	GetToken(variable string) (string, error)
}

type FileStore

type FileStore struct{}

File store implementation to fetch token from file

func (*FileStore) GetToken

func (s *FileStore) GetToken(path string) (string, error)

type FileStoreMock added in v0.8.0

type FileStoreMock struct {
	Token string
}

func (*FileStoreMock) GetToken added in v0.8.0

func (k *FileStoreMock) GetToken(path string) (string, error)

type FileStoreProtocol added in v0.8.0

type FileStoreProtocol interface {
	GetToken(path string) (string, error)
}

A store expose the GetToken() method This method may return an error

type KeyVault

type KeyVault struct{}

Azure Keyvault store implementation to fetch token from azure keyvault

func (*KeyVault) GetToken

func (k *KeyVault) GetToken(uri string, secret string) (string, error)

type KeyVaultMock

type KeyVaultMock struct {
	Token string
}

func (*KeyVaultMock) GetToken

func (k *KeyVaultMock) GetToken(uri string, secret string) (string, error)

type KeyvaultStoreProtocol added in v0.8.0

type KeyvaultStoreProtocol interface {
	GetToken(uri string, secret string) (string, error)
}

type Stores

type Stores struct {
	Files    FileStoreProtocol
	Keyvault KeyvaultStoreProtocol
}

Stores used to find DNS auth token

func DefaultStores

func DefaultStores() Stores

Default stores

func TestStores added in v0.8.0

func TestStores(token string) Stores

Stores used in tests

func (*Stores) GetFileStore

func (s *Stores) GetFileStore() FileStoreProtocol

Access the file store

func (*Stores) GetKeyvaultStore

func (s *Stores) GetKeyvaultStore() KeyvaultStoreProtocol

Access the keyvault store

Jump to

Keyboard shortcuts

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