mbsd

package
v0.9.28 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOperationLog

func CreateOperationLog(port int, timeoutSec int64, topic string, req *CreateOperationLogRequest) error

func Destroy

func Destroy()

func Init

func Init(psub, baseUrl string, timeoutSec time.Duration)

Types

type Between30CountResponse added in v0.9.28

type Between30CountResponse struct {
	Infos []DateCount `json:"infos"`
	// contains filtered or unexported fields
}

type CreateOperationLogRequest

type CreateOperationLogRequest struct {
	Ip           string `json:"ip"`
	Method       string `json:"method"`
	Path         string `json:"path"`
	Agent        string `json:"agent"`
	ErrorMessage string `json:"errorMessage"`
	Body         string `json:"body"`
	Resp         string `json:"resp"`
	UserName     string `json:"userName"`
	CreateBy     string `json:"createBy"`
	Status       int    `json:"status"`
}

type DateCount added in v0.9.28

type DateCount struct {
	Date  string `json:"date,omitempty"`
	Count int    `json:"count,omitempty"`
}

func Between30Count added in v0.9.28

func Between30Count() ([]DateCount, error)

func Between30UserCount added in v0.9.28

func Between30UserCount() ([]DateCount, error)

type GetOperationLogQuery

type GetOperationLogQuery struct {
	Path     string `json:"path"`
	CreateBy string `json:"createBy"`
	Start    string `json:"start"`
	End      string `json:"end"`
	PageNo   int    `json:"pageNo"`
	PageSize int    `json:"pageSize"`
}

type GetOperationLogResponse

type GetOperationLogResponse struct {
	Infos      []OperationLogInfo `json:"infos"`
	TotalCount int64              `json:"totalCount"`
	PageNo     int                `json:"pageNo"`
	// contains filtered or unexported fields
}

type OperationLogInfo

type OperationLogInfo struct {
	ID           string `json:"id"`
	Ip           string `json:"ip"`
	Method       string `json:"method"`
	Path         string `json:"path"`
	Status       int    `json:"status"`
	Agent        string `json:"agent"`
	ErrorMessage string `json:"errorMessage"`
	Body         string `json:"body"`
	Resp         string `json:"resp"`
	UserName     string `json:"userName"`
	CreatedAt    string `json:"createdAt"`
	CreateBy     string `json:"createBy"`
}

func GetOperationLog

func GetOperationLog(query *GetOperationLogQuery) ([]OperationLogInfo, int64, error)

Jump to

Keyboard shortcuts

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