Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachingClientFunc ¶
func CachingClientFunc(tc TokenCache, ts oauth2.TokenSource, op ...ClientFuncParam) (ctxclient.Func, error)
CachingClientFunc returns ctxclient func returning a token caching http.Client
Types ¶
type ClientFuncParam ¶
type ClientFuncParam func(*Credentials)
ClientFuncParam update a clientFunc
func InitialToken ¶
func InitialToken(tk *oauth2.Token) ClientFuncParam
InitialToken sets the initial token for a client caching object
func TokenCacheDuration ¶
func TokenCacheDuration(dur time.Duration) ClientFuncParam
TokenCacheDuration set the duration time for a new token
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
Credentials implements a simple caching structure for oauth tokens.
Click to show internal directories.
Click to hide internal directories.