msgSdkLog

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package device 设备操作日志

Index

Constants

View Source
const (
	TypeOperation = "operation" //获取日志级别
	TypeReport    = "report"    //日志上报
	TypeUpdate    = "update"    //日志级别改变推送
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Req

type Req struct {
	deviceMsg.CommonMsg
	Params []sdklog `json:"params,optional"` //参数列表
}

func (*Req) GetTimeStamp

func (d *Req) GetTimeStamp(logTime int64) time.Time

func (*Req) VerifyReqParam

func (d *Req) VerifyReqParam() error

type SDKLog

type SDKLog struct {
	ProductID  string    `json:"productID"`  // 产品id
	DeviceName string    `json:"deviceName"` // 设备名称
	Content    string    `json:"content"`    // 具体信息
	Timestamp  time.Time `json:"timestamp"`  // 操作时间
	LogLevel   int64     `json:"logLevel"`
}

type SDKLogRepo

type SDKLogRepo interface {
	GetDeviceSDKLog(ctx context.Context, filter SdkLogFilter, page def.PageInfo2) ([]*SDKLog, error)
	GetCountLog(ctx context.Context, filter SdkLogFilter, page def.PageInfo2) (int64, error)
	Insert(ctx context.Context, data *SDKLog) error
}

type SdkLogFilter

type SdkLogFilter struct {
	ProductID  string // 产品id
	DeviceName string // 设备名称
	LogLevel   int    //日志等级
}

Jump to

Keyboard shortcuts

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