Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlogController ¶
type BlogController struct {
// contains filtered or unexported fields
}
func NewBlogController ¶
func NewBlogController(msr *mr.MongoDbRepository[*section.SoftwareSection], mysr *myr.MysqlRepository[*section.SoftwareSection], psr *pr.PosgresRepository[*section.SoftwareSection], mbr *mr.MongoDbRepository[*BlogPost], mybr *myr.MysqlRepository[*BlogPost], pbr *pr.PosgresRepository[*BlogPost], mrr *mr.MongoDbRepository[*role.UserRole], myrr *myr.MysqlRepository[*role.UserRole], prr *pr.PosgresRepository[*role.UserRole], mur *mr.MongoDbRepository[*user.User], myur myr.MysqlRepository[*user.User], pur pr.PosgresRepository[*user.User]) *BlogController
func (*BlogController) CreateBlogPost ¶
func (bc *BlogController) CreateBlogPost(c *gin.Context)
CreateBlogPost godoc
@Summary Creates a blog post @Description Creates a blog post @Tags blog @Accept json @Produce json @Param {object} body CreateBlogPostRequest true "Create blog post request" @Success 200 {object} BlogPostResponse @Success 200 {object} BlogPostPublicResponse @Failure 500 {string} string @Failure 403 {string} string @Failure 400 {string} string @Router /api/v1/blog/post/create [post]
func (*BlogController) GetBlogPost ¶
func (bc *BlogController) GetBlogPost(c *gin.Context)
GetBlogPost godoc
@Summary Gets a blog post @Description Gets a blog post @Tags blog @Accept json @Produce json @Param {object} body GetBlogPostRequest true "Get blog post request" @Success 200 {object} BlogPostResponse @Success 200 {object} BlogPostPublicResponse @Failure 500 {string} string @Failure 403 {string} string @Failure 400 {string} string @Router /api/v1/blog/post [post]
func (*BlogController) GetBlogPostList ¶
func (bc *BlogController) GetBlogPostList(c *gin.Context)
GetBlogPostList godoc
@Summary Gets a list of blog post @Description Gets a list of blog post @Tags blog @Accept json @Produce json @Param {object} body GetBlogPostListRequest true "Get blog post list request" @Success 200 {object} []BlogPostResponse @Success 200 {object} []BlogPostPublicResponse @Failure 500 {string} string @Failure 403 {string} string @Failure 400 {string} string @Router /api/v1/blog/post/list [post]
func (*BlogController) RemoveBlogPost ¶
func (bc *BlogController) RemoveBlogPost(c *gin.Context)
RemoveBlogPost godoc
@Summary Removess a blog post @Description Removes a blog post @Tags blog @Accept json @Produce json @Param {object} body RemoveBlogPostRequest true "Remove blog post list request" @Success 200 {string} string @Failure 500 {string} string @Failure 403 {string} string @Failure 400 {string} string @Router /api/v1/blog/post [delete]
func (*BlogController) UpdateBlogPost ¶
func (bc *BlogController) UpdateBlogPost(c *gin.Context)
UpdateBlogPost godoc
@Summary Updates a blog post @Description Updates a blog post @Tags blog @Accept json @Produce json @Param {object} body GetBlogPostListRequest true "Update blog post list request" @Success 200 {object} BlogPostResponse @Success 200 {object} BlogPostPublicResponse @Failure 500 {string} string @Failure 403 {string} string @Failure 400 {string} string @Router /api/v1/blog/post [put]
type BlogPost ¶
type BlogPost struct { Id primitive.ObjectID `bson:"_id"` ID uint mr.MongoDbDatbaseObject myr.MysqlDatabaseObject pr.PosgresDatabaseObject Title string Content string IsDraft bool IsFeatured bool }
type BlogPostPublicResponse ¶
type BlogPostResponse ¶
type CreateBlogPostRequest ¶
type GetBlogPostListRequest ¶
type GetBlogPostRequest ¶
type IBlogController ¶
type RemoveBlogPostRequest ¶
type RemoveBlogPostRequest struct { request.BaseWebRequest MongoDbId string `binding:"required"` MysqlId uint `binding:"required"` PostgresId uint `binding:"required"` }
type UpdateBlogPostRequest ¶
type UpdateBlogPostRequest struct { request.BaseWebRequest MongoDbId string `binding:"required"` // Required MysqlId uint `binding:"required"` // Required PostgresId uint `binding:"required"` // Required Title string Content string IsDraft bool `binding:"required"` // Required IsFeatured bool `binding:"required"` // Required }
Click to show internal directories.
Click to hide internal directories.