service

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(bus *bus.Bus, database *database.Database, storage *storage.Storage, version string) (*Service, error)

func (*Service) AddArtifact

func (s *Service) AddArtifact(ctx context.Context, i int64, artifact *model.Artifact) (doc *model.TicketWithTickets, err error)

func (*Service) AddComment

func (s *Service) AddComment(ctx context.Context, i int64, form *model.CommentForm) (doc *model.TicketWithTickets, err error)

func (*Service) AddTicketPlaybook

func (s *Service) AddTicketPlaybook(ctx context.Context, i int64, form *model.PlaybookTemplateForm) (doc *model.TicketWithTickets, err error)

func (*Service) CompleteTask

func (s *Service) CompleteTask(ctx context.Context, i int64, s3 string, s2 string, m map[string]any) (doc *model.TicketWithTickets, err error)

func (*Service) CreateAutomation

func (s *Service) CreateAutomation(ctx context.Context, form *model.AutomationForm) (doc *model.AutomationResponse, err error)

func (*Service) CreateDashboard added in v0.9.0

func (s *Service) CreateDashboard(ctx context.Context, dashboard *model.Dashboard) (doc *model.DashboardResponse, err error)

func (*Service) CreatePlaybook

func (s *Service) CreatePlaybook(ctx context.Context, form *model.PlaybookTemplateForm) (doc *model.PlaybookTemplateResponse, err error)

func (*Service) CreateTemplate

func (s *Service) CreateTemplate(ctx context.Context, form *model.TicketTemplateForm) (doc *model.TicketTemplateResponse, err error)

func (*Service) CreateTicket

func (s *Service) CreateTicket(ctx context.Context, form *model.TicketForm) (doc *model.TicketResponse, err error)

func (*Service) CreateTicketBatch

func (s *Service) CreateTicketBatch(ctx context.Context, ticketFormArray *model.TicketFormArray) error

func (*Service) CreateTicketType

func (s *Service) CreateTicketType(ctx context.Context, form *model.TicketTypeForm) (doc *model.TicketTypeResponse, err error)

func (*Service) CreateUser

func (s *Service) CreateUser(ctx context.Context, form *model.UserForm) (doc *model.NewUserResponse, err error)

func (*Service) CurrentUser

func (s *Service) CurrentUser(ctx context.Context) (*model.UserResponse, error)

func (*Service) CurrentUserData

func (s *Service) CurrentUserData(ctx context.Context) (doc *model.UserDataResponse, err error)

func (*Service) DashboardData added in v0.9.0

func (s *Service) DashboardData(ctx context.Context, aggregation string, filter *string) (map[string]any, error)

func (*Service) DeleteAutomation

func (s *Service) DeleteAutomation(ctx context.Context, id string) (err error)

func (*Service) DeleteDashboard added in v0.9.0

func (s *Service) DeleteDashboard(ctx context.Context, id string) (err error)

func (*Service) DeletePlaybook

func (s *Service) DeletePlaybook(ctx context.Context, id string) (err error)

func (*Service) DeleteTemplate

func (s *Service) DeleteTemplate(ctx context.Context, id string) (err error)

func (*Service) DeleteTicket

func (s *Service) DeleteTicket(ctx context.Context, i int64) (err error)

func (*Service) DeleteTicketType

func (s *Service) DeleteTicketType(ctx context.Context, id string) (err error)

func (*Service) DeleteUser

func (s *Service) DeleteUser(ctx context.Context, id string) (err error)

func (*Service) EnrichArtifact

func (s *Service) EnrichArtifact(ctx context.Context, i int64, s2 string, form *model.EnrichmentForm) (doc *model.TicketWithTickets, err error)

func (*Service) GetArtifact

func (s *Service) GetArtifact(ctx context.Context, i int64, s2 string) (*model.Artifact, error)

func (*Service) GetAutomation

func (s *Service) GetAutomation(ctx context.Context, id string) (*model.AutomationResponse, error)

func (*Service) GetDashboard added in v0.9.0

func (s *Service) GetDashboard(ctx context.Context, id string) (*model.DashboardResponse, error)

func (*Service) GetJob

func (s *Service) GetJob(ctx context.Context, id string) (*model.JobResponse, error)

func (*Service) GetLogs

func (s *Service) GetLogs(ctx context.Context, reference string) ([]*model.LogEntry, error)

func (*Service) GetPlaybook

func (s *Service) GetPlaybook(ctx context.Context, id string) (*model.PlaybookTemplateResponse, error)

func (*Service) GetSettings

func (s *Service) GetSettings(ctx context.Context) (*model.SettingsResponse, error)

func (*Service) GetStatistics

func (s *Service) GetStatistics(ctx context.Context) (*model.Statistics, error)

func (*Service) GetTemplate

func (s *Service) GetTemplate(ctx context.Context, id string) (*model.TicketTemplateResponse, error)

func (*Service) GetTicket

func (s *Service) GetTicket(ctx context.Context, i int64) (*model.TicketWithTickets, error)

func (*Service) GetTicketType

func (s *Service) GetTicketType(ctx context.Context, id string) (*model.TicketTypeResponse, error)

func (*Service) GetUser

func (s *Service) GetUser(ctx context.Context, id string) (*model.UserResponse, error)

func (*Service) GetUserData

func (s *Service) GetUserData(ctx context.Context, id string) (*model.UserDataResponse, error)

func (*Service) LinkTicket

func (s *Service) LinkTicket(ctx context.Context, i int64, i2 int64) (*model.TicketWithTickets, error)

