Documentation
¶
Index ¶
- Variables
- func CacheFile() string
- func CacheKey(cst CacheStorageType, ao gophercloud.AuthOptions) (string, error)
- func Do(ctx context.Context, authOptions gophercloud.AuthOptions, noRegionPrefix bool) (*v1.ExecCredential, error)
- func FileExists(path string) bool
- type CacheStorageType
- type ExecCredentialReadWriter
- type ExpiredCachedExecCredentialError
- type FileStorageExecCredentialCache
- type KeyringStorageExecCredentialCache
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCacheKeyNotFound = errors.New("cache key not found") AuthenticatedClientFunc func(ctx context.Context, options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error) = openstack.AuthenticatedClient )
Functions ¶
func CacheKey ¶
func CacheKey(cst CacheStorageType, ao gophercloud.AuthOptions) (string, error)
func Do ¶
func Do(ctx context.Context, authOptions gophercloud.AuthOptions, noRegionPrefix bool) (*v1.ExecCredential, error)
func FileExists ¶
FileExists returns true if the given path exists in the file system
Types ¶
type CacheStorageType ¶
type CacheStorageType string
const ( // StorageDisk stores cached ExecCredential on file. FileStorage CacheStorageType = "file" // KeyringStorage stores cached ExecCredential in the OS keyring. KeyringStorage CacheStorageType = "keyring" )
type ExecCredentialReadWriter ¶
type ExecCredentialReadWriter interface {
Read(key string) (*v1.ExecCredential, error)
Write(key string, ec *v1.ExecCredential) error
}
func NewExecCredentialReadWriter ¶
func NewExecCredentialReadWriter(cst CacheStorageType) (ExecCredentialReadWriter, error)
type ExpiredCachedExecCredentialError ¶
type ExpiredCachedExecCredentialError struct {
// contains filtered or unexported fields
}
func (*ExpiredCachedExecCredentialError) Error ¶
func (e *ExpiredCachedExecCredentialError) Error() string
type FileStorageExecCredentialCache ¶
type FileStorageExecCredentialCache struct {
}
func (*FileStorageExecCredentialCache) Read ¶
func (c *FileStorageExecCredentialCache) Read(key string) (*v1.ExecCredential, error)
func (*FileStorageExecCredentialCache) Write ¶
func (c *FileStorageExecCredentialCache) Write(key string, ec *v1.ExecCredential) error
type KeyringStorageExecCredentialCache ¶
type KeyringStorageExecCredentialCache struct {
}
Click to show internal directories.
Click to hide internal directories.