dao

package
v0.0.0-...-6730fbd Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPostVisitDao

type IPostVisitDao interface {
	Insert(ctx context.Context, postVisit *PostVisit) (string, error)
}

type PostVisit

type PostVisit struct {
	Id        primitive.ObjectID `bson:"_id"`
	PostId    string             `bson:"post_id"`
	Ip        string             `bson:"ip"`
	UserAgent string             `bson:"user_agent"`
	Origin    string             `bson:"origin"`
	Referer   string             `bson:"referer"`
	StayTime  int64              `bson:"stay_time"`
	VisitAt   time.Time          `bson:"visit_at"`
}

type PostVisitDao

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

func NewPostVisitDao

func NewPostVisitDao(db *mongo.Database) *PostVisitDao

func (*PostVisitDao) Insert

func (d *PostVisitDao) Insert(ctx context.Context, postVisit *PostVisit) (string, error)

Jump to

Keyboard shortcuts

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