func (*Service) ListAutomations

func (s *Service) ListAutomations(ctx context.Context) ([]*model.AutomationResponse, error)

func (*Service) ListDashboards added in v0.9.0

func (s *Service) ListDashboards(ctx context.Context) ([]*model.DashboardResponse, error)

func (*Service) ListJobs

func (s *Service) ListJobs(ctx context.Context) ([]*model.JobResponse, error)

func (*Service) ListPlaybooks

func (s *Service) ListPlaybooks(ctx context.Context) ([]*model.PlaybookTemplateResponse, error)

func (*Service) ListTasks

func (s *Service) ListTasks(ctx context.Context) ([]*model.TaskWithContext, error)

func (*Service) ListTemplates

func (s *Service) ListTemplates(ctx context.Context) ([]*model.TicketTemplateResponse, error)

func (*Service) ListTicketTypes

func (s *Service) ListTicketTypes(ctx context.Context) ([]*model.TicketTypeResponse, error)

func (*Service) ListTickets

func (s *Service) ListTickets(ctx context.Context, ticketType *string, offsetP, countP *int, sort []string, descending []bool, queryP *string) (*model.TicketList, error)

func (*Service) ListUserData

func (s *Service) ListUserData(ctx context.Context) (doc []*model.UserDataResponse, err error)

func (*Service) ListUsers

func (s *Service) ListUsers(ctx context.Context) ([]*model.UserResponse, error)

func (*Service) RemoveArtifact

func (s *Service) RemoveArtifact(ctx context.Context, i int64, s2 string) (doc *model.TicketWithTickets, err error)

func (*Service) RemoveComment

func (s *Service) RemoveComment(ctx context.Context, i int64, i2 int) (doc *model.TicketWithTickets, err error)

func (*Service) RemoveTicketPlaybook

func (s *Service) RemoveTicketPlaybook(ctx context.Context, i int64, s2 string) (doc *model.TicketWithTickets, err error)

func (*Service) RunArtifact

func (s *Service) RunArtifact(ctx context.Context, id int64, name string, automation string) error

func (*Service) RunJob

func (s *Service) RunJob(ctx context.Context, form *model.JobForm) (doc *model.JobResponse, err error)

func (*Service) RunTask

func (s *Service) RunTask(ctx context.Context, i int64, s3 string, s2 string) (err error)

func (*Service) SaveSettings added in v0.9.0

func (s *Service) SaveSettings(ctx context.Context, settings *model.Settings) (*model.SettingsResponse, error)

func (*Service) SetArtifact

func (s *Service) SetArtifact(ctx context.Context, i int64, s2 string, artifact *model.Artifact) (doc *model.TicketWithTickets, err error)

func (*Service) SetReferences

func (s *Service) SetReferences(ctx context.Context, i int64, references *model.ReferenceArray) (doc *model.TicketWithTickets, err error)

func (*Service) SetSchema

func (s *Service) SetSchema(ctx context.Context, i int64, s2 string) (doc *model.TicketWithTickets, err error)

func (*Service) SetTaskData added in v0.8.0

func (s *Service) SetTaskData(ctx context.Context, i int64, s3 string, s2 string, data map[string]any) (doc *model.TicketWithTickets, err error)

func (*Service) SetTaskOwner added in v0.8.0

func (s *Service) SetTaskOwner(ctx context.Context, i int64, s3 string, s2 string, owner string) (doc *model.TicketWithTickets, err error)

func (*Service) UnlinkTicket

func (s *Service) UnlinkTicket(ctx context.Context, i int64, i2 int64) (*model.TicketWithTickets, error)

func (*Service) UpdateAutomation

func (s *Service) UpdateAutomation(ctx context.Context, id string, form *model.AutomationForm) (doc *model.AutomationResponse, err error)

func (*Service) UpdateCurrentUserData

func (s *Service) UpdateCurrentUserData(ctx context.Context, data *model.UserData) (doc *model.UserDataResponse, err error)

func (*Service) UpdateDashboard added in v0.9.0

func (s *Service) UpdateDashboard(ctx context.Context, id string, form *model.Dashboard) (doc *model.DashboardResponse, err error)

func (*Service) UpdateJob

func (s *Service) UpdateJob(ctx context.Context, id string, job *model.JobUpdate) (doc *model.JobResponse, err error)

func (*Service) UpdatePlaybook

func (s *Service) UpdatePlaybook(ctx context.Context, id string, form *model.PlaybookTemplateForm) (doc *model.PlaybookTemplateResponse, err error)

func (*Service) UpdateTemplate

func (s *Service) UpdateTemplate(ctx context.Context, id string, form *model.TicketTemplateForm) (doc *model.TicketTemplateResponse, err error)

func (*Service) UpdateTicket

func (s *Service) UpdateTicket(ctx context.Context, i int64, ticket *model.Ticket) (doc *model.TicketWithTickets, err error)

func (*Service) UpdateTicketType

func (s *Service) UpdateTicketType(ctx context.Context, id string, form *model.TicketTypeForm) (doc *model.TicketTypeResponse, err error)

func (*Service) UpdateUser

func (s *Service) UpdateUser(ctx context.Context, id string, form *model.UserForm) (doc *model.UserResponse, err error)

func (*Service) UpdateUserData

func (s *Service) UpdateUserData(ctx context.Context, id string, data *model.UserData) (doc *model.UserDataResponse, err error)

Jump to

Keyboard shortcuts

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