Documentation ¶
Index ¶
- Constants
- Variables
- func CreateHiddenNote(uri string, user User, whdTicketId int, noteTxt string, sslVerify bool) (int, error)
- func CreateNote(uri string, user User, whdTicketId int, noteTxt string, sslVerify bool) (int, error)
- func CreateUpdateLocation(uri string, user User, whdLocation Location, sslVerify bool) (int, error)
- func CreateUpdateTicket(uri string, user User, whdTicket Ticket, sslVerify bool) (int, error)
- func GetAsset(uri string, user User, assetNumber string, asset *[]Asset, sslVerify bool) error
- func GetAssetByID(uri string, user User, assetID int, asset *Asset, sslVerify bool) error
- func GetAssetCustomFieldList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetAssets(uri string, user User, qualifier string, limit uint, page uint, asset *[]Asset, ...) error
- func GetAttachment(uri string, user User, attachmentId int, sslVerify bool) ([]byte, error)
- func GetAttachmentAsBase64(uri string, user User, attachmentId int, sslVerify bool) (string, error)
- func GetCustomFieldList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetLocation(uri string, user User, id int, location *Location, sslVerify bool) error
- func GetLocationCustomFieldList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetLocationList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetNotes(uri string, user User, ticketID int, notes *[]Note, sslVerify bool) error
- func GetPriorityTypeList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetRequestTypeList(uri string, user User, result map[int]RequestType, sslVerify bool) error
- func GetSessionKey(uri string, user User) (string, error)
- func GetStatusTypeList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetTechList(uri string, user User, list map[int]string, sslVerify bool) error
- func GetTicket(uri string, user User, id int, ticket *Ticket, sslVerify bool) error
- func GetTickets(uri string, user User, qualifier string, limit uint, page uint, ...) error
- func SetRetryMax(retry int)
- func TerminateSession(uri string, sessionKey string) error
- func UploadAttachment(uri string, user User, ticketId int, filename string, filedata []byte, ...) (int, error)
- func UploadAttachmentToEntity(uri string, user User, entity string, entityId int, filename string, ...) (int, error)
- func UploadAttachmentToNote(uri string, user User, noteId int, filename string, filedata []byte, ...) (int, error)
- func UploadAttachmentToNoteFromFile(uri string, user User, noteId int, filename string, fullFilePath string, ...) (int, error)
- func UploadAttachmentToTicketFromFile(uri string, user User, ticketId int, filename string, fullFilePath string, ...) (int, error)
- func WrapAuth(req *retryablehttp.Request, user User)
- type Asset
- type Attachment
- type ClientTech
- type CustomField
- type Location
- type Note
- type OrionAlert
- type PriorityType
- type ProblemType
- type RequestType
- type StatusType
- type TechGroupLevel
- type Ticket
- type User
Constants ¶
View Source
const ( ApiKeyAuth authType = 0 SessionKeyAuth authType = 1 PasswordAuth authType = 2 )
Variables ¶
View Source
var RETRY_MAX = 10
Functions ¶
func CreateHiddenNote ¶
func CreateNote ¶
func CreateUpdateLocation ¶
func CreateUpdateTicket ¶
func GetAssetByID ¶
func GetAssetCustomFieldList ¶
func GetAttachment ¶
func GetAttachmentAsBase64 ¶
func GetCustomFieldList ¶
func GetLocation ¶
func GetLocationList ¶
func GetPriorityTypeList ¶
func GetRequestTypeList ¶
func GetStatusTypeList ¶
func GetTechList ¶
func GetTickets ¶
func GetTickets(uri string, user User, qualifier string, limit uint, page uint, ticket *[]Ticket, sslVerify bool) error
GetTickets allows you to query WHD for a list of tickets which matches a qualifier sample qualifier:
- all tickets including deleted: ((deleted %3D null) or (deleted %3D 0) or (deleted %3D 1))
- tickets in location ATL (location.locationName %3D 'ATL')
- tickets in stauts New (statustype.statusTypeName %3D 'Open')
limit - limits the number of tickets returned, default is 25, max value is 100 page - Page of results to retrieve. Returns `limit` number of items, starting
with item `(page*limit)` of the search results
func SetRetryMax ¶
func SetRetryMax(retry int)
func TerminateSession ¶
func UploadAttachment ¶
func UploadAttachmentToNote ¶
Types ¶
type Asset ¶
type Asset struct { Id int `json:"id,omitempty"` Type string `json:"type,omitempty"` AssetNumber string `json:"assetNumber,omitempty"` SerialNumber string `json:"serialNumber,omitempty"` NetworkAddress string `json:"networkAddress,omitempty"` NetworkName string `json:"networkName,omitempty"` Location Location `json:"location,omitempty"` CustomFields []CustomField `json:"assetCustomFields,omitempty"` }
type Attachment ¶
type ClientTech ¶
type CustomField ¶
type Location ¶
type Location struct { Id int `json:"id,omitempty"` Type string `json:"type,omitempty"` Address string `json:"address,omitempty"` City string `json:"city,omitempty"` Name string `json:"locationName,omitempty"` PostalCode string `json:"postalCode,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` CustomFields []CustomField `json:"locationCustomFields,omitempty"` }
type Note ¶
type Note struct { Id int `json:"id,omitempty"` Date time.Time `json:"date,omitempty"` MobileNoteText string `json:"mobileNoteText,omitempty"` // Used for reading notes FROM whd PrettyUpdatedString string `json:"prettyUpdatedString,omitempty"` NoteText string `json:"noteText,omitempty"` // Used to Create note TO whd Attachments []Attachment `json:"attachments,omitempty"` IsHidden bool `json:"isHidden"` IsTechNote bool `json:"isTechNote"` JobTicket struct { Id int `json:"id,omitempty"` Type string `json:"type,omitempty"` } `json:"jobticket,omitempty"` Reason string `json:"reason,omitempty"` }
type OrionAlert ¶
type PriorityType ¶
type ProblemType ¶
type RequestType ¶
func (RequestType) String ¶
func (rt RequestType) String() string
type StatusType ¶
type TechGroupLevel ¶
type Ticket ¶
type Ticket struct { Id int `json:"id,omitempty"` Detail string `json:"detail,omitempty"` Subject string `json:"subject,omitempty"` LastUpdated time.Time `json:"lastUpdated,omitempty"` ReportDateUtc string `json:"reportDateUtc,omitempty"` LocationId int `json:"locationId,omitempty"` Location Location `json:"location,omitempty"` StatusTypeId int `json:"statusTypeId,omitempty"` StatusType StatusType `json:"statustype,omitempty"` PriorityTypeId int `json:"priorityTypeId,omitempty"` PriorityType PriorityType `json:"prioritytype,omitempty"` ProblemType ProblemType `json:"problemtype,omitempty"` CustomFields []CustomField `json:"ticketCustomFields,omitempty"` Assets []Asset `json:"assets,omitempty"` Notes []Note `json:"notes,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` ClientTech ClientTech `json:"clientTech,omitempty"` TechGroupLevel TechGroupLevel `json:"techGroupLevel,omitempty"` OrionAlert OrionAlert `json:"orionAlert,omitempty"` EmailTech bool `json:"emailTech,omitempty"` EmailClient bool `json:"emailClient"` }
Click to show internal directories.
Click to hide internal directories.