Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIApp ¶
type CLIApp struct { *kingpin.Application ClientName string AccountId string Config *config Client *Client }
CLIApp represents a cli application instance
type Client ¶
type Client struct { *brightbox.Client ClientName string ClientID string `ini:"client_id"` Secret string `ini:"secret"` ApiUrl string `ini:"api_url"` DefaultAccount string `ini:"default_account"` AuthUrl string `ini:"auth_url"` Username string `ini:"username"` // contains filtered or unexported fields }
Represents a Client section from the config Can also be used as a TokenSource for oauth2 transport
func (*Client) Token ¶
Token returns the cached OAuth token from disk if it's still valid, or retrieves a new one from the token source.
func (*Client) TokenCache ¶
func (c *Client) TokenCache() *TokenCacher
func (*Client) TokenSource ¶
func (c *Client) TokenSource() oauth2.TokenSource
Setup the OAuth token source, which can then issue (and cache) OAuth tokens. API clients can always be used to get new tokens. Password auth credentials need a valid refresh token, or they error out (and need a login to get a new refresh token).
type FieldOutput ¶
func (*FieldOutput) Flush ¶
func (fo *FieldOutput) Flush()
type RowFieldOutput ¶
type RowFieldOutput struct { FieldOutput FieldOrder []string }
func (*RowFieldOutput) SendHeader ¶
func (fo *RowFieldOutput) SendHeader()
func (*RowFieldOutput) Setup ¶
func (fo *RowFieldOutput) Setup(fieldorder []string)
type ShowFieldOutput ¶
type ShowFieldOutput struct { FieldOutput FieldOrder []string }
func (*ShowFieldOutput) Setup ¶
func (fo *ShowFieldOutput) Setup(fieldorder []string)
type TokenCacher ¶
type TokenCacher struct { Key string // contains filtered or unexported fields }
func (*TokenCacher) Clear ¶
func (tc *TokenCacher) Clear()
func (*TokenCacher) Read ¶
func (tc *TokenCacher) Read() *oauth2.Token
func (*TokenCacher) Write ¶
func (tc *TokenCacher) Write(token *oauth2.Token)
Click to show internal directories.
Click to hide internal directories.