post

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOne

func GetOne(c echo.Context) error

@Title get one Post content @Summary get one Post content. @Description @Tags Post @Accept json @Produce json @Param id query string true "Post ID for its content" @Success 200 "OK - get successfully" @Failure 400 "Fail - incorrect query param id" @Failure 404 "Fail - not found" @Failure 500 "Fail - internal error" @Router /api/post/one [get] @Security ApiKeyAuth

func IdBatch

func IdBatch(c echo.Context) error

@Title get a batch of Post id group @Summary get a batch of Post id group. @Description @Tags Post @Accept json @Produce json @Param fetchby query string true "time or count" @Param value query string true "recent [value] minutes for time OR most recent [value] count" @Success 200 "OK - get successfully" @Failure 400 "Fail - incorrect query param type" @Failure 500 "Fail - internal error" @Router /api/post/ids [get] @Security ApiKeyAuth

func Template

func Template(c echo.Context) error

@Title Post template @Summary get Post template for dev reference. @Description @Tags Post @Accept json @Produce json @Success 200 "OK - upload successfully" @Router /api/post/template [get] @Security ApiKeyAuth

func Upload

func Upload(c echo.Context) error

@Title upload a Post @Summary upload a Post by filling a Post template. @Description @Tags Post @Accept json @Produce json @Success 200 "OK - upload successfully" @Failure 400 "Fail - incorrect Post format" @Failure 500 "Fail - internal error" @Router /api/post/upload post @Security ApiKeyAuth

Types

type Post

type Post struct {
	Category string `json:"category"`
	Topic    string `json:"topic"`
	Content  []struct {
		Text string `json:"text"`
		Path string `json:"path"`
	} `json:"content"`
	Summary string `json:"summary"`
}

func (Post) String

func (m Post) String() string

Jump to

Keyboard shortcuts

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