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 DescriptiveResponseError
- type MessageResponseError
- type Option
- type StatusResponseError
Constants ¶
View Source
const ( // ModuleTicketing is used for proxying requests through. // https://developer.zendesk.com/api-reference/ticketing/introduction/ ModuleTicketing common.ModuleID = "ticketing" // ModuleHelpCenter is Zendesk Help Center. // https://developer.zendesk.com/api-reference/help_center/help-center-api/introduction/ ModuleHelpCenter common.ModuleID = "help-center" )
Variables ¶
View Source
var ObjectNameToResponseField = common.ModuleObjectNameToFieldName{ ModuleTicketing: datautils.NewDefaultMap(map[string]string{ "ticket_audits": "audits", "search": "results", "satisfaction_reasons": "reasons", }, func(objectName string) (fieldName string) { return objectName }, ), ModuleHelpCenter: datautils.NewDefaultMap(map[string]string{ "articles": "results", "article_labels": "labels", "community_posts": "results", }, func(objectName string) (fieldName string) { return objectName }), }
ObjectNameToResponseField maps ObjectName to the response field name which contains that object.
View Source
var SupportedModules = metadata.Schemas.ModuleRegistry() // nolint: gochecknoglobals
SupportedModules represents currently working and supported modules within the Zendesk connector. Modules are added to schema.json file using OpenAPI script.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { BaseURL string Client *common.JSONHTTPClient Module common.Module }
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 DescriptiveResponseError ¶
type DescriptiveResponseError struct { Details map[string][]descrDetailsError `json:"details"` // contains filtered or unexported fields }
func (DescriptiveResponseError) CombineErr ¶
func (r DescriptiveResponseError) CombineErr(base error) error
type MessageResponseError ¶
type MessageResponseError struct { Error struct { Title string `json:"title"` Message string `json:"message"` } `json:"error"` }
func (MessageResponseError) CombineErr ¶
func (r MessageResponseError) CombineErr(base error) error
type Option ¶
type Option = func(params *parameters)
Option is a function which mutates the connector configuration.
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
func WithClient ¶
func WithModule ¶
WithModule sets the zendesk API module to use for the connector. It's required.
func WithWorkspace ¶
type StatusResponseError ¶
func (StatusResponseError) CombineErr ¶
func (r StatusResponseError) CombineErr(base error) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.