trace/define.go

29 lines
835 B
Go
Raw Normal View History

2022-10-15 00:08:32 +08:00
// Package trace ...
//
// Description : trace ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2022-10-14 23:10
package trace
const (
// BehaviorActionTypeStart 开始某一行为
BehaviorActionTypeStart = "start"
// BehaviorActionTypeFinish 完成某一行为
BehaviorActionTypeFinish = "finish"
)
// Behavior 行为信息
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 23:10 2022/10/14
type Behavior struct {
ID int `json:"id"` // 行为ID
Action string `json:"action"` // 行为
Type string `json:"type"` // 行为记录类型
Timestamp int64 `json:"timestamp"` // 触发行为的时间,纳秒时间戳
Data map[string]interface{} `json:"data"` // 本次行为附带的数据
}