Versions in this module Expand all Collapse all v1 v1.0.1 Jan 13, 2023 Changes in this version + const ScopeEmail + const ScopeProfile + var DefaultConfig = Config + func NewError(resp *http.Response) error + type APIError struct + Code int + Message string + Status string + func (e APIError) Error() string + type APIErrors struct + type Client struct + CacheDir string + Name string + func NewClientWithClientSecret(cfg Config, path string) (*Client, error) + func (client *Client) CommandLineAuth() (*CommandLineAuth, error) + func (client *Client) CommandLineToken(ctx context.Context, code string) (*oauth2.Token, error) + func (client *Client) DeviceAuth() (*DeviceAuth, error) + func (client *Client) DeviceToken(ctx context.Context, auth *DeviceAuth) (*oauth2.Token, error) + func (client *Client) Get(path string, out interface{}, opts ...ClientOpt) error + func (client *Client) Post(path string, in, out interface{}, opts ...ClientOpt) error + func (client *Client) PostBinary(path string, data io.Reader, out interface{}, opts ...ClientOpt) error + func (client *Client) ReadToken() (*oauth2.Token, error) + func (client *Client) String() string + func (client *Client) Use(ctx context.Context, token *oauth2.Token, endpoint string) error + func (client *Client) WriteToken(token *oauth2.Token) error + type ClientOpt func(url.Values, *http.Request) ClientOptDone + func OptHeader(key, value string) ClientOpt + type ClientOptDone func(interface{}) + type CommandLineAuth struct + VerificationURL string + type Config struct + CacheDir string + ConfigDir string + Name string + Scopes []string + Timeout time.Duration + type DeviceAuth struct + DeviceCode string + ExpiresIn int64 + Interval int64 + UserCode string + VerificationURL string + func (code *DeviceAuth) ExpiryTime() time.Time + type OAuthError struct + Message string + Status string + func (e OAuthError) Error() string