Documentation ¶
Index ¶
- func NewAccount(db *gorm.DB) chat.AccountInterface
- func NewAttribute(db *gorm.DB) chat.AttributeInterface
- func NewLogs(db *gorm.DB) chat.LogInterface
- func NewRegister(db *gorm.DB) chat.RegisterInterface
- func NewUserLoginRecord(db *gorm.DB) chat.UserLoginRecordInterface
- type Account
- func (o *Account) Create(ctx context.Context, accounts ...*chat.Account) error
- func (o *Account) NewTx(tx any) chat.AccountInterface
- func (o *Account) Take(ctx context.Context, userId string) (*chat.Account, error)
- func (o *Account) TakeByAddress(ctx context.Context, address 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) Find(ctx context.Context, userIds []string) ([]*chat.Attribute, error)
- func (o *Attribute) FindAccount(ctx context.Context, accounts []string) ([]*chat.Attribute, error)
- func (o *Attribute) NewTx(tx any) chat.AttributeInterface
- func (o *Attribute) Search(ctx context.Context, keyword string, genders []int32, page int32, size int32) (uint32, []*chat.Attribute, error)
- func (o *Attribute) SearchNormalUser(ctx context.Context, keyword string, forbiddenIDs []string, gender int32, ...) (uint32, []*chat.Attribute, error)
- func (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, ...) (uint32, []*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 Logs
- func (l *Logs) Create(ctx context.Context, log []*chat.Log) error
- func (l *Logs) Delete(ctx context.Context, logIDs []string, userID string) error
- func (l *Logs) Get(ctx context.Context, logIDs []string, userID string) ([]*chat.Log, error)
- func (l *Logs) Search(ctx context.Context, keyword string, start time.Time, end time.Time, ...) (uint32, []*chat.Log, 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
- func (o *UserLoginRecord) NewTx(tx any) chat.UserLoginRecordInterface
- type VerifyCode
- func (o *VerifyCode) Add(ctx context.Context, ms []*chat.VerifyCode) error
- func (o *VerifyCode) Delete(ctx context.Context, id uint) error
- func (o *VerifyCode) Incr(ctx context.Context, id uint) error
- func (o *VerifyCode) NewTx(tx any) chat.VerifyCodeInterface
- func (o *VerifyCode) RangeNum(ctx context.Context, account string, start time.Time, end time.Time) (uint32, 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 *gorm.DB) chat.AccountInterface
func NewAttribute ¶
func NewAttribute(db *gorm.DB) chat.AttributeInterface
func NewRegister ¶
func NewRegister(db *gorm.DB) chat.RegisterInterface
func NewUserLoginRecord ¶
func NewUserLoginRecord(db *gorm.DB) chat.UserLoginRecordInterface
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) TakeByAddress ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
func (*Attribute) FindAccount ¶
func (*Attribute) SearchNormalUser ¶
func (o *Attribute) SearchNormalUser(ctx context.Context, keyword string, forbiddenIDs []string, gender int32, page int32, size int32) (uint32, []*chat.Attribute, error)
SearchNormalUser
@Description:添加好友-搜索 @receiver o @param ctx @param keyword @param forbiddenIDs @param gender @param page @param size @return uint32 @return []*chat.Attribute @return error
func (*Attribute) SearchUser ¶
func (*Attribute) TakeAccount ¶
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
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
func (*UserLoginRecord) NewTx ¶
func (o *UserLoginRecord) NewTx(tx any) chat.UserLoginRecordInterface
type VerifyCode ¶
type VerifyCode struct {
// contains filtered or unexported fields
}
func NewVerifyCode ¶
func NewVerifyCode(db *gorm.DB) *VerifyCode
func (*VerifyCode) Add ¶
func (o *VerifyCode) Add(ctx context.Context, ms []*chat.VerifyCode) error
func (*VerifyCode) NewTx ¶
func (o *VerifyCode) NewTx(tx any) chat.VerifyCodeInterface
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.