Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClientNotConfigured = errors.New("client is not set in context") ErrIllegalContextValue = errors.New("illegal value is set in context") )
View Source
var ErrProfileNotExists = errors.New("profile not exists")
Functions ¶
func CreateContext ¶ added in v0.1.2
func CreateContext(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 ¶
type AponoClient struct { *apono.APIClient Session *Session }
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.