domain

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	// 主键id
	Id int64
	// 名称
	Name string
	// kratos操作路径
	Operation string
	// trace id
	TraceId string
	// http/ grpc
	Component string
	// 相关表
	Table string
	// 记录主键
	PrimaryKey string
	// user_id
	UserId string
	// 用户名
	Username string
	// 角色
	Role string
	// 请求方法
	Method string
	// 请求路径
	Path string
	// 请求参数
	Request string
	// 返回参数
	Code string
	// 返回信息
	Reason string
	// 请求ip
	IP string
	// 响应时长
	Latency string
	// 响应内容
	Response string
	// 创建时间
	CreatedAt string
}

func ToDomainLog

func ToDomainLog(data interface{}) *Log

ToDomainExample 将pb结构体转换为domain包下的Example结构体

func (*Log) Pb

func (log *Log) Pb() *logV1.Log

Pb 将domain结构体转换为pb结构体

Jump to

Keyboard shortcuts

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