Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserHomeDir ¶
func UserHomeDir() string
Types ¶
type ConfigFileProvider ¶
type ConfigFileProvider struct { // Path to the ncloud configure file. // The default is the current user's home directory. // Linux/OSX: "$HOME/.ncloud/configure" // Windows: "%USERPROFILE%\.ncloud\configure" Filename string // contains filtered or unexported fields }
file example: $HOME/.ncloud/configure
func (*ConfigFileProvider) Name ¶
func (p *ConfigFileProvider) Name() string
func (*ConfigFileProvider) Retrieve ¶
func (p *ConfigFileProvider) Retrieve() (Value, error)
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
func LoadCredentials ¶
func LoadCredentials(providers []Provider) *Credentials
func NewValueProviderCreds ¶
func NewValueProviderCreds(accessKey, secretKey string) *Credentials
func (*Credentials) AccessKey ¶
func (c *Credentials) AccessKey() string
func (*Credentials) IsExpired ¶
func (c *Credentials) IsExpired() bool
IsExpired returns if the credentials are expired.
func (*Credentials) ProviderName ¶
func (c *Credentials) ProviderName() string
func (*Credentials) Retrieve ¶
func (c *Credentials) Retrieve() *Credentials
func (*Credentials) SecretKey ¶
func (c *Credentials) SecretKey() string
func (*Credentials) Valid ¶
func (c *Credentials) Valid() bool
type EnvProvider ¶
type EnvProvider struct {
// contains filtered or unexported fields
}
func (*EnvProvider) IsExpired ¶
func (p *EnvProvider) IsExpired() bool
IsExpired returns if the credentials have been retrieved.
func (*EnvProvider) Name ¶
func (p *EnvProvider) Name() string
func (*EnvProvider) Retrieve ¶
func (p *EnvProvider) Retrieve() (Value, error)
Retrieve retrieves the keys from the environment.
type Provider ¶
type Provider interface { // Retrieve returns nil if it successfully retrieved the value. // Error is returned if the value were not obtainable, or empty. Retrieve() (Value, error) // Name provider name Name() string }
func DefaultCredentialsChain ¶
func DefaultCredentialsChain() []Provider
type ServerRoleProvider ¶
func (*ServerRoleProvider) Name ¶
func (p *ServerRoleProvider) Name() string
func (*ServerRoleProvider) Retrieve ¶
func (p *ServerRoleProvider) Retrieve() (Value, error)
type ValueProvider ¶
type ValueProvider struct {
// contains filtered or unexported fields
}
func NewValueProvider ¶
func NewValueProvider(accessKey, secretKey string) *ValueProvider
func (*ValueProvider) Name ¶
func (p *ValueProvider) Name() string
func (*ValueProvider) Retrieve ¶
func (p *ValueProvider) Retrieve() (Value, error)
Click to show internal directories.
Click to hide internal directories.