Documentation ¶
Index ¶
- func ConvertPageToken(token string) (int, error)
- type Connector
- func (d *Connector) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)
- func (c *Connector) BulkCreateTickets(ctx context.Context, request *v2.TicketsServiceBulkCreateTicketsRequest) (*v2.TicketsServiceBulkCreateTicketsResponse, error)
- func (c *Connector) BulkGetTickets(ctx context.Context, request *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error)
- func (c *Connector) CreateTicket(ctx context.Context, ticket *v2.Ticket, schema *v2.TicketSchema) (*v2.Ticket, annotations.Annotations, error)
- func (c *Connector) GetTicket(ctx context.Context, ticketId string) (*v2.Ticket, annotations.Annotations, error)
- func (c *Connector) GetTicketSchema(ctx context.Context, schemaID string) (*v2.TicketSchema, annotations.Annotations, error)
- func (c *Connector) ListTicketSchemas(ctx context.Context, pt *pagination.Token) ([]*v2.TicketSchema, string, annotations.Annotations, error)
- func (d *Connector) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
- func (d *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
- func (d *Connector) Validate(ctx context.Context) (annotations.Annotations, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPageToken ¶
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, apiKey, domain string, freshServiceClient *client.FreshServiceClient) (*Connector, error)
New returns a new instance of the connector.
func (*Connector) Asset ¶
Asset takes an input AssetRef and attempts to fetch it using the connector's authenticated http client It streams a response, always starting with a metadata object, following by chunked payloads for the asset.
func (*Connector) BulkCreateTickets ¶
func (c *Connector) BulkCreateTickets(ctx context.Context, request *v2.TicketsServiceBulkCreateTicketsRequest) (*v2.TicketsServiceBulkCreateTicketsResponse, error)
func (*Connector) BulkGetTickets ¶
func (c *Connector) BulkGetTickets(ctx context.Context, request *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error)
func (*Connector) CreateTicket ¶
func (c *Connector) CreateTicket(ctx context.Context, ticket *v2.Ticket, schema *v2.TicketSchema) (*v2.Ticket, annotations.Annotations, error)
func (*Connector) GetTicket ¶
func (c *Connector) GetTicket(ctx context.Context, ticketId string) (*v2.Ticket, annotations.Annotations, error)
func (*Connector) GetTicketSchema ¶
func (c *Connector) GetTicketSchema(ctx context.Context, schemaID string) (*v2.TicketSchema, annotations.Annotations, error)
func (*Connector) ListTicketSchemas ¶
func (c *Connector) ListTicketSchemas(ctx context.Context, pt *pagination.Token) ([]*v2.TicketSchema, string, annotations.Annotations, error)
func (*Connector) ResourceSyncers ¶
func (d *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
ResourceSyncers returns a ResourceSyncer for each resource type that should be synced from the upstream service.
func (*Connector) Validate ¶
func (d *Connector) Validate(ctx context.Context) (annotations.Annotations, error)
Validate is called to ensure that the connector is properly configured. It should exercise any API credentials to be sure that they are valid.
Click to show internal directories.
Click to hide internal directories.