mongo

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdSort = internal.IdSorter
)

Variables

Functions

This section is empty.

Types

type UserMongoModel

type UserMongoModel interface {
	Insert(ctx context.Context, data *internal.User) error
	FindOne(ctx context.Context, id string) (*internal.User, error)
	Update(ctx context.Context, data *internal.User) error
	Delete(ctx context.Context, id string) error
	UpsertUser(ctx context.Context, data *internal.User) error
}

UserMongoModel is an interface to be customized, add more methods here, and implement the added methods in defaultUserModel.

func NewUserModel

func NewUserModel(url, db string, c cache.CacheConf) UserMongoModel

NewUserModel returns a model for the mongo.

Jump to

Keyboard shortcuts

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