Documentation
¶
Index ¶
- Variables
- func HasTokenFor(profileName string) bool
- func LoadToken(opts TokenOptions) (string, error)
- func LoadTokenFor(profileName string, opts TokenOptions) (string, error)
- func RemoveTokenFor(profileName string) error
- func SaveToken(token string) error
- func SaveTokenFor(profileName, token string) error
- type TokenOptions
Constants ¶
This section is empty.
Variables ¶
var ErrCredentialsNotFound = errors.New("credentials not found")
Functions ¶
func HasTokenFor ¶ added in v0.2.13
HasTokenFor reports whether a profile has a stored token, for listings that should show credential state without printing the secret.
func LoadToken ¶
func LoadToken(opts TokenOptions) (string, error)
func LoadTokenFor ¶ added in v0.2.13
func LoadTokenFor(profileName string, opts TokenOptions) (string, error)
LoadTokenFor returns the token stored for a profile.
func RemoveTokenFor ¶ added in v0.2.13
RemoveTokenFor drops one profile's token, used when a profile is removed or a local VM is purged.
func SaveTokenFor ¶ added in v0.2.13
SaveTokenFor stores a token for one profile, leaving other profiles' tokens in place.
Types ¶
type TokenOptions ¶
type TokenOptions struct {
AllowMissing bool
}