Documentation ¶
Overview ¶
Code generated by goctl. DO NOT EDIT.
Index ¶
Constants ¶
View Source
const UserTokenCollectionName = "user_token"
Variables ¶
View Source
var ( ErrNotFound = mon.ErrNotFound ErrInvalidObjectId = errors.New("invalid objectId") )
Functions ¶
This section is empty.
Types ¶
type UserToken ¶
type UserToken struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` Mid int64 `bson:"mid,omitempty" json:"mid,omitempty"` Token string `bson:"token,omitempty" json:"token,omitempty"` RefreshToken string `bson:"refreshToken,omitempty" json:"refreshToken,omitempty"` UpdateAt time.Time `bson:"updateAt,omitempty" json:"updateAt,omitempty"` CreateAt time.Time `bson:"createAt,omitempty" json:"createAt,omitempty"` }
type UserTokenModel ¶
type UserTokenModel interface { FindOneByMid(ctx context.Context, mid int64) (*UserToken, error) UpdateOneByMid(ctx context.Context, data *UserToken) (*mongo.UpdateResult, error) // contains filtered or unexported methods }
UserTokenModel is an interface to be customized, add more methods here, and implement the added methods in customUserTokenModel.
func NewUserTokenModel ¶
func NewUserTokenModel(url, db string, c cache.CacheConf) UserTokenModel
NewUserTokenModel returns a model for the mongo.
Click to show internal directories.
Click to hide internal directories.