model

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SettingsResponseTierCommunity = "community"

	SettingsResponseTierEnterprise = "enterprise"

	TaskTypeTask = "task"

	TaskTypeInput = "input"

	TaskTypeAutomation = "automation"

	TaskResponseTypeTask = "task"

	TaskResponseTypeInput = "input"

	TaskResponseTypeAutomation = "automation"

	TypeColorError = "error"

	TypeColorInfo = "info"

	TypeColorSuccess = "success"

	TypeColorWarning = "warning"

	WidgetTypeBar = "bar"

	WidgetTypeLine = "line"

	WidgetTypePie = "pie"
)

Variables

View Source
var (
	ArtifactSchema                 = new(gojsonschema.Schema)
	ArtifactOriginSchema           = new(gojsonschema.Schema)
	AutomationSchema               = new(gojsonschema.Schema)
	AutomationFormSchema           = new(gojsonschema.Schema)
	AutomationResponseSchema       = new(gojsonschema.Schema)
	CommentSchema                  = new(gojsonschema.Schema)
	CommentFormSchema              = new(gojsonschema.Schema)
	ContextSchema                  = new(gojsonschema.Schema)
	DashboardSchema                = new(gojsonschema.Schema)
	DashboardResponseSchema        = new(gojsonschema.Schema)
	EnrichmentSchema               = new(gojsonschema.Schema)
	EnrichmentFormSchema           = new(gojsonschema.Schema)
	FileSchema                     = new(gojsonschema.Schema)
	JobSchema                      = new(gojsonschema.Schema)
	JobFormSchema                  = new(gojsonschema.Schema)
	JobResponseSchema              = new(gojsonschema.Schema)
	JobUpdateSchema                = new(gojsonschema.Schema)
	LogEntrySchema                 = new(gojsonschema.Schema)
	MessageSchema                  = new(gojsonschema.Schema)
	NewUserResponseSchema          = new(gojsonschema.Schema)
	OriginSchema                   = new(gojsonschema.Schema)
	PlaybookSchema                 = new(gojsonschema.Schema)
	PlaybookResponseSchema         = new(gojsonschema.Schema)
	PlaybookTemplateSchema         = new(gojsonschema.Schema)
	PlaybookTemplateFormSchema     = new(gojsonschema.Schema)
	PlaybookTemplateResponseSchema = new(gojsonschema.Schema)
	ReferenceSchema                = new(gojsonschema.Schema)
	ReferenceArraySchema           = new(gojsonschema.Schema)
	SettingsSchema                 = new(gojsonschema.Schema)
	SettingsResponseSchema         = new(gojsonschema.Schema)
	StatisticsSchema               = new(gojsonschema.Schema)
	TaskSchema                     = new(gojsonschema.Schema)
	TaskOriginSchema               = new(gojsonschema.Schema)
	TaskResponseSchema             = new(gojsonschema.Schema)
	TaskWithContextSchema          = new(gojsonschema.Schema)
	TicketSchema                   = new(gojsonschema.Schema)
	TicketFormSchema               = new(gojsonschema.Schema)
	TicketFormArraySchema          = new(gojsonschema.Schema)
	TicketListSchema               = new(gojsonschema.Schema)
	TicketResponseSchema           = new(gojsonschema.Schema)
	TicketSimpleResponseSchema     = new(gojsonschema.Schema)
	TicketTemplateSchema           = new(gojsonschema.Schema)
	TicketTemplateFormSchema       = new(gojsonschema.Schema)
	TicketTemplateResponseSchema   = new(gojsonschema.Schema)
	TicketTypeSchema               = new(gojsonschema.Schema)
	TicketTypeFormSchema           = new(gojsonschema.Schema)
	TicketTypeResponseSchema       = new(gojsonschema.Schema)
	TicketWithTicketsSchema        = new(gojsonschema.Schema)
	TypeSchema                     = new(gojsonschema.Schema)
	UserSchema                     = new(gojsonschema.Schema)
	UserDataSchema                 = new(gojsonschema.Schema)
	UserDataResponseSchema         = new(gojsonschema.Schema)
	UserFormSchema                 = new(gojsonschema.Schema)
	UserResponseSchema             = new(gojsonschema.Schema)
	WidgetSchema                   = new(gojsonschema.Schema)
)

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Enrichments map[string]*Enrichment `json:"enrichments,omitempty"`
	Kind        *string                `json:"kind,omitempty"`
	Name        string                 `json:"name"`
	Status      *string                `json:"status,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

type ArtifactOrigin

type ArtifactOrigin struct {
	Artifact string `json:"artifact"`
	TicketId int64  `json:"ticket_id"`
}

type Automation

type Automation struct {
	Image  string   `json:"image"`
	Schema *string  `json:"schema,omitempty"`
	Script string   `json:"script"`
	Type   []string `json:"type"`
}

type AutomationForm

type AutomationForm struct {
	ID     string   `json:"id"`
	Image  string   `json:"image"`
	Schema *string  `json:"schema,omitempty"`
	Script string   `json:"script"`
	Type   []string `json:"type"`
}

type AutomationResponse

type AutomationResponse struct {
	ID     string   `json:"id"`
	Image  string   `json:"image"`
	Schema *string  `json:"schema,omitempty"`
	Script string   `json:"script"`
	Type   []string `json:"type"`
}

type Comment

type Comment struct {
	Created time.Time `json:"created"`
	Creator string    `json:"creator"`
	Message string    `json:"message"`
}

type CommentForm

type CommentForm struct {
	Created *time.Time `json:"created,omitempty"`
	Creator *string    `json:"creator,omitempty"`
	Message string     `json:"message"`
}

type Context

type Context struct {
	Artifact *Artifact         `json:"artifact,omitempty"`
	Playbook *PlaybookResponse `json:"playbook,omitempty"`
	Task     *TaskResponse     `json:"task,omitempty"`
	Ticket   *TicketResponse   `json:"ticket,omitempty"`
}

type Dashboard added in v0.9.0

type Dashboard struct {
	Name    string    `json:"name"`
	Widgets []*Widget `json:"widgets"`
}

type DashboardResponse added in v0.9.0

type DashboardResponse struct {
	ID      string    `json:"id"`
	Name    string    `json:"name"`
	Widgets []*Widget `json:"widgets"`
}

type Enrichment

type Enrichment struct {
	Created time.Time      `json:"created"`
	Data    map[string]any `json:"data"`
	Name    string         `json:"name"`
}

type EnrichmentForm

type EnrichmentForm struct {
	Data map[string]any `json:"data"`
	Name string         `json:"name"`
}

type File

type File struct {
	Key  string `json:"key"`
	Name string `json:"name"`
}

type Job

type Job struct {
	Automation string         `json:"automation"`
	Container  *string        `json:"container,omitempty"`
	Log        *string        `json:"log,omitempty"`
	Origin     *Origin        `json:"origin,omitempty"`
	Output     map[string]any `json:"output,omitempty"`
	Payload    any            `json:"payload,omitempty"`
	Running    bool           `json:"running"`
	Status     string         `json:"status"`
}

type JobForm

type JobForm struct {
	Automation string  `json:"automation"`
	Origin     *Origin `json:"origin,omitempty"`
	Payload    any     `json:"payload,omitempty"`
}

type JobResponse

type JobResponse struct {
	Automation string         `json:"automation"`
	Container  *string        `json:"container,omitempty"`
	ID         string         `json:"id"`
	Log        *string        `json:"log,omitempty"`
	Origin     *Origin        `json:"origin,omitempty"`
	Output     map[string]any `json:"output,omitempty"`
	Payload    any            `json:"payload,omitempty"`
	Status     string         `json:"status"`
}

type JobUpdate added in v0.8.0

type JobUpdate struct {
	Container *string        `json:"container,omitempty"`
	Log       *string        `json:"log,omitempty"`
	Output    map[string]any `json:"output,omitempty"`
	Running   bool           `json:"running"`
	Status    string         `json:"status"`
}

type LogEntry

type LogEntry struct {
	Created   time.Time `json:"created"`
	Creator   string    `json:"creator"`
	Message   string    `json:"message"`
	Reference string    `json:"reference"`
	Type      string    `json:"type"`
}

type Message

type Message struct {
	Context *Context          `json:"context,omitempty"`
	Payload any               `json:"payload,omitempty"`
	Secrets map[string]string `json:"secrets,omitempty"`
}

type NewUserResponse

type NewUserResponse struct {
	Blocked bool     `json:"blocked"`
	ID      string   `json:"id"`
	Roles   []string `json:"roles"`
	Secret  *string  `json:"secret,omitempty"`
}

type Origin

type Origin struct {
	ArtifactOrigin *ArtifactOrigin `json:"artifact_origin,omitempty"`
	TaskOrigin     *TaskOrigin     `json:"task_origin,omitempty"`
}

type Playbook

type Playbook struct {
	Name  string           `json:"name"`
	Tasks map[string]*Task `json:"tasks"`
}

type PlaybookResponse

type PlaybookResponse struct {
	Name  string                   `json:"name"`
	Tasks map[string]*TaskResponse `json:"tasks"`
}

type PlaybookTemplate

type PlaybookTemplate struct {
	Name string `json:"name"`
	Yaml string `json:"yaml"`
}

type PlaybookTemplateForm

type PlaybookTemplateForm struct {
	ID   *string `json:"id,omitempty"`
	Yaml string  `json:"yaml"`
}

type PlaybookTemplateResponse

type PlaybookTemplateResponse struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Yaml string `json:"yaml"`
}

type Reference

type Reference struct {
	Href string `json:"href"`
	Name string `json:"name"`
}

type ReferenceArray added in v0.8.0

type ReferenceArray []*Reference

type Settings

type Settings struct {
	ArtifactKinds  []*Type `json:"artifactKinds"`
	ArtifactStates []*Type `json:"artifactStates"`
	Timeformat     string  `json:"timeformat"`
}

type SettingsResponse added in v0.9.0

type SettingsResponse struct {
	ArtifactKinds  []*Type               `json:"artifactKinds"`
	ArtifactStates []*Type               `json:"artifactStates"`
	Roles          []string              `json:"roles,omitempty"`
	TicketTypes    []*TicketTypeResponse `json:"ticketTypes"`
	Tier           string                `json:"tier"`
	Timeformat     string                `json:"timeformat"`
	Version        string                `json:"version"`
}

type Statistics

type Statistics struct {
	OpenTicketsPerUser map[string]int `json:"open_tickets_per_user"`
	TicketsPerType     map[string]int `json:"tickets_per_type"`
	TicketsPerWeek     map[string]int `json:"tickets_per_week"`
	Unassigned         int            `json:"unassigned"`
}

type Task

type Task struct {
	Automation *string           `json:"automation,omitempty"`
	Closed     *time.Time        `json:"closed,omitempty"`
	Created    time.Time         `json:"created"`
	Data       map[string]any    `json:"data,omitempty"`
	Done       bool              `json:"done"`
	Join       *bool             `json:"join,omitempty"`
	Name       string            `json:"name"`
	Next       map[string]string `json:"next,omitempty"`
	Owner      *string           `json:"owner,omitempty"`
	Payload    map[string]string `json:"payload,omitempty"`
	Schema     map[string]any    `json:"schema,omitempty"`
	Type       string            `json:"type"`
}

type TaskOrigin

type TaskOrigin struct {
	PlaybookId string `json:"playbook_id"`
	TaskId     string `json:"task_id"`
	TicketId   int64  `json:"ticket_id"`
}

type TaskResponse

type TaskResponse struct {
	Active     bool              `json:"active"`
	Automation *string           `json:"automation,omitempty"`
	Closed     *time.Time        `json:"closed,omitempty"`
	Created    time.Time         `json:"created"`
	Data       map[string]any    `json:"data,omitempty"`
	Done       bool              `json:"done"`
	Join       *bool             `json:"join,omitempty"`
	Name       string            `json:"name"`
	Next       map[string]string `json:"next,omitempty"`
	Order      int64             `json:"order"`
	Owner      *string           `json:"owner,omitempty"`
	Payload    map[string]string `json:"payload,omitempty"`
	Schema     map[string]any    `json:"schema,omitempty"`
	Type       string            `json:"type"`
}

type TaskWithContext

type TaskWithContext struct {
	PlaybookId   string        `json:"playbook_id"`
	PlaybookName string        `json:"playbook_name"`
	Task         *TaskResponse `json:"task"`
	TaskId       string        `json:"task_id"`
	TicketId     int64         `json:"ticket_id"`
	TicketName   string        `json:"ticket_name"`
}

type Ticket

type Ticket struct {
	Artifacts  []*Artifact          `json:"artifacts,omitempty"`
	Comments   []*Comment           `json:"comments,omitempty"`
	Created    time.Time            `json:"created"`
	Details    map[string]any       `json:"details,omitempty"`
	Files      []*File              `json:"files,omitempty"`
	Modified   time.Time            `json:"modified"`
	Name       string               `json:"name"`
	Owner      *string              `json:"owner,omitempty"`
	Playbooks  map[string]*Playbook `json:"playbooks,omitempty"`
	Read       []string             `json:"read,omitempty"`
	References []*Reference         `json:"references,omitempty"`
	Schema     string               `json:"schema"`
	Status     string               `json:"status"`
	Type       string               `json:"type"`
	Write      []string             `json:"write,omitempty"`
}

type TicketForm

type TicketForm struct {
	Artifacts  []*Artifact             `json:"artifacts,omitempty"`
	Comments   []*Comment              `json:"comments,omitempty"`
	Created    *time.Time              `json:"created,omitempty"`
	Details    map[string]any          `json:"details,omitempty"`
	Files      []*File                 `json:"files,omitempty"`
	ID         *int64                  `json:"id,omitempty"`
	Modified   *time.Time              `json:"modified,omitempty"`
	Name       string                  `json:"name"`
	Owner      *string                 `json:"owner,omitempty"`
	Playbooks  []*PlaybookTemplateForm `json:"playbooks,omitempty"`
	Read       []string                `json:"read,omitempty"`
	References []*Reference            `json:"references,omitempty"`
	Schema     *string                 `json:"schema,omitempty"`
	Status     string                  `json:"status"`
	Type       string                  `json:"type"`
	Write      []string                `json:"write,omitempty"`
}

type TicketFormArray added in v0.8.0

type TicketFormArray []*TicketForm

type TicketList

type TicketList struct {
	Count   int                     `json:"count"`
	Tickets []*TicketSimpleResponse `json:"tickets"`
}

type TicketResponse

type TicketResponse struct {
	Artifacts  []*Artifact                  `json:"artifacts,omitempty"`
	Comments   []*Comment                   `json:"comments,omitempty"`
	Created    time.Time                    `json:"created"`
	Details    map[string]any               `json:"details,omitempty"`
	Files      []*File                      `json:"files,omitempty"`
	ID         int64                        `json:"id"`
	Modified   time.Time                    `json:"modified"`
	Name       string                       `json:"name"`
	Owner      *string                      `json:"owner,omitempty"`
	Playbooks  map[string]*PlaybookResponse `json:"playbooks,omitempty"`
	Read       []string                     `json:"read,omitempty"`
	References []*Reference                 `json:"references,omitempty"`
	Schema     string                       `json:"schema"`
	Status     string                       `json:"status"`
	Type       string                       `json:"type"`
	Write      []string                     `json:"write,omitempty"`
}

type TicketSimpleResponse

type TicketSimpleResponse struct {
	Artifacts  []*Artifact          `json:"artifacts,omitempty"`
	Comments   []*Comment           `json:"comments,omitempty"`
	Created    time.Time            `json:"created"`
	Details    map[string]any       `json:"details,omitempty"`
	Files      []*File              `json:"files,omitempty"`
	ID         int64                `json:"id"`
	Modified   time.Time            `json:"modified"`
	Name       string               `json:"name"`
	Owner      *string              `json:"owner,omitempty"`
	Playbooks  map[string]*Playbook `json:"playbooks,omitempty"`
	Read       []string             `json:"read,omitempty"`
	References []*Reference         `json:"references,omitempty"`
	Schema     string               `json:"schema"`
	Status     string               `json:"status"`
	Type       string               `json:"type"`
	Write      []string             `json:"write,omitempty"`
}

type TicketTemplate

type TicketTemplate struct {
	Name   string `json:"name"`
	Schema string `json:"schema"`
}

type TicketTemplateForm

type TicketTemplateForm struct {
	ID     *string `json:"id,omitempty"`
	Name   string  `json:"name"`
	Schema string  `json:"schema"`
}

type TicketTemplateResponse

type TicketTemplateResponse struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Schema string `json:"schema"`
}

type TicketType

type TicketType struct {
	DefaultGroups    []string `json:"default_groups,omitempty"`
	DefaultPlaybooks []string `json:"default_playbooks"`
	DefaultTemplate  string   `json:"default_template"`
	Icon             string   `json:"icon"`
	Name             string   `json:"name"`
}

type TicketTypeForm

type TicketTypeForm struct {
	DefaultGroups    []string `json:"default_groups,omitempty"`
	DefaultPlaybooks []string `json:"default_playbooks"`
	DefaultTemplate  string   `json:"default_template"`
	Icon             string   `json:"icon"`
	ID               *string  `json:"id,omitempty"`
	Name             string   `json:"name"`
}

type TicketTypeResponse

type TicketTypeResponse struct {
	DefaultGroups    []string `json:"default_groups,omitempty"`
	DefaultPlaybooks []string `json:"default_playbooks"`
	DefaultTemplate  string   `json:"default_template"`
	Icon             string   `json:"icon"`
	ID               string   `json:"id"`
	Name             string   `json:"name"`
}

type TicketWithTickets

type TicketWithTickets struct {
	Artifacts         []*Artifact                  `json:"artifacts,omitempty"`
	Comments          []*Comment                   `json:"comments,omitempty"`
	CorrelatedTickets []*TicketSimpleResponse      `json:"correlated_tickets,omitempty"`
	Created           time.Time                    `json:"created"`
	Details           map[string]any               `json:"details,omitempty"`
	Files             []*File                      `json:"files,omitempty"`
	ID                int64                        `json:"id"`
	Logs              []*LogEntry                  `json:"logs,omitempty"`
	Modified          time.Time                    `json:"modified"`
	Name              string                       `json:"name"`
	Owner             *string                      `json:"owner,omitempty"`
	Playbooks         map[string]*PlaybookResponse `json:"playbooks,omitempty"`
	Read              []string                     `json:"read,omitempty"`
	References        []*Reference                 `json:"references,omitempty"`
	Schema            string                       `json:"schema"`
	Status            string                       `json:"status"`
	Tickets           []*TicketSimpleResponse      `json:"tickets,omitempty"`
	Type              string                       `json:"type"`
	Write             []string                     `json:"write,omitempty"`
}

type Type

type Type struct {
	Color *string `json:"color,omitempty"`
	Icon  string  `json:"icon"`
	ID    string  `json:"id"`
	Name  string  `json:"name"`
}

type User

type User struct {
	Apikey  bool     `json:"apikey"`
	Blocked bool     `json:"blocked"`
	Roles   []string `json:"roles"`
	Sha256  *string  `json:"sha256,omitempty"`
}

type UserData

type UserData struct {
	Email      *string `json:"email,omitempty"`
	Image      *string `json:"image,omitempty"`
	Name       *string `json:"name,omitempty"`
	Timeformat *string `json:"timeformat,omitempty"`
}

type UserDataResponse

type UserDataResponse struct {
	Email      *string `json:"email,omitempty"`
	ID         string  `json:"id"`
	Image      *string `json:"image,omitempty"`
	Name       *string `json:"name,omitempty"`
	Timeformat *string `json:"timeformat,omitempty"`
}

type UserForm

type UserForm struct {
	Apikey  bool     `json:"apikey"`
	Blocked bool     `json:"blocked"`
	ID      string   `json:"id"`
	Roles   []string `json:"roles"`
}

type UserResponse

type UserResponse struct {
	Apikey  bool     `json:"apikey"`
	Blocked bool     `json:"blocked"`
	ID      string   `json:"id"`
	Roles   []string `json:"roles"`
}

type Widget added in v0.9.0

type Widget struct {
	Aggregation string  `json:"aggregation"`
	Filter      *string `json:"filter,omitempty"`
	Name        string  `json:"name"`
	Type        string  `json:"type"`
	Width       int     `json:"width"`
}

Jump to

Keyboard shortcuts

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