Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingClient is returned when a connector is created without a client. ErrMissingClient = errors.New("missing client") // ErrMissingProvider is returned when a connector is created without a provider. ErrMissingProvider = errors.New("missing provider") )
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { ProviderInfo *providers.ProviderInfo Client *common.JSONHTTPClient // contains filtered or unexported fields }
func NewConnector ¶
func (*Connector) HTTPClient ¶
func (c *Connector) HTTPClient() *common.HTTPClient
func (*Connector) JSONHTTPClient ¶
func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
type Option ¶
type Option = func(*parameters)
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
WithAuthenticatedClient sets the http client to use for the connector. Its usage is optional.
func WithClient ¶
func WithClient(ctx context.Context, client *http.Client, config *oauth2.Config, token *oauth2.Token, opts ...common.OAuthOption, ) Option
WithClient sets the http client to use for the connector.
func WithWorkspace ¶
WithWorkspace sets workspace which is used as substitution for URL templates.
Click to show internal directories.
Click to hide internal directories.