function

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldShortDescription = "short_description"
	FieldLongDescription  = "description"
)

Variables

View Source
var BuildDate string
View Source
var BuildHash string
View Source
var BuildHashShort string
View Source
var ErrUnexpectedStatus = errors.New("returned with unexpected status")

Functions

func Init

func Init(mode string, r *mux.Router, log utils.Logger)

func RemoveTable

func RemoveTable(creq goapp.CallRequest, id string) error

func UpdateTable

func UpdateTable(creq goapp.CallRequest, t Table) error

Types

type App

type App struct {
	goapp.App
	// contains filtered or unexported fields
}

func (*App) CreateIncident

func (a *App) CreateIncident(c *Client, creq goapp.CallRequest, table string, v interface{}) (string, error)

type BaseTicket

type BaseTicket struct {
	ID         string       `json:"sys_id"`
	ClassName  string       `json:"sys_class_name"`
	Tags       string       `json:"sys_tags"`
	Domain     TicketDomain `json:"sys_domain"`
	DomainPath string       `json:"sys_domain_path"`
	ModCount   string       `json:"sys_mod_count"`
	UpdatedBy  string       `json:"sys_updated_by"`
	CreatedBy  string       `json:"sys_created_by"`
}

type Client

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

type Config

type Config struct {
	Tables Tables
}

type CreateTicketResponse

type CreateTicketResponse struct {
	Result BaseTicket `json:"result"`
}

type Table

type Table struct {
	// Table ID and name
	ID          string
	DisplayName string

	// Fields to include in the form to create tickets
	Fields []*apps.Field

	// BindTo controls what top-level bindings the table is exposed in.
	// PostFieldName indicates what text field is to be defaulted to the post's
	// message if invoked from the post menu.
	BindTo        apps.Locations
	PostFieldName string
}

type Tables

type Tables map[string]Table

func GetTables

func GetTables(creq goapp.CallRequest) Tables

type TicketDomain

type TicketDomain struct {
	Link  string `json:"link"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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