Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProfileNotExists = errors.New("profile not exists") ErrNoProfiles = errors.New("no profiles configured, run `apono login` to create a profile") ErrorNoActiveProfile = errors.New("no active profile configured, run `apono login` to create a profile") )
View Source
var ( ErrClientNotConfigured = errors.New("client is not set in context") ErrIllegalContextValue = errors.New("illegal value is set in context") )
Functions ¶
func CreateClientContext ¶ added in v1.0.0
func CreateClientContext(ctx context.Context, client *AponoClient) context.Context
func NewRefreshableTokenSource ¶
func NewRefreshableTokenSource( ctx context.Context, cfg oauth2.Config, token *oauth2.Token, f TokenUpdateFunc, ) oauth2.TokenSource
Types ¶
type AponoClient ¶
func CreateClient ¶
func CreateClient(ctx context.Context, profileName string) (*AponoClient, error)
type TokenUpdateFunc ¶
TokenUpdateFunc is a function that accepts an oauth2 Token upon refresh, and returns an error if it should not be used.
Click to show internal directories.
Click to hide internal directories.