Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVersion ¶
Types ¶
type Article ¶
type Article struct { }
func (*Article) Create ¶
@Summary Create a new Article @Description Crete a new Article based on json data @Accept json @Produce json @Tags Article @Param message body controllers.CreateArticleInput true "Article" @success 200 {object} controllers.JSONResult{data=models.Article} "desc" @Router /api/v1/article [post]
func (*Article) Delete ¶
@Summary Deletes a Article @Description Removes a Article from DB @Accept json @Produce json @Tags Article @Param some_id path int true "ArticleID" @success 200 {object} controllers.JSONResult{data=controllers.Deleted} "desc" @Router /api/v1/article/{id} [delete]
func (*Article) Get ¶
@Summary Show an Article @Description get Article by ID @Accept json @Produce json @Tags Article @Param id path int true "Article ID" @success 200 {object} controllers.JSONResult{data=models.Article} "desc" @Router /api/v1/article/{id} [get]
func (*Article) List ¶
@Summary Lists all Articles @Description Lists all Articles @Security ApiKeyAuth @Accept json @Produce json @Tags Article @Success 200 {string} []models.Article @success 200 {object} controllers.JSONResult{data=[]models.Article} "desc" @Router /api/v1/articles [get]
func (*Article) Update ¶
@Summary Update a Article @Description updates a Article by id @Accept json @Produce json @Tags Article @Param some_id path int true "ArticleID" @Param message body controllers.CreateArticleInput true "Article" @success 200 {object} controllers.JSONResult{data=models.Article} "desc" @Router /api/v1/article/{id} [put]
type CreateArticleInput ¶
type JSONResult ¶
type JSONResult struct {
Data interface{} `json:"data"`
}