mongodb

package
v0.0.0-...-671c73a Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRelationInfo

func AddRelationInfo(ctx context.Context, followerUid, followedUid int64) error

AddRelationInfo 添加关注信息,通过mongo事务更新两个Documents:关注者的关注列表以及被关注者的粉丝列表

func DeleteRelationInfo

func DeleteRelationInfo(ctx context.Context, followerUid, followedUid int64) error

func GetFollowInfo

func GetFollowInfo(ctx context.Context, uid, toUid int64) (bool, error)

GetFollowInfo 获取关注信息

func GetFollowList

func GetFollowList(ctx context.Context, uid int64) ([]int64, error)

func GetFollowerList

func GetFollowerList(ctx context.Context, uid int64) ([]int64, error)

func GetFriendList

func GetFriendList(ctx context.Context, uid int64) ([]int64, error)

func GetLatestMessage

func GetLatestMessage(ctx context.Context, uid1, uid2 int64) (*model.MongoMessage, error)

Types

type RelationMeta

type RelationMeta struct {
	FollowList   []int64 `bson:"follow_list"`
	FollowerList []int64 `bson:"follower_list"`
}

Jump to

Keyboard shortcuts

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