v1

package
v0.0.0-...-5952180 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleCreateReq

type ArticleCreateReq struct {
	Title         string `json:"title" form:"title" binding:"required,min=1,max=255"`
	Sketch        string `json:"sketch" form:"sketch" binding:"min=0,max=255"`
	Content       string `json:"content" form:"content" binding:"required,min=1,max=65535"`
	TagId         int    `json:"tagId" form:"tagId" binding:"required,min=1"`
	Weight        int    `json:"weight" form:"weight" binding:"min=0,max=100"`
	ArticleStatus int    `json:"articleStatus" form:"articleStatus" binding:"required,min=1,max=2"`
}

ArticleCreateReq 文章创建

type ArticleCreateRes

type ArticleCreateRes struct {
	Id int `json:"id"`
}

type ArticleDeleteReq

type ArticleDeleteReq struct {
	Id int `json:"id" form:"id"`
}

ArticleDeleteReq 文章删除

type ArticleDeleteRes

type ArticleDeleteRes struct {
	Id int `json:"id"`
}

type ArticleListReq

type ArticleListReq struct {
	Id            int    `json:"id" form:"id" binding:"min=0"`
	Title         string `json:"title" form:"title" binding:"max=255"`
	TagId         int    `json:"tagId" form:"tagId" binding:"min=0"`
	ArticleStatus int    `json:"articleStatus" form:"articleStatus" binding:"min=0"`
	PageNum       int    `json:"pageNum" form:"pageNum"`
	PageSize      int    `json:"pageSize" form:"pageSize"`
}

ArticleListReq 文章列表

type ArticleListRes

type ArticleListRes struct {
	Lists []model.Article `json:"lists"`
	Total int64           `json:"total"`
}

type ArticleUpdateReq

type ArticleUpdateReq struct {
	Id            int    `json:"id" form:"id"` // 从路由获取注入
	Title         string `json:"title" form:"title" binding:"required,min=1,max=255"`
	Sketch        string `json:"sketch" form:"sketch" binding:"min=0,max=255"`
	Content       string `json:"content" form:"content" binding:"required,min=1,max=65535"`
	TagId         int    `json:"tagId" form:"tagId" binding:"required,min=1"`
	Weight        int    `json:"weight" form:"weight" binding:"min=0,max=100"`
	ArticleStatus int    `json:"articleStatus" form:"articleStatus" binding:"required,min=1,max=2"`
}

ArticleUpdateReq 编辑

type ArticleUpdateRes

type ArticleUpdateRes struct {
	Id int `json:"id"`
}

type CommentCreateReq

type CommentCreateReq struct {
	UserId        int    `json:"userId" form:"userId"` // 登陆状态中获取
	MentionUserId int    `json:"mentionUserId" form:"mentionUserId" binding:"min=0"`
	ArticleId     int    `json:"articleId" form:"articleId" binding:"required,min=0"`
	Content       string `json:"content" form:"content" binding:"required,min=1,max=1024"`
}

CommentCreateReq 创建

type CommentCreateRes

type CommentCreateRes struct {
	Id int `json:"id"`
}

type CommentDeleteReq

type CommentDeleteReq struct {
	Id int `json:"id" form:"id"`
}

CommentDeleteReq 删除

type CommentDeleteRes

type CommentDeleteRes struct {
	Id int `json:"id"`
}

type CommentListReq

type CommentListReq struct {
	Id            int `json:"id" form:"id" binding:"min=0"`
	ArticleId     int `json:"articleId" form:"articleId" binding:"min=0"`
	UserId        int `json:"userId" form:"userId" binding:"min=0"`
	CommentStatus int `json:"commentStatus" form:"commentStatus" binding:"min=0"`
	PageNum       int `json:"pageNum" form:"pageNum"`
	PageSize      int `json:"pageSize" form:"pageSize"`
}

CommentListReq 列表

type CommentListRes

type CommentListRes struct {
	Lists []model.Comment `json:"lists"`
	Total int64           `json:"total"`
}

type CommentUpdateReq

type CommentUpdateReq struct {
	Id            int    `json:"id" form:"id"` // 从路由获取注入
	ArticleId     int    `json:"articleId" form:"articleId" binding:"required,min=0"`
	UserId        int    `json:"userId" form:"userId" binding:"required,min=0"`
	MentionUserId int    `json:"mentionUserId" form:"mentionUserId" binding:"required,min=0"`
	Content       string `json:"content" form:"title" binding:"required,min=1,max=1024"`
	CommentStatus int    `json:"commentStatus" form:"commentStatus" binding:"required,min=1,max=2"`
}

