Versions in this module Expand all Collapse all v0 v0.5.0 Nov 3, 2015 Changes in this version + var HTTPClient internal.ContextKey + var NoContext = context.TODO() + func NewClient(ctx context.Context, src TokenSource) *http.Client + type AuthCodeOption interface + var AccessTypeOffline AuthCodeOption = SetAuthURLParam("access_type", "offline") + var AccessTypeOnline AuthCodeOption = SetAuthURLParam("access_type", "online") + var ApprovalForce AuthCodeOption = SetAuthURLParam("approval_prompt", "force") + func SetAuthURLParam(key, value string) AuthCodeOption + type Config struct + ClientID string + ClientSecret string + Endpoint Endpoint + RedirectURL string + Scopes []string + func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string + func (c *Config) Client(ctx context.Context, t *Token) *http.Client + func (c *Config) Exchange(ctx context.Context, code string) (*Token, error) + func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*Token, error) + func (c *Config) TokenSource(ctx context.Context, t *Token) TokenSource + type Endpoint struct + AuthURL string + TokenURL string + type Token struct + AccessToken string + Expiry time.Time + RefreshToken string + TokenType string + func (t *Token) Extra(key string) interface{} + func (t *Token) SetAuthHeader(r *http.Request) + func (t *Token) Type() string + func (t *Token) Valid() bool + func (t *Token) WithExtra(extra interface{}) *Token + type TokenSource interface + Token func() (*Token, error) + func ReuseTokenSource(t *Token, src TokenSource) TokenSource + func StaticTokenSource(t *Token) TokenSource + type Transport struct + Base http.RoundTripper + Source TokenSource + func (t *Transport) CancelRequest(req *http.Request) + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) v0.5.0-rc4 Oct 29, 2015