Documentation ¶
Index ¶
- func NewAccount(db *mongo.Database) (chat.AccountInterface, error)
- func NewAttribute(db *mongo.Database) (chat.AttributeInterface, error)
- func NewCredential(db *mongo.Database) (chat.CredentialInterface, 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 Credential
- func (o *Credential) Create(ctx context.Context, credential ...*chat.Credential) error
- func (o *Credential) CreateOrUpdateAccount(ctx context.Context, credential *chat.Credential) error
- func (o *Credential) Delete(ctx context.Context, userIDs []string) error
- func (o *Credential) DeleteByUserIDType(ctx context.Context, credentials ...*chat.Credential) error
- func (o *Credential) Find(ctx context.Context, userID string) ([]*chat.Credential, error)
- func (o *Credential) FindAccount(ctx context.Context, accounts []string) ([]*chat.Credential, error)
- func (o *Credential) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*chat.Credential, error)
- func (o *Credential) SearchNormalUser(ctx context.Context, keyword string, forbiddenIDs []string, ...) (int64, []*chat.Credential, error)
- func (o *Credential) SearchUser(ctx context.Context, keyword string, userIDs []string, ...) (int64, []*chat.Credential, error)
- func (o *Credential) Take(ctx context.Context, userID string) (*chat.Credential, error)
- func (o *Credential) TakeAccount(ctx context.Context, account string) (*chat.Credential, error)
- func (o *Credential) 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 NewCredential ¶ added in v1.8.3
func NewCredential(db *mongo.Database) (chat.CredentialInterface, 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 Credential ¶ added in v1.8.3
type Credential struct {
// contains filtered or unexported fields
}
func (*Credential) Create ¶ added in v1.8.3
func (o *Credential) Create(ctx context.Context, credential ...*chat.Credential) error
func (*Credential) CreateOrUpdateAccount ¶ added in v1.8.3
func (o *Credential) CreateOrUpdateAccount(ctx context.Context, credential *chat.Credential) error
func (*Credential) Delete ¶ added in v1.8.3
func (o *Credential) Delete(ctx context.Context, userIDs []string) error
func (*Credential) DeleteByUserIDType ¶ added in v1.8.3
func (o *Credential) DeleteByUserIDType(ctx context.Context, credentials ...*chat.Credential) error
func (*Credential) Find ¶ added in v1.8.3
func (o *Credential) Find(ctx context.Context, userID string) ([]*chat.Credential, error)
func (*Credential) FindAccount ¶ added in v1.8.3
func (o *Credential) FindAccount(ctx context.Context, accounts []string) ([]*chat.Credential, error)
func (*Credential) Search ¶ added in v1.8.3
func (o *Credential) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*chat.Credential, error)
func (*Credential) SearchNormalUser ¶ added in v1.8.3
func (o *Credential) SearchNormalUser(ctx context.Context, keyword string, forbiddenIDs []string, pagination pagination.Pagination) (int64, []*chat.Credential, error)
func (*Credential) SearchUser ¶ added in v1.8.3
func (o *Credential) SearchUser(ctx context.Context, keyword string, userIDs []string, pagination pagination.Pagination) (int64, []*chat.Credential, error)
func (*Credential) Take ¶ added in v1.8.3
func (o *Credential) Take(ctx context.Context, userID string) (*chat.Credential, error)
func (*Credential) TakeAccount ¶ added in v1.8.3
func (o *Credential) TakeAccount(ctx context.Context, account string) (*chat.Credential, error)
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.