stores

package
v0.0.0-...-7295de5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

type FileStoreMock struct {
	Token string
}

func (*FileStoreMock) GetToken

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

type FileStoreProtocol

type FileStoreProtocol interface {
	GetToken(path string) (string, 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

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

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