Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // TODO(efried): Better docs for things like AccessToken // TODO(efried): Dedup with flag docs in cmd/ocm/login/cmd.go:init where possible AccessToken string `json:"access_token,omitempty" doc:"Bearer access token."` ClientID string `json:"client_id,omitempty" doc:"OpenID client identifier."` ClientSecret string `json:"client_secret,omitempty" doc:"OpenID client secret."` Insecure bool `` /* 142-byte string literal not displayed */ Password string `json:"password,omitempty" doc:"User password."` RefreshToken string `json:"refresh_token,omitempty" doc:"Offline or refresh token."` Scopes []string `` /* 172-byte string literal not displayed */ TokenURL string `json:"token_url,omitempty" doc:"OpenID token URL."` URL string `` /* 162-byte string literal not displayed */ User string `json:"user,omitempty" doc:"User name."` }
Config is the type used to store the configuration of the client. There's no way to line-split or predefine tags, so...
func Load ¶
Load loads the configuration from the configuration file. If the configuration file doesn't exist it will return an empty configuration object.
func (*Config) Armed ¶ added in v0.1.17
Armed checks if the configuration contains either credentials or tokens that haven't expired, so that it can be used to perform authenticated requests.
func (*Config) Connection ¶ added in v0.1.17
func (c *Config) Connection() (connection *sdk.Connection, err error)
Connection creates a connection using this configuration.
Click to show internal directories.
Click to hide internal directories.