Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Priority 定义事件的优先级
Priority = 90
)
Variables ¶
View Source
var (
AppName = "event"
)
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Id string `json:"id" bson:"_id"` // mongodb 中的 _id 表示的是对象 id
Who string `json:"who" bson:"who"`
Time int64 `json:"time" bson:"time"`
Ip string `json:"ip" bson:"ip"`
UserAgent string `json:"user_agent" bson:"user_agent"`
Service string `json:"service" bson:"service"` // Service 服务名称 做了什么操作 服务:资源:动作
Namespace string `json:"namespace" bson:"namespace"` // Namespace 命名空间
ResourceType string `json:"resource_type" bson:"resource_type"`
Action string `json:"action" bson:"action"` // 操作类型 <list, get, update, create, delete>
ResourceId string `json:"resource_id" bson:"resource_id"` // ResourceId 详情信息
StatusCode int `json:"status_code" bson:"status_code"`
ErrorMessage string `json:"error_message" bson:"error_message"`
Label map[string]string `json:"label" bson:"label"` // Label 标签
Extras map[string]string `json:"extras" bson:"extras"` // Extras 扩展信息
}
Event 用户操作事件 映射 MongoDB BSON 格式
func (*Event) ToKafkaMessage ¶
type QueryEventRequest ¶
type QueryEventRequest struct {
// 分页参数
*request.PageRequest
}
func NewQueryEventRequest ¶
func NewQueryEventRequest() *QueryEventRequest
Click to show internal directories.
Click to hide internal directories.