Documentation ¶
Index ¶
Constants ¶
View Source
const (
IdSort = internal.IdSorter
)
Variables ¶
View Source
var Sorters = map[int64]mongop.MongoSorter{ IdSort: (*mongop.IdSorter)(nil), }
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.
Click to show internal directories.
Click to hide internal directories.