web

package
v0.0.0-...-6730fbd Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category4PostDraft

type Category4PostDraft struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type PageRequest

type PageRequest struct {
	// 当前页
	PageNo int64 `form:"pageNo" binding:"required"`
	// 每页数量
	PageSize int64 `form:"pageSize" binding:"required"`
	// 排序字段
	Field string `form:"sortField,omitempty"`
	// 排序规则
	Order string `form:"sortOrder,omitempty"`
	// 搜索内容
	Keyword string `form:"keyword,omitempty"`
}

type PostDraftBriefVO

type PostDraftBriefVO struct {
	Id        string `json:"id"`
	Title     string `json:"title"`
	CreatedAt int64  `json:"created_at"`
}

type PostDraftHandler

type PostDraftHandler struct {
	// contains filtered or unexported fields
}

func NewPostDraftHandler

func NewPostDraftHandler(serv service.IPostDraftService) *PostDraftHandler

func (*PostDraftHandler) DeletePostDraft

func (h *PostDraftHandler) DeletePostDraft(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*PostDraftHandler) GetPostDraftPage

func (*PostDraftHandler) RegisterGinRoutes

func (h *PostDraftHandler) RegisterGinRoutes(engine *gin.Engine)

func (*PostDraftHandler) SavePostDraft

func (h *PostDraftHandler) SavePostDraft(ctx *gin.Context, req PostDraftRequest) (*apiwrap.ResponseBody[map[string]string], error)

type PostDraftRequest

type PostDraftRequest struct {
	Id               string               `json:"id"`
	Author           string               `json:"author"`
	Title            string               `json:"title"`
	Summary          string               `json:"summary"`
	Content          string               `json:"content"`
	CoverImg         string               `json:"cover_img"`
	Categories       []Category4PostDraft `json:"categories"`
	Tags             []Tag4PostDraft      `json:"tags"`
	StickyWeight     int                  `json:"sticky_weight"`
	IsDisplayed      bool                 `json:"is_displayed"`
	MetaDescription  string               `json:"meta_description"`
	MetaKeywords     string               `json:"meta_keywords"`
	WordCount        int                  `json:"word_count"`
	IsCommentAllowed bool                 `json:"is_comment_allowed"`
	CreatedAt        int64                `json:"created_at"`
}

type PostDraftVO

type PostDraftVO struct {
	Id               string               `json:"id"`
	Author           string               `json:"author"`
	Title            string               `json:"title"`
	Summary          string               `json:"summary"`
	Content          string               `json:"content"`
	CoverImg         string               `json:"cover_img"`
	Categories       []Category4PostDraft `json:"categories"`
	Tags             []Tag4PostDraft      `json:"tags"`
	StickyWeight     int                  `json:"sticky_weight"`
	IsDisplayed      bool                 `json:"is_displayed"`
	MetaDescription  string               `json:"meta_description"`
	MetaKeywords     string               `json:"meta_keywords"`
	WordCount        int                  `json:"word_count"`
	IsCommentAllowed bool                 `json:"is_comment_allowed"`
	CreatedAt        int64                `json:"created_at"`
}

type Tag4PostDraft

type Tag4PostDraft struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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