log

package
v0.0.0-...-75225b0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionName = "log"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IMongoMapper

type IMongoMapper interface {
	Insert(ctx context.Context, l *Log) error
	FindAndCountByInfId(ctx context.Context, infId string, p *basic.PaginationOptions) ([]*Log, int64, error)
	FindAndCountByUserId(ctx context.Context, userId string, p *basic.PaginationOptions) ([]*Log, int64, error)
}

type Log

type Log struct {
	ID              primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	FullInterfaceId string             `bson:"full_interface_id" json:"fullInterfaceId"`
	UserId          string             `bson:"user_id" json:"userId"`
	KeyId           string             `bson:"key_id" json:"keyId"`
	Status          int64              `bson:"status" json:"status"`
	Info            string             `bson:"info" json:"info"`
	Count           int64              `bson:"count" json:"count"`
	Value           int64              `bson:"value" json:"value"`
	Timestamp       time.Time          `bson:"timestamp" json:"timestamp"`
	CreateTime      time.Time          `bson:"create_time,omitempty" json:"createTime,omitempty"`
}

type MongoMapper

type MongoMapper struct {
	// contains filtered or unexported fields
}

func NewMongoMapper

func NewMongoMapper(config *config.Config) *MongoMapper

func (*MongoMapper) FindAndCountByInfId

func (m *MongoMapper) FindAndCountByInfId(ctx context.Context, infId string, p *basic.PaginationOptions) ([]*Log, int64, error)

func (*MongoMapper) Insert

func (m *MongoMapper) Insert(ctx context.Context, l *Log) error

Jump to

Keyboard shortcuts

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