Documentation
¶
Index ¶
- func GetAllFollowingIds(userId uint64) []uint64
- func GetFollowerCount(userId uint64) int64
- func GetFollowerList(userId uint64, page, pageSize int) []*users.EntityComplete
- func GetFollowingCount(userId uint64) int64
- func GetFollowingList(userId uint64, page, pageSize int) []*users.EntityComplete
- func IsFollowing(userId, followUserId uint64) bool
- func SaveOrCreateById(entity *Entity) int64
- type Entity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllFollowingIds ¶ added in v0.1.1
GetAllFollowingIds returns all followed user IDs.
func GetFollowerCount ¶ added in v0.0.3
func GetFollowerList ¶ added in v0.0.7
func GetFollowerList(userId uint64, page, pageSize int) []*users.EntityComplete
GetFollowerList returns followers for a page.
func GetFollowingCount ¶ added in v0.0.3
func GetFollowingList ¶ added in v0.0.7
func GetFollowingList(userId uint64, page, pageSize int) []*users.EntityComplete
GetFollowingList returns followed users for a page.
func IsFollowing ¶ added in v0.1.1
IsFollowing reports whether userId follows followUserId.
func SaveOrCreateById ¶ added in v0.0.3
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"` //
UserId uint64 `` // 主体
/* 141-byte string literal not displayed */
FollowUserId uint64 `` // 被关注者
/* 170-byte string literal not displayed */
Status int `` // 1 关注 0 取消关注
/* 133-byte string literal not displayed */
CreatedAt time.Time `` //
/* 143-byte string literal not displayed */
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}
func GetByUserId ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.