github.com/saucelabs/saucectl@v0.175.1/internal/iam/auth.go (about)

     1  package iam
     2  
     3  // Credentials holds the credentials for accessing Sauce Labs.
     4  type Credentials struct {
     5  	Username  string `yaml:"username"`
     6  	AccessKey string `yaml:"accessKey"`
     7  	Source    string `yaml:"-"`
     8  }
     9  
    10  // IsSet checks whether the credentials, i.e. username and access key are not empty.
    11  // Returns false if even one of the credentials is empty.
    12  func (c *Credentials) IsSet() bool {
    13  	return c.AccessKey != "" && c.Username != ""
    14  }