Documentation ¶
Index ¶
- type AuthController
- type BlogController
- func (bc *BlogController) CreateBlog(ctx *fiber.Ctx) error
- func (bc *BlogController) CreateComment(ctx *fiber.Ctx) error
- func (bc *BlogController) DeleteBlog(ctx *fiber.Ctx) error
- func (bc *BlogController) DeleteComment(ctx *fiber.Ctx) error
- func (bc *BlogController) DetailBlog(ctx *fiber.Ctx) error
- func (bc *BlogController) Like(ctx *fiber.Ctx) error
- func (bc *BlogController) ListBlog(ctx *fiber.Ctx) error
- func (bc *BlogController) ListComment(ctx *fiber.Ctx) error
- func (bc *BlogController) UnLike(ctx *fiber.Ctx) error
- func (bc *BlogController) UpdateBlog(ctx *fiber.Ctx) error
- func (bc *BlogController) UpdateComment(ctx *fiber.Ctx) error
- type HealthCheckController
- type IAuthController
- type IBlogController
- type IHealthCheckController
- type ITagController
- type IUserController
- type TagController
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController struct { Context context.Context Config *config.Configuration Logger *logrus.Logger AuthSvc service.IAuthService }
AuthController is an app auth struct that consists of all the dependencies needed for auth controller
func (*AuthController) GoogleLogin ¶
func (ac *AuthController) GoogleLogin(ctx *fiber.Ctx) error
GoogleLogin responsible to handling redirect to google auth services from controller layer
func (*AuthController) GoogleLoginCallback ¶
func (ac *AuthController) GoogleLoginCallback(ctx *fiber.Ctx) error
GoogleLoginCallback responsible to handling callback redirect to API from google auth services from controller layer
func (*AuthController) Login ¶
func (ac *AuthController) Login(ctx *fiber.Ctx) error
Login responsible to log-in data from controller layer
func (*AuthController) RegisterAuthor ¶
func (ac *AuthController) RegisterAuthor(ctx *fiber.Ctx) error
RegisterAuthor responsible to registering data author from controller layer
type BlogController ¶
type BlogController struct { Context context.Context Config *config.Configuration Logger *logrus.Logger BlogSvc service.IBlogService }
BlogController is an app blog struct that consists of all the dependencies needed for blog controller
func (*BlogController) CreateBlog ¶
func (bc *BlogController) CreateBlog(ctx *fiber.Ctx) error
CreateBlog responsible to creating a blog from controller layer
func (*BlogController) CreateComment ¶
func (bc *BlogController) CreateComment(ctx *fiber.Ctx) error
CreateComment responsible to creating a comment from controller layer
func (*BlogController) DeleteBlog ¶
func (bc *BlogController) DeleteBlog(ctx *fiber.Ctx) error
DeleteBlog responsible to deleting a blog by ud from controller layer
func (*BlogController) DeleteComment ¶
func (bc *BlogController) DeleteComment(ctx *fiber.Ctx) error
DeleteComment responsible to deleting a comment by id from controller layer
func (*BlogController) DetailBlog ¶
func (bc *BlogController) DetailBlog(ctx *fiber.Ctx) error
DetailBlog responsible to getting detail a blog by slug from controller layer
func (*BlogController) Like ¶
func (bc *BlogController) Like(ctx *fiber.Ctx) error
Like responsible to creating a like / liking a blog
func (*BlogController) ListBlog ¶
func (bc *BlogController) ListBlog(ctx *fiber.Ctx) error
ListBlog responsible to listing/filter/search a blogs from controller layer
func (*BlogController) ListComment ¶
func (bc *BlogController) ListComment(ctx *fiber.Ctx) error
ListComment responsible to getting comments by blog id from controller layer
func (*BlogController) UnLike ¶
func (bc *BlogController) UnLike(ctx *fiber.Ctx) error
UnLike responsible to deleting a like by id / unliking a blog
func (*BlogController) UpdateBlog ¶
func (bc *BlogController) UpdateBlog(ctx *fiber.Ctx) error
UpdateBlog responsible to updating a blog by id from controller layer
func (*BlogController) UpdateComment ¶
func (bc *BlogController) UpdateComment(ctx *fiber.Ctx) error
UpdateComment responsible to updating a comment by id from controller layer
type HealthCheckController ¶
type HealthCheckController struct { Context context.Context Config *config.Configuration Logger *logrus.Logger HealthCheckSvc service.IHealthCheckService }
HealthCheckController is an app health check struct that consists of all the dependencies needed for health check controller
func (*HealthCheckController) HealthCheck ¶
func (hcc *HealthCheckController) HealthCheck(ctx *fiber.Ctx) error
HealthCheck controller layer to checking databases is ok or not
type IAuthController ¶
type IAuthController interface { RegisterAuthor(ctx *fiber.Ctx) error GoogleLogin(ctx *fiber.Ctx) error GoogleLoginCallback(ctx *fiber.Ctx) error Login(ctx *fiber.Ctx) error }
IAuthController is an interface that has all the function to be implemented inside auth controller
type IBlogController ¶
type IBlogController interface { CreateBlog(ctx *fiber.Ctx) error ListBlog(ctx *fiber.Ctx) error DetailBlog(ctx *fiber.Ctx) error UpdateBlog(ctx *fiber.Ctx) error DeleteBlog(ctx *fiber.Ctx) error CreateComment(ctx *fiber.Ctx) error UpdateComment(ctx *fiber.Ctx) error ListComment(ctx *fiber.Ctx) error DeleteComment(ctx *fiber.Ctx) error Like(ctx *fiber.Ctx) error UnLike(ctx *fiber.Ctx) error }
IBlogController is an interface that has all the function to be implemented inside blog controller
type IHealthCheckController ¶
type IHealthCheckController interface {
HealthCheck(ctx *fiber.Ctx) error
}
IHealthCheckController is an interface that has all the function to be implemented inside health check controller
type ITagController ¶
type ITagController interface { CreateTag(ctx *fiber.Ctx) error ListTag(ctx *fiber.Ctx) error UpdateTag(ctx *fiber.Ctx) error DeleteTag(ctx *fiber.Ctx) error }
ITagController is an interface that has all the function to be implemented inside tag controller
type IUserController ¶
type IUserController interface { ListUser(ctx *fiber.Ctx) error DetailUser(ctx *fiber.Ctx) error UpdateUser(ctx *fiber.Ctx) error DeleteUser(ctx *fiber.Ctx) error }
IUserController is an interface that has all the function to be implemented inside user controller
type TagController ¶
type TagController struct { Context context.Context Config *config.Configuration Logger *logrus.Logger TagSvc service.ITagService }
TagController is an app tag struct that consists of all the dependencies needed for tag controller
func (*TagController) CreateTag ¶
func (tc *TagController) CreateTag(ctx *fiber.Ctx) error
CreateTag responsible to creating a tag of blog from controller layer
func (*TagController) DeleteTag ¶
func (tc *TagController) DeleteTag(ctx *fiber.Ctx) error
DeleteTag responsible to deleting a tag of blog by id from controller layer
func (*TagController) ListTag ¶
func (tc *TagController) ListTag(ctx *fiber.Ctx) error
ListTag responsible to getting all tag of blog from controller layer
func (*TagController) UpdateTag ¶
func (tc *TagController) UpdateTag(ctx *fiber.Ctx) error
UpdateTag responsible to updating a tag of blog by id from controller layer
type UserController ¶
type UserController struct { Context context.Context Config *config.Configuration Logger *logrus.Logger UserSvc service.IUserService }
UserController is an app tag struct that consists of all the dependencies needed for user controller
func (*UserController) DeleteUser ¶
func (uc *UserController) DeleteUser(ctx *fiber.Ctx) error
DeleteUser responsible to delete a user by id from controller layer
func (*UserController) DetailUser ¶
func (uc *UserController) DetailUser(ctx *fiber.Ctx) error
DetailUser responsible to get a user by id from controller layer
func (*UserController) ListUser ¶
func (uc *UserController) ListUser(ctx *fiber.Ctx) error
ListUser responsible to getting all user from controller layer
func (*UserController) UpdateUser ¶
func (uc *UserController) UpdateUser(ctx *fiber.Ctx) error
UpdateUser responsible to update a user by id from controller layer