sideload

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

sideload Allows for sideload support when calling the zendesk api. For more information about sideloading see: https://developer.zendesk.com/rest_api/docs/support/side_loading

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SideLoader

type SideLoader interface {
	Key() string
	Unmarshal([]byte) error
}

func Include

func Include(key string, path string, v interface{}) SideLoader

Include is a function used to initialize a Sideloader. it takes 3 parameters key: the string to be included in the query string path: where the object can be found in the result body for more information see https://github.com/tidwall/gjson v: an object that the result can be unmarshalled into.

func IncludeObject

func IncludeObject(key string, v interface{}) SideLoader

In some instances sideloading results in extra objects being added to the api response. The IncludeObject sideloader should be used in such cases

func IncludeTicketDates

func IncludeTicketDates(dates *TicketDates) SideLoader

type TicketDates

type TicketDates struct {
	AssigneeUpdatedAt    *time.Time `json:"assignee_updated_at"`
	RequesterUpdatedAt   *time.Time `json:"requester_updated_at"`
	StatusUpdatedAt      *time.Time `json:"status_updated_at"`
	InitiallyAssignedAt  *time.Time `json:"initially_assigned_at"`
	AssignedAt           *time.Time `json:"assigned_at"`
	SolvedAt             *time.Time `json:"solved_at"`
	LatestCommentAddedAt *time.Time `json:"latest_comment_added_at"`
}

Jump to

Keyboard shortcuts

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