Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DBType string DSN string MaxLifetime int MaxOpenConns int MaxIdleConns int TableName string }
Config 配置参数
type LogItem ¶
type LogItem struct { ID uint `gorm:"column:id;primary_key;auto_increment;"` // id Level string `gorm:"column:level;size:20;index;"` // 日志级别 Message string `gorm:"column:message;size:1024;"` // 消息 TraceID string `gorm:"column:trace_id;size:128;index;"` // 跟踪ID UserID string `gorm:"column:user_id;size:36;index;"` // 用户ID SpanTitle string `gorm:"column:span_title;size:256;"` // 跟踪单元标题 SpanFunction string `gorm:"column:span_function;size:256;"` // 跟踪单元函数名 Data string `gorm:"column:data;type:text;"` // 日志数据(json) Version string `gorm:"column:version;index;size:32;"` // 服务版本号 CreatedAt time.Time `gorm:"column:created_at;index"` // 创建时间 }
LogItem 存储日志项
Click to show internal directories.
Click to hide internal directories.