Documentation ¶
Index ¶
- Variables
- func DelOne(c echo.Context) error
- func EraseOne(c echo.Context) error
- func Followers(c echo.Context) error
- func GetOne(c echo.Context) error
- func IdAll(c echo.Context) error
- func IdBatch(c echo.Context) error
- func IdOwn(c echo.Context) error
- func Template(c echo.Context) error
- func ThumbsUp(c echo.Context) error
- func ThumbsUpStatus(c echo.Context) error
- func Upload(c echo.Context) error
- type Attachment
- type Paragraph
- type Post
- type VisualEffects
Constants ¶
This section is empty.
Variables ¶
var (
Cancel context.CancelFunc
)
Functions ¶
func DelOne ¶ added in v0.0.10
func DelOne(c echo.Context) error
@Title delete one Post content @Summary delete one Post content. @Description @Tags Post @Accept json @Produce json @Param id query string true "Post ID for deleting" @Success 200 "OK - delete successfully" @Failure 400 "Fail - incorrect query param id" @Failure 404 "Fail - not found" @Failure 500 "Fail - internal error" @Router /api/post/del/one [delete] @Security ApiKeyAuth
func EraseOne ¶ added in v0.0.10
func EraseOne(c echo.Context) error
@Title erase one Post content @Summary erase one Post content permanently. @Description @Tags Post @Accept json @Produce json @Param id query string true "Post ID for erasing" @Success 200 "OK - erase successfully" @Failure 400 "Fail - incorrect query param id" @Failure 404 "Fail - not found" @Failure 500 "Fail - internal error" @Router /api/post/erase/one [delete] @Security ApiKeyAuth
func Followers ¶ added in v0.0.9
func Followers(c echo.Context) error
@Title get a Post follower-Post ids @Summary get a specified Post follower-Post id group. @Description @Tags Post @Accept json @Produce json @Param followee query string true "followee Post ID" @Success 200 "OK - get successfully" @Failure 404 "Fail - empty follower ids" @Failure 500 "Fail - internal error" @Router /api/post/follower/ids [get] @Security ApiKeyAuth
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 IdAll ¶ added in v0.0.6
func IdAll(c echo.Context) error
@Title get all Post id group @Summary get all Post id group. @Description @Tags Post @Accept json @Produce json @Success 200 "OK - get successfully" @Failure 404 "Fail - empty event ids" @Failure 500 "Fail - internal error" @Router /api/post/ids-all [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 404 "Fail - not found" @Failure 500 "Fail - internal error" @Router /api/post/ids [get] @Security ApiKeyAuth
func IdOwn ¶ added in v0.0.8
func IdOwn(c echo.Context) error
@Title get own Post id group in a specific period @Summary get own Post id group in one specific time period. @Description @Tags Post @Accept json @Produce json @Param period query string false "time period for query, format is 'yyyymm', e.g. '202206'. if missing, current yyyymm applies" @Success 200 "OK - get successfully" @Failure 400 "Fail - incorrect query param type" @Failure 404 "Fail - empty event ids" @Failure 500 "Fail - internal error" @Router /api/post/own/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 ThumbsUp ¶ added in v0.0.10
func ThumbsUp(c echo.Context) error
@Title add or remove a thumbsup for a post @Summary add or remove a personal thumbsup for a post. @Description @Tags Post @Accept json @Produce json @Param id path string true "Post ID (event id) for adding or removing thumbs-up" @Success 200 "OK - added or removed thumb successfully" @Failure 500 "Fail - internal error" @Router /api/post/thumbsup/{id} [patch] @Security ApiKeyAuth
func ThumbsUpStatus ¶ added in v0.0.10
func ThumbsUpStatus(c echo.Context) error
@Title get current user's thumbsup status for a post @Summary get current login user's thumbsup status for a post. @Description @Tags Post @Accept json @Produce json @Param id path string true "Post ID (event id) for checking thumbs-up status" @Success 200 "OK - get thumbs-up status successfully" @Failure 500 "Fail - internal error" @Router /api/post/thumbsup/status/{id} [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 @Param data body string true "filled Post template json file" @Param followee query string false "followee Post ID (empty when doing a new post)" @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 Attachment ¶ added in v0.0.11
type Paragraph ¶ added in v0.0.6
type Paragraph struct { Text string `json:"text"` Atch Attachment `json:"attachment"` }
type Post ¶
type Post struct { Category string `json:"category"` Topic string `json:"topic"` Keywords string `json:"keywords"` Content []Paragraph `json:"content"` VFX VisualEffects `json:"vfx"` }
type VisualEffects ¶ added in v0.0.11
type VisualEffects struct {
Height int `json:"height"`
}