Documentation ¶
Index ¶
- func NewAccount(db *mongo.Database) (chat.AccountInterface, error)
- func NewAttribute(db *mongo.Database) (chat.AttributeInterface, error)
- func NewRegister(db *mongo.Database) (chat.RegisterInterface, error)
- func NewUserLoginRecord(db *mongo.Database) (chat.UserLoginRecordInterface, error)
- func NewVerifyCode(db *mongo.Database) (chat.VerifyCodeInterface, error)
- type Account
- func (o *Account) Create(ctx context.Context, accounts ...*chat.Account) error
- func (o *Account) Delete(ctx context.Context, userIDs []string) error
- func (o *Account) Take(ctx context.Context, userId string) (*chat.Account, error)
- func (o *Account) Update(ctx context.Context, userID string, data map[string]any) error
- func (o *Account) UpdatePassword(ctx context.Context, userId string, password string) error
- type Attribute
- func (o *Attribute) Create(ctx context.Context, attribute ...*chat.Attribute) error
- func (o *Attribute) Delete(ctx context.Context, userIDs []string) error
- func (o *Attribute) Find(ctx context.Context, userIds []string) ([]*chat.Attribute, error)
- func (o *Attribute) FindAccount(ctx context.Context, accounts []string) ([]*chat.Attribute, error)
- func (o *Attribute) FindPhone(ctx context.Context, phoneNumbers []string) ([]*chat.Attribute, error)
- func (o *Attribute) Search(ctx context.Context, keyword string, genders []int32, ...) (int64, []*chat.Attribute, error)
- func (o *Attribute) SearchNormalUser(ctx context.Context, keyword string, forbiddenIDs []string, gender int32, ...) (int64, []*chat.Attribute, error)
- func (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, ...) (int64, []*chat.Attribute, error)
- func (o *Attribute) Take(ctx context.Context, userID string) (*chat.Attribute, error)
- func (o *Attribute) TakeAccount(ctx context.Context, account string) (*chat.Attribute, error)
- func (o *Attribute) TakeEmail(ctx context.Context, email string) (*chat.Attribute, error)
- func (o *Attribute) TakePhone(ctx context.Context, areaCode string, phoneNumber string) (*chat.Attribute, error)
- func (o *Attribute) Update(ctx context.Context, userID string, data map[string]any) error
- type Register
- type UserLoginRecord
- func (o *UserLoginRecord) CountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, int64, error)
- func (o *UserLoginRecord) CountTotal(ctx context.Context, before *time.Time) (count int64, err error)
- func (o *UserLoginRecord) Create(ctx context.Context, records ...*chat.UserLoginRecord) error
- type VerifyCode
- func (o *VerifyCode) Add(ctx context.Context, ms []*chat.VerifyCode) error
- func (o *VerifyCode) Delete(ctx context.Context, id string) error
- func (o *VerifyCode) Incr(ctx context.Context, id string) error
- func (o *VerifyCode) RangeNum(ctx context.Context, account string, start time.Time, end time.Time) (int64, error)
- func (o *VerifyCode) TakeLast(ctx context.Context, account string) (*chat.VerifyCode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccount ¶
func NewAccount(db *mongo.Database) (chat.AccountInterface, error)
func NewAttribute ¶
func NewAttribute(db *mongo.Database) (chat.AttributeInterface, error)
func NewRegister ¶
func NewRegister(db *mongo.Database) (chat.RegisterInterface, error)
func NewUserLoginRecord ¶
func NewUserLoginRecord(db *mongo.Database) (chat.UserLoginRecordInterface, error)
func NewVerifyCode ¶
func NewVerifyCode(db *mongo.Database) (chat.VerifyCodeInterface, error)
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
func (*Attribute) FindAccount ¶
func (*Attribute) SearchNormalUser ¶
func (*Attribute) SearchUser ¶
func (*Attribute) TakeAccount ¶
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
func (*Register) CountTotal ¶
type UserLoginRecord ¶
type UserLoginRecord struct {
// contains filtered or unexported fields
}
func (*UserLoginRecord) CountRangeEverydayTotal ¶
func (*UserLoginRecord) CountTotal ¶
func (*UserLoginRecord) Create ¶
func (o *UserLoginRecord) Create(ctx context.Context, records ...*chat.UserLoginRecord) error
type VerifyCode ¶
type VerifyCode struct {
// contains filtered or unexported fields
}
func (*VerifyCode) Add ¶
func (o *VerifyCode) Add(ctx context.Context, ms []*chat.VerifyCode) error
func (*VerifyCode) TakeLast ¶
func (o *VerifyCode) TakeLast(ctx context.Context, account string) (*chat.VerifyCode, error)
Click to show internal directories.
Click to hide internal directories.