Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToFile ¶ added in v0.37.0
func ToFile(c Credentials) error
ToFile stores the provided credentials in the default file location.
Types ¶
type Credentials ¶
type Credentials struct { Username string `yaml:"username"` AccessKey string `yaml:"accessKey"` Source string `yaml:"-"` }
Credentials contains a set of Username + AccessKey for SauceLabs.
func FromFile ¶
func FromFile() Credentials
FromFile reads the credentials that stored in the default file location.
func Get ¶
func Get() Credentials
Get returns the configured credentials. Effectively a covenience wrapper around FromEnv, followed by a call to FromFile.
The lookup order is:
- Environment variables (see FromEnv)
- Credentials file (see FromFile)
func (*Credentials) IsEmpty ¶
func (c *Credentials) IsEmpty() bool
IsEmpty checks whether the credentials, i.e. username and access key are not empty. Returns false if even one of the credentials is empty.
func (*Credentials) IsValid ¶
func (c *Credentials) IsValid() bool
IsValid validates that the credentials are valid.
Click to show internal directories.
Click to hide internal directories.