chat

package
v0.0.0-...-cc739ab Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAttribute

func NewAttribute(db *mongo.Database) (chat.AttributeInterface, error)

Types

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

func (o *Attribute) Search(ctx context.Context, keyword string, genders []int32, pagination pagination.Pagination) (int64, []*chat.Attribute, error)

func (*Attribute) SearchNormalUser

func (o *Attribute) SearchNormalUser(ctx context.Context, keyword string, forbiddenIDs []string, gender int32, pagination pagination.Pagination) (int64, []*chat.Attribute, error)

func (*Attribute) SearchUser

func (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*chat.Attribute, error)

func (*Attribute) SearchUserID

func (o *Attribute) SearchUserID(ctx context.Context, keyword string, userIDs []string, pagination pagination.Pagination) (int64, []string, 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

Jump to

Keyboard shortcuts

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