CommentUpdateReq 编辑

type CommentUpdateRes

type CommentUpdateRes struct {
	Id int `json:"id"`
}

type TagAllReq

type TagAllReq struct{}

TagAllReq 标签全列表

type TagAllRes

type TagAllRes struct {
	Lists []model.Tag `json:"lists"`
}

type TagCreateReq

type TagCreateReq struct {
	TagName   string `json:"tagName" form:"tagName" binding:"required,min=1,max=64"`
	Weight    int    `json:"weight" form:"weight" binding:"min=0,max=100"`
	TagStatus int    `json:"tagStatus" form:"tagStatus" binding:"required,min=1,max=2"`
}

TagCreateReq 标签创建

type TagCreateRes

type TagCreateRes struct {
	Id int `json:"id"`
}

type TagDeleteReq

type TagDeleteReq struct {
	Id int `json:"id" form:"id"`
}

TagDeleteReq 标签删除

type TagDeleteRes

type TagDeleteRes struct {
	Id int `json:"id"`
}

type TagListReq

type TagListReq struct {
	Id        int    `json:"id" form:"id" binding:"min=0"`
	TagName   string `json:"tagName" form:"tagName" binding:"max=100"`
	TagStatus int    `json:"tagStatus" form:"tagStatus" binding:"min=0"`
	PageNum   int    `json:"pageNum" form:"pageNum"`
	PageSize  int    `json:"pageSize" form:"pageSize"`
}

TagListReq 标签列表

type TagListRes

type TagListRes struct {
	Lists []model.Tag `json:"lists"`
	Total int64       `json:"total"`
}

type TagUpdateReq

type TagUpdateReq struct {
	Id        int    `json:"id" form:"id"` // 从路由获取注入
	TagName   string `json:"tagName" form:"tagName" binding:"required,min=1,max=64"`
	Weight    int    `json:"weight" form:"weight" binding:"min=0,max=100"`
	TagStatus int    `json:"tagStatus" form:"tagStatus" binding:"required,min=1,max=2"`
}

TagUpdateReq 标签编辑

type TagUpdateRes

type TagUpdateRes struct {
	Id int `json:"id"`
}

type UserChangePwdReq

type UserChangePwdReq struct {
	Pwd      string `json:"pwd" form:"pwd"`           // 旧密码
	Password string `json:"password" form:"password"` // 新密码
	Confirm  string `json:"confirm" form:"confirm"`   // 新密码确认
}

UserChangePwdReq 删除

type UserChangePwdRes

type UserChangePwdRes struct {
	Id int `json:"id"`
}

type UserCreateReq

type UserCreateReq struct {
	Username string `json:"username" form:"username" binding:"required,min=1,max=64"`
	Email    string `json:"email" form:"email" binding:"required,min=1,max=64"`
	Pwd      string `json:"pwd" form:"pwd" binding:"required,min=1,max=64"`
}

UserCreateReq 创建

type UserCreateRes

type UserCreateRes struct {
	Id int `json:"id"`
}

type UserDeleteReq

type UserDeleteReq struct {
	Id int `json:"id" form:"id"`
}

UserDeleteReq 删除

type UserDeleteRes

type UserDeleteRes struct {
	Id int `json:"id"`
}

type UserListReq

type UserListReq struct {
	Id       int    `json:"id" form:"id" binding:"min=0"`
	Username string `json:"title" form:"title" binding:"max=64"`
	PageNum  int    `json:"pageNum" form:"pageNum"`
	PageSize int    `json:"pageSize" form:"pageSize"`
}

UserListReq 列表

type UserListRes

type UserListRes struct {
	Lists []model.User `json:"lists"`
	Total int64        `json:"total"`
}

type UserUpdateReq

type UserUpdateReq struct {
	Id       int    `json:"id" form:"id"` // 从路由获取注入
	Username string `json:"username" form:"username" binding:"required,min=1,max=64"`
	Email    string `json:"email" form:"email" binding:"required,min=1,max=64"`
	Pwd      string `json:"pwd" form:"pwd" binding:"required,min=1,max=64"`
}

UserUpdateReq 编辑

type UserUpdateRes

type UserUpdateRes struct {
	Id int `json:"id"`
}

Jump to

Keyboard shortcuts

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