Documentation
¶
Index ¶
- Variables
- func AddCredential(cred Credential, allowOverwrite bool) error
- func DefaultOauthClientID() string
- func DefaultOauthURI() string
- func FetchColumnarLicense(cred *Credential) error
- func GetCredPathForTesting() string
- func IsColumnarPrivateRegistry(u *url.URL) bool
- func LoadCredentials() error
- func PurgeCredentials() error
- func RemoveCredential(host Uri) error
- func ResetCredentialsForTesting()
- func SetCredPathForTesting(path string) (restore func())
- func UpdateCreds() error
- type Credential
- type OpenIDConfig
- type Type
- type Uri
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoTrialLicense = errors.New("no trial license found") ErrTrialExpired = errors.New("trial license has expired") )
Functions ¶
func AddCredential ¶
func AddCredential(cred Credential, allowOverwrite bool) error
func DefaultOauthClientID ¶
func DefaultOauthClientID() string
func DefaultOauthURI ¶
func DefaultOauthURI() string
func FetchColumnarLicense ¶
func FetchColumnarLicense(cred *Credential) error
func GetCredPathForTesting ¶
func GetCredPathForTesting() string
GetCredPathForTesting returns the current credential path
func LoadCredentials ¶
func LoadCredentials() error
func PurgeCredentials ¶
func PurgeCredentials() error
func RemoveCredential ¶
func ResetCredentialsForTesting ¶
func ResetCredentialsForTesting()
ResetCredentialsForTesting resets the loaded credentials state for testing
func SetCredPathForTesting ¶
func SetCredPathForTesting(path string) (restore func())
SetCredPathForTesting sets the credential path for testing purposes
func UpdateCreds ¶
func UpdateCreds() error
Types ¶
type Credential ¶
type Credential struct {
Type Type `toml:"type"`
AuthURI Uri `toml:"auth_uri"`
RegistryURL Uri `toml:"registry_url"`
ApiKey string `toml:"api_key,omitempty"`
Token string `toml:"token"`
RefreshToken string `toml:"refresh_token,omitempty"`
ClientID string `toml:"client_id,omitempty"`
Audience string `toml:"audience,omitempty"`
}
func GetCredentials ¶
func GetCredentials(u *url.URL) (*Credential, error)
func (*Credential) GetAuthToken ¶
func (t *Credential) GetAuthToken() string
func (*Credential) Refresh ¶
func (t *Credential) Refresh() bool
type OpenIDConfig ¶
type OpenIDConfig struct {
Issuer Uri `json:"issuer"`
AuthorizationEndpoint Uri `json:"authorization_endpoint"`
TokenEndpoint Uri `json:"token_endpoint"`
DeviceAuthorizationEndpoint Uri `json:"device_authorization_endpoint"`
UserinfoEndpoint Uri `json:"userinfo_endpoint"`
JwksURI Uri `json:"jwks_uri"`
ScopesSupported []string `json:"scopes_supported"`
ResponseTypesSupported []string `json:"response_types_supported"`
SubjectTypesSupported []string `json:"subject_types_supported"`
IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`
ClaimsSupported []string `json:"claims_supported"`
TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
EndSessionEndpoint Uri `json:"end_session_endpoint"`
RequestURIParameterSupported bool `json:"request_uri_parameter_supported"`
RequestParameterSupported bool `json:"request_parameter_supported"`
}
func GetOpenIDConfig ¶
func GetOpenIDConfig(issuer *url.URL) (config OpenIDConfig, err error)
Click to show internal directories.
Click to hide internal directories.