db

package
v0.0.0-...-48d44df Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CreateRelation

func CreateRelation(ctx context.Context, relation *model.Relation) error

func CreateUser

func CreateUser(ctx context.Context, user *model.User) error

func DeleteRelation

func DeleteRelation(ctx context.Context, to_user_id int64, follower_id int64) error

func Init

func Init()

func QueryIsFollow

func QueryIsFollow(ctx context.Context, user int64, user_id int64) (bool, error)

func QueryRelation

func QueryRelation(ctx context.Context, to_user_id int64, follower_id int64) ([]*model.Relation, error)

func QueryRelationFollow

func QueryRelationFollow(ctx context.Context, follower_id int64) ([]*model.Relation, error)

query the 关注

func QueryRelationFollower

func QueryRelationFollower(ctx context.Context, to_user_id int64) ([]*model.Relation, error)

query the 粉丝

func QueryUser

func QueryUser(ctx context.Context, userName string) ([]*model.User, error)

func QueryUserById

func QueryUserById(ctx context.Context, users_id []int64) ([]*model.User, error)

func UpdateFollowCount

func UpdateFollowCount(ctx context.Context, to_user_id int64, follower_id int64, flag bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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