mbsd

package
v0.9.56 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 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)

func TodayVisitCount added in v0.9.33

func TodayVisitCount() (int64, error)

Types

type Between24HourUserCountResponse added in v0.9.31

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

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"`
	Count int    `json:"count"`
}

func Between30Count added in v0.9.28

func Between30Count() ([]DateCount, error)

func Between30UserCount added in v0.9.28

func Between30UserCount() ([]DateCount, error)

func Hr7DayUse added in v0.9.53

func Hr7DayUse(userIds []string) ([]DateCount, []string, error)

func WorkReport7DayUse added in v0.9.53

func WorkReport7DayUse(userIds []string) ([]DateCount, []string, 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 HourCount added in v0.9.31

type HourCount struct {
	Hour  int `json:"hour"`
	Count int `json:"count"`
}

func Between24HourUserCount added in v0.9.31

func Between24HourUserCount() ([]HourCount, error)

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)

type TodayVisitCountResponse added in v0.9.33

type TodayVisitCountResponse struct {
	Info int64 `json:"info"`
	// contains filtered or unexported fields
}

type UserIdsQuery added in v0.9.53

type UserIdsQuery struct {
	UserIds []string `json:"userIds"`
}

type UserUseFuncResponse added in v0.9.53

type UserUseFuncResponse struct {
	Infos []DateCount `json:"infos"`
	Users []string    `json:"users"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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