web

package
v0.0.0-...-fe5f63c Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatePostHandler

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

func NewAggregatePostHandler

func NewAggregatePostHandler(postServ postPkg.Service, postDraftServ post_draft.Service) *AggregatePostHandler

func (*AggregatePostHandler) AdminPublishDraft

func (h *AggregatePostHandler) AdminPublishDraft(ctx *gin.Context, req PostReq) (*apiwrap.ResponseBody[any], error)

func (*AggregatePostHandler) GetPostDraftById

func (h *AggregatePostHandler) GetPostDraftById(ctx *gin.Context) (*apiwrap.ResponseBody[*PostDraftVO], error)

func (*AggregatePostHandler) RegisterGinRoutes

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

type Category4Post

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

type Category4PostDraft

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

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 PostReq

type PostReq 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       []Category4Post `json:"categories"`
	Tags             []Tag4Post      `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"`
	ReferenceIds     []string        `json:"reference_ids"`
}

type Tag4Post

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

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