Documentation
¶
Index ¶
Constants ¶
View Source
const ( CreApiKeyVar = "CRE_API_KEY" AuthTypeApiKey = "api-key" AuthTypeBearer = "bearer" ConfigDir = ".cre" ConfigFile = "cre.yaml" )
Variables ¶
View Source
var UngatedOrgRequiredMsg = "" /* 182-byte string literal not displayed */
UngatedOrgRequiredMsg is the error message shown when an organization does not have ungated access.
Functions ¶
func SaveCredentials ¶
func SaveCredentials(tokenSet *CreLoginTokenSet) error
Types ¶
type CreLoginTokenSet ¶
type CreLoginTokenSet struct {
AccessToken string `json:"access_token" yaml:"AccessToken"`
IDToken string `json:"id_token" yaml:"IDToken"`
RefreshToken string `json:"refresh_token" yaml:"RefreshToken"`
ExpiresIn int `json:"expires_in" yaml:"ExpiresIn"`
TokenType string `json:"token_type" yaml:"TokenType"`
}
type Credentials ¶
type Credentials struct {
Tokens *CreLoginTokenSet `yaml:"tokens"`
APIKey string `yaml:"api_key"`
AuthType string `yaml:"auth_type"`
IsValidated bool `yaml:"-"`
// contains filtered or unexported fields
}
func (*Credentials) CheckIsUngatedOrganization ¶ added in v1.0.2
func (c *Credentials) CheckIsUngatedOrganization() error
CheckIsUngatedOrganization verifies that the organization associated with the credentials has FULL_ACCESS status (is not gated). This check is required for certain operations like workflow key linking.
Click to show internal directories.
Click to hide internal directories.