response

package
v0.0.0-...-3ac9adb Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS = iota
	WRONGTOKEN
	BADREQUEST
	NOTFOUND
	INTERNALERROR
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID         int64  `json:"id,omitempty"`
	User       User   `json:"user"`
	Content    string `json:"content,omitempty"`
	CreateDate string `json:"create_dat,"`
}

type CommentListResponse

type CommentListResponse struct {
	Response
	CommentList []Comment `json:"comment_list,omitempty"`
}

type CommentResponse

type CommentResponse struct {
	Response
	Comment Comment `json:"comment,omitempty"`
}

type FeedResponse

type FeedResponse struct {
	Response
	VideoList []Video `json:"video_list,omitempty"`
	NextTime  int64   `json:"next_time,omitempty"`
}

type Response

type Response struct {
	StatusCode int32  `json:"status_code"`
	StatusMsg  string `json:"status_msg,omitempty"`
}

type User

type User struct {
	ID            int64  `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	FollowCount   int64  `json:"follow_count"`
	FollowerCount int64  `json:"follower_count"`
	IsFollow      bool   `json:"is_follow"`
}

type UserListResponse

type UserListResponse struct {
	Response
	UserList []User `json:"user_list"`
}

type UserLoginResponse

type UserLoginResponse struct {
	Response
	UserID int64  `json:"user_id,omitempty"`
	Token  string `json:"token"`
}

type UserResponse

type UserResponse struct {
	Response
	User User `json:"user"`
}

type Video

type Video struct {
	ID            int64  `json:"id,omitempty"`
	Author        User   `json:"author"`
	PlayUrl       string `json:"play_url,omitempty"`
	CoverUrl      string `json:"cover_url,omitempty"`
	FavoriteCount int64  `json:"favorite_count,"`
	CommentCount  int64  `json:"comment_count,"`
	IsFavorite    bool   `json:"is_favorite"`
}

type VideoListResponse

type VideoListResponse struct {
	Response
	VideoList []Video `json:"video_list"`
}

Jump to

Keyboard shortcuts

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