entity

package
v1.5.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InterfaceTransferLogColumns = struct {
	ID        string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
	Status    string
	Method    string
	Path      string
	Query     string
	IP        string
	UserAgent string
	Errors    string
	Latency   string
	UserID    string
	RealName  string
	Username  string
	Param     string
}{
	ID:        "id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	DeletedAt: "deleted_at",
	Status:    "status",
	Method:    "method",
	Path:      "path",
	Query:     "query",
	IP:        "ip",
	UserAgent: "user_agent",
	Errors:    "errors",
	Latency:   "latency",
	UserID:    "user_id",
	RealName:  "real_name",
	Username:  "username",
	Param:     "param",
}

InterfaceTransferLogColumns get sql column name.获取数据库列名

Functions

This section is empty.

Types

type InterfaceTransferLog

type InterfaceTransferLog struct {
	Status int    `gorm:"column:status;type:int(3);not null;comment:'http状态码'" json:"status"`     // http状态码
	Method string `gorm:"column:method;type:varchar(32);not null;comment:'http方法'" json:"method"` // http方法
	Path   string `gorm:"column:path;type:varchar(255);not null;comment:'路径'" json:"path"`        // 路径
	Query  string `gorm:"column:query;type:varchar(255);not null;comment:'参数'" json:"query"`      // 参数
	IP     string `gorm:"column:ip;type:varchar(32);not null;comment:'用户IP'" json:"ip"`           // 用户IP
	//UserAgent string      `gorm:"column:user_agent;type:varchar(255);not null;comment:'客户端'" json:"user_agent"` // 客户端
	Errors   string `gorm:"column:errors;type:text;not null;comment:'错误信息'" json:"errors"`              // 错误信息
	Latency  int    `gorm:"column:latency;type:int(32);not null;comment:'延迟(单位:毫秒)'" json:"latency"`    // 延迟(单位:毫秒)
	UserID   int64  `gorm:"column:user_id;type:bigint(10);not null;comment:'用户id'" json:"user_id"`      // 用户id
	RealName string `gorm:"column:real_name;type:varchar(64);not null;comment:'真实姓名'" json:"real_name"` // 真实姓名
	Username string `gorm:"column:username;type:varchar(32);not null;comment:'用户名'" json:"username"`    // 用户名
	Param    string `gorm:"column:param;type:text;default:null;comment:'请求body信息'" json:"param"`        // 请求body信息
	ResBody  string `gorm:"column:res_body;type:text;default:null;comment:'请求body信息'" json:"res_body"`  // 请求body信息
	LogType  string `json:"log_type"`                                                                   // 日志类型
	//Token     string      `json:"token"`
	Header http.Header `json:"header"` // 请求头
}

func (*InterfaceTransferLog) TableName

func (m *InterfaceTransferLog) TableName() string

TableName get sql table name.获取数据库表名

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL