Documentation ¶
Overview ¶
Package ticket 封装工单相关操作
Index ¶
- type Option
- type Ticket
- func (t *Ticket) CheckTicketPriority(ticketPriority apistructs.TicketPriority) error
- func (t *Ticket) CheckTicketTarget(ticketTarget apistructs.TicketTarget) error
- func (t *Ticket) CheckTicketType(ticketType apistructs.TicketType) error
- func (t *Ticket) Close(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, ...) error
- func (t *Ticket) CloseByKey(key string) error
- func (t *Ticket) Create(userID user.ID, requestID string, req *apistructs.TicketCreateRequest) (int64, error)
- func (t *Ticket) Delete(targetID, targetType, ticketType string) error
- func (t *Ticket) Get(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, ...) (*apistructs.Ticket, error)
- func (t *Ticket) GetByRequestID(requestID string) (*model.Ticket, error)
- func (t *Ticket) GetClusterTicketsNum(ticketType, targetType, targetID string) (uint64, error)
- func (t *Ticket) IsAlertType(ticketType apistructs.TicketType) bool
- func (t *Ticket) IsSonarType(ticketType apistructs.TicketType) bool
- func (t *Ticket) List(param *apistructs.TicketListRequest) (int64, []apistructs.Ticket, error)
- func (t *Ticket) Reopen(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, ...) error
- func (t *Ticket) Update(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ticket ¶
type Ticket struct {
// contains filtered or unexported fields
}
Ticket 工单操作封装
func (*Ticket) CheckTicketPriority ¶
func (t *Ticket) CheckTicketPriority(ticketPriority apistructs.TicketPriority) error
CheckTicketPriority 检查 ticketPriority 合法性
func (*Ticket) CheckTicketTarget ¶
func (t *Ticket) CheckTicketTarget(ticketTarget apistructs.TicketTarget) error
CheckTicketTarget 检查 ticketTarget 合法性
func (*Ticket) CheckTicketType ¶
func (t *Ticket) CheckTicketType(ticketType apistructs.TicketType) error
CheckTicketType 检查工单类型
func (*Ticket) Close ¶
func (t *Ticket) Close(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, userID user.ID) error
Close 关闭工单
func (*Ticket) Create ¶
func (t *Ticket) Create(userID user.ID, requestID string, req *apistructs.TicketCreateRequest) (int64, error)
Create 创建工单
func (*Ticket) Get ¶
func (t *Ticket) Get(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, userID user.ID) (*apistructs.Ticket, error)
Get 获取工单详情
func (*Ticket) GetByRequestID ¶
GetByRequestID 根据requestID header获取工单
func (*Ticket) GetClusterTicketsNum ¶
TODO deprecated
func (*Ticket) IsAlertType ¶
func (t *Ticket) IsAlertType(ticketType apistructs.TicketType) bool
IsAlertType 判断 ticketType 是否为告警类型
func (*Ticket) IsSonarType ¶
func (t *Ticket) IsSonarType(ticketType apistructs.TicketType) bool
IsSonarType 判断 ticketType 是否为sonar类型
func (*Ticket) List ¶
func (t *Ticket) List(param *apistructs.TicketListRequest) (int64, []apistructs.Ticket, error)
List 工单列表/查询
func (*Ticket) Reopen ¶
func (t *Ticket) Reopen(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, userID user.ID) error
Reopen 重新打开工单
func (*Ticket) Update ¶
func (t *Ticket) Update(permission *permission.Permission, locale *i18n.LocaleResource, ticketID int64, userID user.ID, req *apistructs.TicketUpdateRequestBody) error
Update 更新工单
Click to show internal directories.
Click to hide internal directories.