zendesk

package
v0.0.0-...-df92b0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client contains the instance of the Zendesk API wrapper client from go-zendesk/zendesk, as well as the configuration for connecting to Zendesk.

func Connect

func Connect(config *model.ZendeskConfigInput) *Client

Connect takes a configuration for Zendesk and uses it to create a new instance of a Zendesk client. c is then used as a receiver for any other interaction with Zendesk, as it's preconfigured, and contains an http.Client

func (*Client) GetOrganization

func (c *Client) GetOrganization(ctx context.Context, id int) (output *model.Organization, err error)

GetOrganization takes the client, c, and requests the details for the organization provided by the context to the Zendesk API wrapper. Once it retreives that data from Zendesk, it converts the output into a model. Organization.

func (*Client) GetTickets

func (c *Client) GetTickets(ctx context.Context) (output []*model.Ticket, err error)

GetTickets uses the preconfigured client, c, and sends a request for all tickets to the Zendesk API wrapper, asking it to sort tickets by last updated. Once it grabs the array of tickets, it makes sure that any pagination is handled, and converts the ticket output into an array of model. Ticket.

func (*Client) GetTrigger

func (c *Client) GetTrigger(ctx context.Context, id int) (output *model.Trigger, err error)

GetTrigger uses the preconfigured client, c, and sends a request for all triggers to the Zendesk API wrapper. Once it grabs the specified trigger, it converts the output into a type of model.Trigger.

func (*Client) GetTriggers

func (c *Client) GetTriggers(ctx context.Context) (output []*model.Trigger, err error)

GetTriggers uses the preconfigured client, c, and sends a request for all triggers to the Zendesk API wrapper. Once it grabs the array of triggers, it makes sure that any pagination is handled, and converts the ticket output into an array of model.Trigger.

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, id string) (output *model.User, err error)

GetUser takes the client, c, and requests the details for the user provided by the context to the Zendesk API wrapper. Once it retreives that data from Zendesk, it converts the output into a model. user.

func (*Client) GetView

func (c *Client) GetView(ctx context.Context, viewID int) (view *model.View, err error)

GetView takes the client, c, and a View ID, and pulls the details for a specific view

func (*Client) GetViewCount

func (c *Client) GetViewCount(ctx context.Context, viewID int) (viewCount *model.ViewCount, err error)

GetViewCount takes the client, c, and a View ID, and retrieves the count of tickets that match the criteria of that view

func (*Client) GetViews

func (c *Client) GetViews(ctx context.Context) ([]*model.View, error)

GetViews takes the client, c, and requests a list of all of the currently active views in Zendesk View.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL