request

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

* @Author: alexander.huang * @Date: 2022-05-26 12:44:17 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-26 12:44:17

* @Author: alexander.huang * @Date: 2022-05-26 12:44:17 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-26 12:44:17

* @Author: alexander.huang * @Date: 2022-05-25 02:53:50 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-25 02:53:50

* @Author: alexander.huang * @Date: 2022-05-25 22:53:50 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-25 22:53:50

* @Author: alexander.huang * @Date: 2022-05-26 12:44:17 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-26 12:44:17

* @Author: alexander.huang * @Date: 2022-05-19 01:14:50 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-23 21:40:51

* @Author: alexander.huang * @Date: 2022-05-19 01:14:50 * @Last Modified by: alexander.huang * @Last Modified time: 2022-05-23 21:40:51

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorMsg

func GetErrorMsg(request interface{}, err error) string

get error msg

Types

type Comment

type Comment struct {
	UserId      uint64 `form:"user_id" json:"user_id" `
	VideoId     uint64 `form:"video_id" json:"video_id" `
	CommentId   uint64 `form:"comment_id" json:"comment_id" `
	CommentText string `form:"comment_text" json:"comment_text" `
	Token       string `form:"token" json:"token" `
	ActionType  int32  `form:"action_type" json:"action_type" `
}

type CommentList

type CommentList struct {
	VideoId uint64 `form:"video_id" json:"video_id" `
	Token   string `form:"token" json:"token" `
}

type Favorite

type Favorite struct {
	UserId     uint64 `form:"user_id" json:"user_id" `
	VideoId    uint64 `form:"video_id" json:"video_id" `
	Token      string `form:"token" json:"token" `
	ActionType int32  `form:"action_type" json:"action_type" `
}

type FavoriteList

type FavoriteList struct {
	UserId uint64 `form:"user_id" json:"user_id" `
	Token  string `form:"token" json:"token" `
}

type Feed

type Feed struct {
	LatestTime int64  `form:"latest_time" json:"latest_time" `
	Token      string `form:"token" json:"token" `
}

type Login

type Login struct {
	Name     string `form:"name" json:"name" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

func (Login) GetMessages

func (login Login) GetMessages() ValidatorMessages

自定义错误信息

type PublishList

type PublishList struct {
	UserId uint64 `form:"user_id" json:"user_id" `
	Token  string `form:"token" json:"token" `
}

type Register

type Register struct {
	Name     string `form:"name" json:"name" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

func (Register) GetMessages

func (register Register) GetMessages() ValidatorMessages

自定义错误信息

type Relation

type Relation struct {
	UserId     uint64 `form:"user_id" json:"user_id" `
	ToUserId   uint64 `form:"to_user_id" json:"to_user_id" `
	Token      string `form:"token" json:"token" `
	ActionType int32  `form:"action_type" json:"action_type" `
}

type RelationFollowList

type RelationFollowList struct {
	UserId uint64 `form:"user_id" json:"user_id" `
	Token  string `form:"token" json:"token" `
}

关注列表request

type RelationFollowerList

type RelationFollowerList struct {
	UserId uint64 `form:"user_id" json:"user_id" `
	Token  string `form:"token" json:"token" `
}

粉丝列表request

type Validator

type Validator interface {
	GetMessages() ValidatorMessages
}

type ValidatorMessages

type ValidatorMessages map[string]string

type VideoUpload

type VideoUpload struct {
	Data  *multipart.FileHeader `form:"data" json:"data" binding:"required"`
	Token string                `form:"token" json:"token"`
	Title string                `form:"title" json:"title" binding:"required"`
}

func (VideoUpload) GetMessages

func (videoUpload VideoUpload) GetMessages() ValidatorMessages

Jump to

Keyboard shortcuts

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