chat

package
v0.0.0-...-5e1152d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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 NewLogs

func NewLogs(db *gorm.DB) chat.LogInterface

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) Create

func (o *Account) Create(ctx context.Context, accounts ...*chat.Account) error

func (*Account) NewTx

func (o *Account) NewTx(tx any) chat.AccountInterface

func (*Account) Take

func (o *Account) Take(ctx context.Context, userId string) (*chat.Account, error)

func (*Account) TakeByAddress

func (o *Account) TakeByAddress(ctx context.Context, address string) (*chat.Account, error)

func (*Account) Update

func (o *Account) Update(ctx context.Context, userID string, data map[string]any) error

func (*Account) UpdatePassword

func (o *Account) UpdatePassword(ctx context.Context, userId string, password string) error

type Attribute

type Attribute struct {
	// contains filtered or unexported fields
}

func (*Attribute) Create

func (o *Attribute) Create(ctx context.Context, attribute ...*chat.Attribute) error

func (*Attribute) Find

func (o *Attribute) Find(ctx context.Context, userIds []string) ([]*chat.Attribute, error)

func (*Attribute) FindAccount

func (o *Attribute) FindAccount(ctx context.Context, accounts []string) ([]*chat.Attribute, error)

func (*Attribute) NewTx

func (o *Attribute) NewTx(tx any) chat.AttributeInterface

func (*Attribute) Search

func (o *Attribute) Search(ctx context.Context, keyword string, genders []int32, page int32, size int32) (uint32, []*chat.Attribute, error)

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 (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pageNumber int32, showNumber int32) (uint32, []*chat.Attribute, error)

func (*Attribute) Take

func (o *Attribute) Take(ctx context.Context, userID string) (*chat.Attribute, error)

func (*Attribute) TakeAccount

func (o *Attribute) TakeAccount(ctx context.Context, account string) (*chat.Attribute, error)

func (*Attribute) TakeEmail

func (o *Attribute) TakeEmail(ctx context.Context, email string) (*chat.Attribute, error)

func (*Attribute) TakePhone

func (o *Attribute) TakePhone(ctx context.Context, areaCode string, phoneNumber string) (*chat.Attribute, error)

func (*Attribute) Update

func (o *Attribute) Update(ctx context.Context, userID string, data map[string]any) error

type Logs

type Logs struct {
	// contains filtered or unexported fields
}

func (*Logs) Create

func (l *Logs) Create(ctx context.Context, log []*chat.Log) error

func (*Logs) Delete

func (l *Logs) Delete(ctx context.Context, logIDs []string, userID string) error

func (*Logs) Get

func (l *Logs) Get(ctx context.Context, logIDs []string, userID string) ([]*chat.Log, error)

func (*Logs) Search

func (l *Logs) Search(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*chat.Log, error)

type Register

type Register struct {
	// contains filtered or unexported fields
}

func (*Register) CountTotal

func (o *Register) CountTotal(ctx context.Context, before *time.Time) (count int64, err error)

func (*Register) Create

func (o *Register) Create(ctx context.Context, registers ...*chat.Register) error

func (*Register) NewTx

func (o *Register) NewTx(tx any) chat.RegisterInterface

type UserLoginRecord

type UserLoginRecord struct {
	// contains filtered or unexported fields
}

func (*UserLoginRecord) CountRangeEverydayTotal

func (o *UserLoginRecord) CountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, int64, error)

func (*UserLoginRecord) CountTotal

func (o *UserLoginRecord) CountTotal(ctx context.Context, before *time.Time) (count int64, err error)

func (*UserLoginRecord) Create

func (o *UserLoginRecord) Create(ctx context.Context, records ...*chat.UserLoginRecord) error

func (*UserLoginRecord) NewTx

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) Delete

func (o *VerifyCode) Delete(ctx context.Context, id uint) error

func (*VerifyCode) Incr

func (o *VerifyCode) Incr(ctx context.Context, id uint) error

func (*VerifyCode) NewTx

func (o *VerifyCode) NewTx(tx any) chat.VerifyCodeInterface

func (*VerifyCode) RangeNum

func (o *VerifyCode) RangeNum(ctx context.Context, account string, start time.Time, end time.Time) (uint32, error)

func (*VerifyCode) TakeLast

func (o *VerifyCode) TakeLast(ctx context.Context, account string) (*chat.VerifyCode, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL