Documentation ¶
Index ¶
- Constants
- func CommentHandler(c *gin.Context)
- func CommentListHandler(c *gin.Context)
- func DeleteCommentHandler(c *gin.Context)
- func FollowActionHandler(c *gin.Context)
- func GetFollowListHandler(c *gin.Context)
- func GetFollowerListHandler(c *gin.Context)
- func GetFriendListHandler(c *gin.Context)
- func GetUserInfoHandler(c *gin.Context)
- func LoginHandler(c *gin.Context)
- func Ping(c *gin.Context)
- func PublishCommentHandler(c *gin.Context, userId int64)
- func Register(r *gin.Engine)
- func RegisterHandler(c *gin.Context)
- func VideoFavoriteHandler(c *gin.Context)
- func VideoFavoriteListHandler(c *gin.Context)
- func VideoFeedHandler(c *gin.Context)
- func VideoPublishHandler(c *gin.Context)
- func VideoPublishedListHandler(c *gin.Context)
- type RegisterReq
- type RelationReq
Constants ¶
View Source
const ( PublishCommentType = "1" DeleteCommentType = "2" MaxCommentLen = 500 )
View Source
const (
FeedLimit = 30
)
Variables ¶
This section is empty.
Functions ¶
func CommentHandler ¶
func CommentListHandler ¶
func DeleteCommentHandler ¶
func FollowActionHandler ¶
func GetFollowListHandler ¶
func GetFollowerListHandler ¶
func GetFriendListHandler ¶
GetFriendListHandler 好友就是 我的粉丝
func GetUserInfoHandler ¶
func LoginHandler ¶
func PublishCommentHandler ¶
func RegisterHandler ¶
func VideoFavoriteHandler ¶
点赞操作:
1: 点赞,直接在favorite表创建 userId与favoriteId进行关联的数据,同时更新video表中 FavoriteCount 属性值 2: 取消点赞,直接删除favorite表中这条记录,同时更新video表中 FavoriteCount 属性值
actionTYpe == 1 点赞
- 先查询有无favorite record,无则创建,有则delete_time = 0
actionType == 2 取消点赞
- delete_time = now()
func VideoFavoriteListHandler ¶
返回点赞list 1. 从favorite表中找出 userId= ?? 符合所有的favorite记录存储在favoriteList中 2. 遍历favoriteList得到videoList
func VideoFeedHandler ¶
func VideoPublishHandler ¶
Types ¶
type RegisterReq ¶
type RelationReq ¶
Click to show internal directories.
Click to hide internal directories.