Documentation
¶
Index ¶
- type Debugger
- type Tokens
- func (t *Tokens) All() string
- func (t *Tokens) Bubblegum() string
- func (t *Tokens) BubblegumHeader() string
- func (t *Tokens) Docker() string
- func (t *Tokens) Flaps() string
- func (t *Tokens) FlapsHeader() string
- func (t *Tokens) GraphQL() string
- func (t *Tokens) GraphQLHeader() string
- func (t *Tokens) Macaroons() string
- func (t *Tokens) NATS() string
- func (t *Tokens) Replace(other *Tokens)
- func (t *Tokens) Update(ctx context.Context, opts ...UpdateOption) (bool, error)
- type UpdateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tokens ¶
type Tokens struct { MacaroonTokens []string UserTokens []string FromConfigFile string // contains filtered or unexported fields }
Tokens is a collection of tokens belonging to the user. This includes macaroon tokens (per-org) and OAuth tokens (per-user).
It is normal for this to include just macaroons, just oauth tokens, or a combination of the two. The GraphQL API is the only service that accepts macaroons and OAuth tokens in the same request. For other service, macaroons are preferred.
func Parse ¶
Parse extracts individual tokens from a token string. The input token may include an authorization scheme (`Bearer` or `FlyV1`) and/or a set of comma-separated macaroon and user tokens.
func (*Tokens) BubblegumHeader ¶
func (*Tokens) FlapsHeader ¶
func (*Tokens) GraphQLHeader ¶
type UpdateOption ¶
type UpdateOption func(*updateOptions)
func WithDebugger ¶
func WithDebugger(d Debugger) UpdateOption
func WithUserURLCallback ¶
func WithUserURLCallback(cb func(ctx context.Context, url string) error) UpdateOption
Click to show internal directories.
Click to hide internal directories.