Documentation
¶
Overview ¶
Package client provides a HTTP client for calls to the connector service.
The configuration needed for the call are defined by the struct Config
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Post(url url.URL, activity schema.Activity) error Delete(url url.URL, activity schema.Activity) error }
Client provides interface to send requests to the connector service.
type Config ¶
type Config struct { Credentials auth.CredentialProvider AuthURL url.URL }
Config represents the credentials for a user program and the URL for validating the credentials.
func NewClientConfig ¶
func NewClientConfig(credentials auth.CredentialProvider, tokenURL string) (*Config, error)
NewClientConfig creates configuration for ConnectorClient.
type ConnectorClient ¶
ConnectorClient implements Client to send HTTP requests to the connector service.
func (*ConnectorClient) Delete ¶
Delete an activity.
Creates a HTTP DELETE request with the provided activity ID and a Bearer token in the header. Returns any error as received from the call to connector service.