crdstore

package
v0.0.0-...-d88ec87 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCredentialsStoreName string

DefaultCredentialsStoreName holds the default CredentialsStore name

View Source
var ErrCredentialsNotFound = errors.New("credentials not found")

ErrCredentialsNotFound - Credential for given accessKey and backend haven't been found in yaml file

Functions

func InitializeCredentialsStores

func InitializeCredentialsStores(storeMap config.CredentialsStoreMap)

InitializeCredentialsStores - Constructor for CredentialsStores

Types

type BalancedVaultClient

type BalancedVaultClient struct {
	balancing.ResponseTimeBalancer
}

func (*BalancedVaultClient) FetchCredentials

func (bvc *BalancedVaultClient) FetchCredentials(accessKey, storageName string) (*CredentialsStoreData, error)

type CredentialsBackend

type CredentialsBackend interface {
	FetchCredentials(accessKey string, storageName string) (*CredentialsStoreData, error)
}

CredentialsBackend is responsible for holding storage credentials

type CredentialsStore

type CredentialsStore struct {
	TTL time.Duration
	// contains filtered or unexported fields
}

CredentialsStore - gets a caches credentials from akubra-crdstore

func GetInstance

func GetInstance(crdBackendName string) (instance *CredentialsStore, err error)

GetInstance - Get crdstore instance by store's name

func (*CredentialsStore) Get

func (cs *CredentialsStore) Get(accessKey, backend string) (csd *CredentialsStoreData, err error)

Get - Gets key from cache or from akubra-crdstore if TTL has expired

type CredentialsStoreData

type CredentialsStoreData struct {
	AccessKey string    `json:"access"`
	SecretKey string    `json:"secret"`
	EOL       time.Time `json:"-"`
	// contains filtered or unexported fields
}

CredentialsStoreData - stores single access-secret key pair with EOL(TTL)

func (*CredentialsStoreData) Unmarshal

func (csd *CredentialsStoreData) Unmarshal(credentials []byte) error

Unmarshal - Unmarshal CredentialsStoreData to json

type MeasuredVaultClient

type MeasuredVaultClient struct {
	balancing.Node
	balancing.Breaker
	Name string
	// contains filtered or unexported fields
}

func (*MeasuredVaultClient) FetchCredentials

func (mvc *MeasuredVaultClient) FetchCredentials(accessKey, storageName string) (*CredentialsStoreData, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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