Documentation
¶
Index ¶
- Constants
- func AddArticle(c *gin.Context)
- func AddTag(c *gin.Context)
- func DeleteArticle(c *gin.Context)
- func DeleteTag(c *gin.Context)
- func EditArticle(c *gin.Context)
- func EditTag(c *gin.Context)
- func ExportTag(c *gin.Context)
- func GenerateArticlePoster(c *gin.Context)
- func GetArticle(c *gin.Context)
- func GetArticles(c *gin.Context)
- func GetTags(c *gin.Context)
- func ImportTag(c *gin.Context)
Constants ¶
const QRCODE_URL = "https://github.com/EDDYCJY/blog#gin%E7%B3%BB%E5%88%97%E7%9B%AE%E5%BD%95"
Variables ¶
This section is empty.
Functions ¶
func AddArticle ¶
@Summary Add an article @Produce json @Param tag_id body int true "TagID" @Param title body string true "Title" @Param desc body string true "Desc" @Param content body string true "Content" @Param created_by body string true "CreatedBy" @Param state body int true "State" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/articles [post]
func AddTag ¶
@Summary Add a tag @Produce json @Param name body string true "Name" @Param state body int false "State" @Param created_by body int false "CreatedBy" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/tags/ [post]
func DeleteArticle ¶
@Summary Delete an article @Produce json @Param id path int true "ID" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/articles/ [delete]
func DeleteTag ¶
@Summary Delete a tag @Produce json @Param id formData int true "ID" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/tags/{id} [delete]
func EditArticle ¶
@Summary Edit an article @Produce json @Param id path int true "ID" @Param tag_id body string false "TagID" @Param title body string false "Title" @Param desc body string false "Desc" @Param content body string false "Content" @Param modified_by body string true "ModifiedBy" @Param state body int false "State" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/articles/ [put]
func EditTag ¶
@Summary Edit a tag @Produce json @Param id path int true "ID" @Param name body string true "ID" @Param state body int false "State" @Param modified_by body string true "ModifiedBy" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/tags/{id} [put]
func GenerateArticlePoster ¶
func GetArticle ¶
@Summary Get an article @Produce json @Param id formData int true "ID" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/articles/ [get]
func GetArticles ¶
@Summary Get all articles @Produce json @Param tag_id body int false "TagID" @Param state body int false "State" @Param created_by body int false "CreatedBy" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /api/v1/articles [get]
Types ¶
This section is empty.