Documentation ¶
Index ¶
- Constants
- Variables
- type Connector
- func (c *Connector) Delete(ctx context.Context, config common.DeleteParams) (*common.DeleteResult, error)
- func (c *Connector) HTTPClient() *common.HTTPClient
- func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
- func (c *Connector) ListObjectMetadata(ctx context.Context, objectNames []string) (*common.ListObjectMetadataResult, error)
- func (c *Connector) Provider() providers.Provider
- func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
- func (c *Connector) String() string
- func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
- type DescriptiveError
- type Option
- type ResponseListError
- type ResponseSingleError
Constants ¶
View Source
const DefaultPageSize = 60
DefaultPageSize is the number of elements per page.
Variables ¶
View Source
var ErrUnknownErrorResponseFormat = errors.New("error response has unexpected format")
View Source
var ObjectNameToResponseField = datautils.NewDefaultMap(map[string]string{ "admins": "admins", "teams": "teams", "ticket_types": "ticket_types", "events": "events", "segments": "segments", "activity_logs": "activity_logs", "tickets": "tickets", "conversations": "conversations", }, func(key string) string { return "data" }, )
ObjectNameToResponseField maps ObjectName to the response field name which contains that object.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { BaseURL string Module common.Module Client *common.JSONHTTPClient }
func NewConnector ¶
func (*Connector) Delete ¶
func (c *Connector) Delete(ctx context.Context, config common.DeleteParams) (*common.DeleteResult, error)
func (*Connector) HTTPClient ¶
func (c *Connector) HTTPClient() *common.HTTPClient
func (*Connector) JSONHTTPClient ¶
func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
JSONHTTPClient returns the underlying JSON HTTP client.
func (*Connector) ListObjectMetadata ¶
func (*Connector) Read ¶
func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
func (*Connector) Write ¶
func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
type DescriptiveError ¶
type Option ¶
type Option = func(params *parameters)
Option is a function which mutates the connector configuration.
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
type ResponseListError ¶
type ResponseListError struct { Type string `json:"type"` RequestId *string `json:"request_id"` // nolint:tagliatelle Errors []DescriptiveError `json:"errors"` }
func (ResponseListError) CombineErr ¶
func (r ResponseListError) CombineErr(base error) error
type ResponseSingleError ¶
func (ResponseSingleError) CombineErr ¶
func (r ResponseSingleError) CombineErr(base error) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.