Documentation
¶
Index ¶
- Variables
- func AddCredential(cred Credential, allowOverwrite bool) error
- func DefaultOauthClientID() string
- func DefaultOauthURI() string
- func FetchColumnarLicense(ctx context.Context, cred *Credential) error
- func GetCredPathForTesting() string
- func InstallLicenseFromFile(srcPath string, force bool) error
- func IsColumnarPrivateRegistry(u *url.URL) bool
- func LicensePath() (string, error)
- 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") ErrLicenseWrongFilename = errors.New("source file is not named columnar.lic (use --force to override)") ErrLicenseAlreadyExists = errors.New("license already exists (use --force to overwrite)") )
Functions ¶
func AddCredential ¶
func AddCredential(cred Credential, allowOverwrite bool) error
func DefaultOauthClientID ¶
func DefaultOauthClientID() string
func DefaultOauthURI ¶
func DefaultOauthURI() string
func FetchColumnarLicense ¶
func FetchColumnarLicense(ctx context.Context, cred *Credential) error
func GetCredPathForTesting ¶
func GetCredPathForTesting() string
func InstallLicenseFromFile ¶ added in v0.3.0
func LicensePath ¶ added in v0.3.0
func LoadCredentials ¶
func LoadCredentials() error
func PurgeCredentials ¶
func PurgeCredentials() error
func RemoveCredential ¶
func ResetCredentialsForTesting ¶
func ResetCredentialsForTesting()
func SetCredPathForTesting ¶
func SetCredPathForTesting(path string) (restore func())
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(ctx context.Context) string
GetAuthToken returns the current token, refreshing if needed. Must not be called while credMu is held (Refresh may acquire it via UpdateCreds).
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 ¶
Click to show internal directories.
Click to hide internal directories.