otrs

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTicketID added in v1.0.9

func ExtractTicketID(name string) (string, error)

func MakeTicketUrl added in v1.0.9

func MakeTicketUrl(ticket Ticket) string

Types

type Ticket

type Ticket struct {
	ResponsibleID  string `json:"ResponsibleID"`
	Owner          string `json:"Owner"`
	Created        string `json:"Created"`
	StateType      string `json:"StateType"`
	Type           string `json:"Type"`
	CreateTimeUnix string `json:"CreateTimeUnix"`
	State          string `json:"State"`
	OwnerID        string `json:"OwnerID"`
	UnlockTimeout  string `json:"UnlockTimeout"`
	Priority       string `json:"Priority"`
	GroupID        string `json:"GroupID"`
	StateID        string `json:"StateID"`
	SLAID          string `json:"SLAID"`
	CustomerUserID string `json:"CustomerUserID"`
	Article        []struct {
		ResponsibleID          string      `json:"ResponsibleID"`
		Owner                  string      `json:"Owner"`
		InReplyTo              string      `json:"InReplyTo"`
		From                   string      `json:"From"`
		ContentCharset         string      `json:"ContentCharset"`
		Created                string      `json:"Created"`
		SenderTypeID           string      `json:"SenderTypeID"`
		AgeTimeUnix            int         `json:"AgeTimeUnix"`
		To                     string      `json:"To"`
		References             string      `json:"References"`
		StateType              string      `json:"StateType"`
		Type                   string      `json:"Type"`
		ContentType            string      `json:"ContentType"`
		CreateTimeUnix         string      `json:"CreateTimeUnix"`
		State                  string      `json:"State"`
		OwnerID                string      `json:"OwnerID"`
		Priority               string      `json:"Priority"`
		FromRealname           string      `json:"FromRealname"`
		StateID                string      `json:"StateID"`
		SLAID                  interface{} `json:"SLAID"`
		Subject                string      `json:"Subject"`
		CreatedBy              string      `json:"CreatedBy"`
		CustomerUserID         string      `json:"CustomerUserID"`
		ReplyTo                string      `json:"ReplyTo"`
		Title                  string      `json:"Title"`
		ServiceID              interface{} `json:"ServiceID"`
		Body                   string      `json:"Body"`
		PriorityID             string      `json:"PriorityID"`
		SenderType             string      `json:"SenderType"`
		SLA                    string      `json:"SLA"`
		EscalationSolutionTime string      `json:"EscalationSolutionTime"`
		IncomingTime           string      `json:"IncomingTime"`
		Queue                  string      `json:"Queue"`
		CustomerID             string      `json:"CustomerID"`
		QueueID                string      `json:"QueueID"`
		ArticleTypeID          string      `json:"ArticleTypeID"`
		TypeID                 string      `json:"TypeID"`
		ArticleType            string      `json:"ArticleType"`
		Age                    int         `json:"Age"`
		EscalationUpdateTime   string      `json:"EscalationUpdateTime"`
		Charset                string      `json:"Charset"`
		Cc                     string      `json:"Cc"`
		UntilTime              int         `json:"UntilTime"`
		EscalationTime         string      `json:"EscalationTime"`
		TicketID               string      `json:"ticketID"`
		Lock                   string      `json:"Lock"`
		MimeType               string      `json:"MimeType"`
		TicketNumber           string      `json:"TicketNumber"`
		Service                string      `json:"Service"`
		EscalationResponseTime string      `json:"EscalationResponseTime"`
		ToRealname             string      `json:"ToRealname"`
		Responsible            string      `json:"Responsible"`
		RealTillTimeNotUsed    string      `json:"RealTillTimeNotUsed"`
		ArticleID              string      `json:"ArticleID"`
		Changed                string      `json:"Changed"`
		MessageID              string      `json:"MessageID"`
		LockID                 string      `json:"LockID"`
	} `json:"Article"`
	Title                  string `json:"Title"`
	CreateBy               string `json:"CreateBy"`
	ServiceID              string `json:"ServiceID"`
	PriorityID             string `json:"PriorityID"`
	EscalationSolutionTime string `json:"EscalationSolutionTime"`
	Queue                  string `json:"Queue"`
	CustomerID             string `json:"CustomerID"`
	QueueID                string `json:"QueueID"`
	TypeID                 string `json:"TypeID"`
	ArchiveFlag            string `json:"ArchiveFlag"`
	EscalationUpdateTime   string `json:"EscalationUpdateTime"`
	Age                    int    `json:"Age"`
	UntilTime              int    `json:"UntilTime"`
	EscalationTime         string `json:"EscalationTime"`
	TicketID               string `json:"ticketID"`
	Lock                   string `json:"Lock"`
	TicketNumber           string `json:"TicketNumber"`
	EscalationResponseTime string `json:"EscalationResponseTime"`
	ChangeBy               string `json:"ChangeBy"`
	RealTillTimeNotUsed    string `json:"RealTillTimeNotUsed"`
	Responsible            string `json:"Responsible"`
	Changed                string `json:"Changed"`
	LockID                 string `json:"LockID"`
}

The Ticket type for representing a single otrs ticket

func GetTicketAndHandleFailure added in v1.0.9

func GetTicketAndHandleFailure(ticketID string) (Ticket, bool, error)

GetTicketAndHandleFailure tries to get a Ticket from otrs, otherwise abort response with error

type TicketResponse

type TicketResponse struct {
	Ticket []Ticket `json:"Ticket"`
}

The TicketResponse type for representing a otrs ticket response

func GetTicket

func GetTicket(id string) (TicketResponse, *http.Response, []byte, error)

GetTicket fetches a ticket by id from otrs

Jump to

Keyboard shortcuts

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