Documentation ¶
Index ¶
- Variables
- func FavoriteAction(c *gin.Context)
- func FavoriteList(c *gin.Context)
- func Feed(c *gin.Context)
- func FollowList(c *gin.Context)
- func FollowerList(c *gin.Context)
- func FriendList(c *gin.Context)
- func Login(c *gin.Context)
- func MessageAction(c *gin.Context)
- func MessageChat(c *gin.Context)
- func Publish(c *gin.Context)
- func PublishList(c *gin.Context)
- func Register(c *gin.Context)
- func RelationAction(c *gin.Context)
- func UserInfo(c *gin.Context)
- type ChatResponse
- type FeedResponse
- type UserListResponse
- type UserLoginResponse
- type UserResponse
- type VideoListResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var DemoComments = []models.Comment{ { Id: 1, User: DemoUser, Content: "Test Comment", CreateDate: "05-01", }, }
View Source
var DemoUser = models.UserInfo{ Id: 1, Name: "TestUser", FollowCount: 0, FollowerCount: 0, IsFollow: false, }
View Source
var DemoVideos = []models.Video{ { Id: 1, Author: DemoUser, PlayUrl: "https://www.w3schools.com/html/movie.mp4", CoverUrl: "https://cdn.pixabay.com/photo/2016/03/27/18/10/bear-1283347_1280.jpg", FavoriteCount: 0, CommentCount: 0, IsFavorite: false, }, }
Functions ¶
func FavoriteAction ¶
FavoriteAction no practical effect, just check if token is valid
func FavoriteList ¶
FavoriteList all users have same favorite video list
func FollowerList ¶
FollowerList all users have same follower list
func MessageAction ¶
MessageAction no practical effect, just check if token is valid
func PublishList ¶
PublishList all users have same publish video list
func RelationAction ¶
RelationAction no practical effect, just check if token is valid
Types ¶
type ChatResponse ¶
type ChatResponse struct { models.CommonResponse MessageList []models.Message `json:"message_list"` }
type FeedResponse ¶
type FeedResponse struct { models.CommonResponse VideoList []models.Video `json:"video_list,omitempty"` NextTime int64 `json:"next_time,omitempty"` }
type UserListResponse ¶
type UserListResponse struct { models.CommonResponse UserList []models.UserInfo `json:"user_list"` }
type UserLoginResponse ¶
type UserLoginResponse struct { models.CommonResponse UserId int64 `json:"user_id,omitempty"` Token string `json:"token"` }
type UserResponse ¶
type UserResponse struct { models.CommonResponse User models.User `json:"user"` }
type VideoListResponse ¶
type VideoListResponse struct { models.CommonResponse VideoList []models.Video `json:"video_list"` }
Click to show internal directories.
Click to hide internal directories.