 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
    const ( ORDER_BY_DESC = "DESC" ORDER_BY_ASC = "ASC" )
      View Source
      
  
const (
	APP_NAME = "task_events"
)
    Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddEventRequest ¶
type AddEventRequest struct {
}
    type Event ¶
type EventSpec ¶
type EventSpec struct {
	// 事件所属资源
	Resource string `json:"resource" gorm:"column:resource;type:varchar(120);" description:"事件所属资源"`
	// 事件发生时间
	Time time.Time `json:"time" gorm:"column:time;type:timestamp;" description:"事件发生时间"`
	// 事件的级别
	Level LEVEL `json:"level" gorm:"column:level;type:tinyint(2);" description:"事件的级别"`
	// 事件信息
	Message string `json:"message" gorm:"column:message;type:text;" description:"事件信息"`
	// 事件详情
	Detail string `json:"detail" gorm:"column:detail;type:text;" description:"事件详情"`
	// 事件标签
	Label map[string]string `json:"label" bson:"label" gorm:"column:label;serializer:json;type:json" description:"事件标签" optional:"true"`
}
    func NewEventSpec ¶
func NewEventSpec() *EventSpec
func (*EventSpec) SetMessage ¶
type QueryEventRequest ¶
type QueryEventRequest struct {
	// 分页参数
	request.PageRequest
	// 事件标签, TaskId
	Label map[string]string `json:"label" bson:"label" description:"事件标签" optional:"true"`
	// 排序方式
	OrderBy ORDER_BY `json:"order_by" bson:"order_by" description:"排序方式" optional:"true"`
}
    func NewQueryEventRequest ¶
func NewQueryEventRequest() *QueryEventRequest
func (*QueryEventRequest) SetLabel ¶
func (r *QueryEventRequest) SetLabel(key, value string) *QueryEventRequest
func (*QueryEventRequest) SetOrderBy ¶
func (r *QueryEventRequest) SetOrderBy(orerBy ORDER_BY) *QueryEventRequest
 Click to show internal directories. 
   Click to hide internal directories.