log

package
v0.0.0-...-c01e1c1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT 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
	FindMany(ctx context.Context, userId string, p basic.PaginationOptions) (logs []*Log, total int64, err error)
}

type Log

type Log struct {
	ID         primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	UserId     string             `bson:"user_id" json:"user_id"`
	Grade      int64              `bson:"grade" json:"grade"`
	Ocr        []string           `bson:"ocr" json:"ocr"`
	Response   string             `bson:"response" json:"response"`
	Status     int                `bson:"status" json:"status"`
	CreateTime time.Time          `bson:"create_time,omitempty" json:"createTime"`
}

type MongoMapper

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

func NewMongoMapper

func NewMongoMapper(config *config.Config) *MongoMapper

func (*MongoMapper) FindMany

func (m *MongoMapper) FindMany(ctx context.Context, userId string, p *basic.PaginationOptions) (logs []*Log, total int64, err 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