Documentation ¶
Overview ¶
Deals with loading and saving credentials and tokens to the config file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoUsername = errors.New("no username stored in config") ErrNoURL = errors.New("no URL stored in config") )
Functions ¶
Types ¶
type Config ¶
Config represents the config file. This object will be serialized to the config file.
func (*Config) LoadCredentials ¶
func (c *Config) LoadCredentials() (*hive.Credentials, error)
LoadCredentils constructs the hive.Credentials object using the data from the given Config combined with the password stored in the (platform dependent) keyring.
func (*Config) SaveCredentials ¶
func (c *Config) SaveCredentials(creds *hive.Credentials) error
SaveCredentials saves the data from the given hive.Credentials object to the specified config while also storing the password in the (platform dependent) keyring.
Click to show internal directories.
Click to hide internal directories.