credentials

package
v0.33.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Username  string `yaml:"username"`
	AccessKey string `yaml:"accessKey"`
	Source    string
}

Credentials contains a set of Username + AccessKey for SauceLabs.

func FromEnv

func FromEnv() *Credentials

FromEnv reads the credentials from the user environment.

func FromFile

func FromFile() *Credentials

FromFile reads the credentials from the user credentials file.

func Get

func Get() *Credentials

Get returns the currently configured credentials (env is prioritary vs. file).

func (*Credentials) IsEmpty

func (credentials *Credentials) IsEmpty() bool

IsEmpty ensure credentials are not set

func (*Credentials) IsValid

func (credentials *Credentials) IsValid() bool

IsValid validates that the credentials are valid.

func (*Credentials) Store

func (credentials *Credentials) Store() error

Store stores the provided credentials into the user config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL