crdstore

package
v0.0.0-...-e6f4ba9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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 InitializeCredentialsStore

func InitializeCredentialsStore(storeMap config.CredentialsStoreMap)

InitializeCredentialsStore - Constructor for CredentialsStore

Types

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(endpointName string) (instance *CredentialsStore, err error)

GetInstance - Get crdstore instance for endpoint

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

func (*CredentialsStore) GetFromService

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

GetFromService - Get Credential akubra-crdstore service

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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