Documentation
¶
Index ¶
- type AuthController
- type AuthControllerImpl
- func (ac *AuthControllerImpl) ForgotPassword(ctx *gin.Context)
- func (ac *AuthControllerImpl) Login(ctx *gin.Context)
- func (ac *AuthControllerImpl) Register(ctx *gin.Context)
- func (ac *AuthControllerImpl) ResetPassword(ctx *gin.Context)
- func (ac *AuthControllerImpl) VerifyForgotPassword(ctx *gin.Context)
- func (ac *AuthControllerImpl) VerifyRegister(ctx *gin.Context)
- type HealthCheckController
- type HealthCheckControllerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController interface {
Register(ctx *gin.Context)
VerifyRegister(ctx *gin.Context)
Login(ctx *gin.Context)
ForgotPassword(ctx *gin.Context)
VerifyForgotPassword(ctx *gin.Context)
ResetPassword(ctx *gin.Context)
}
AuthController is an interface that has all the function to be implemented inside auth controller
type AuthControllerImpl ¶
type AuthControllerImpl struct {
Context context.Context
Config *config.Configuration
Logger *logrus.Logger
Tracer *trace.TracerProvider
AuthSvc service.AuthService
}
AuthControllerImpl is an app auth struct that consists of all the dependencies needed for auth controller
func NewAuthController ¶
func NewAuthController(ctx context.Context, config *config.Configuration, logger *logrus.Logger, tracer *trace.TracerProvider, authSvc service.AuthService) *AuthControllerImpl
NewAuthController return new instances auth controller
func (*AuthControllerImpl) ForgotPassword ¶
func (ac *AuthControllerImpl) ForgotPassword(ctx *gin.Context)
Check godoc @Summary Forgot Password customer/merchant @Tags Auth @Accept json @Produce json @Param forgotPassword body model.ForgotPasswordRequest true "forgot password customer/merchant" @Success 200 {object} helper.BaseResponse @Failure 400 {object} helper.BaseResponse @Failure 404 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /forgot-password [post]
func (*AuthControllerImpl) Login ¶
func (ac *AuthControllerImpl) Login(ctx *gin.Context)
Check godoc @Summary Login customer/merchant @Tags Auth @Accept json @Produce json @Param user body model.LoginRequest true "login" @Success 200 {object} helper.BaseResponse @Failure 400 {object} helper.BaseResponse @Failure 404 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /login [post]
func (*AuthControllerImpl) Register ¶
func (ac *AuthControllerImpl) Register(ctx *gin.Context)
Check godoc @Summary Register customer/merchant @Tags Auth @Accept json @Produce json @Param user body model.RegisterRequest true "register customer/merchant" @Success 201 {object} helper.BaseResponse @Failure 400 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /register [post]
func (*AuthControllerImpl) ResetPassword ¶
func (ac *AuthControllerImpl) ResetPassword(ctx *gin.Context)
Check godoc @Summary Reset Password customer/merchant @Tags Auth @Accept json @Produce json @Param code query string true "Code Verification" @Param user_type query string true "customer|merchant" @Param forgotPassword body model.ResetPasswordRequest true "reset password customer/merchant" @Success 200 {object} helper.BaseResponse @Failure 400 {object} helper.BaseResponse @Failure 404 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /reset-password [put]
func (*AuthControllerImpl) VerifyForgotPassword ¶
func (ac *AuthControllerImpl) VerifyForgotPassword(ctx *gin.Context)
Check godoc @Summary Verify Forgot Password customer/merchant @Tags Auth @Accept json @Produce json @Param code query string true "Code Verification" @Param user_type query string true "customer|merchant" @Success 200 {object} helper.BaseResponse @Failure 400 {object} helper.BaseResponse @Failure 404 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /forgot-password/verify [get]
func (*AuthControllerImpl) VerifyRegister ¶
func (ac *AuthControllerImpl) VerifyRegister(ctx *gin.Context)
Check godoc @Summary Verify Register customer/merchant @Tags Auth @Accept json @Produce json @Param code query string true "Code Verification" @Param user_type query string true "customer|merchant" @Success 200 {object} helper.BaseResponse @Failure 400 {object} helper.BaseResponse @Failure 404 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /register/verify [get]
type HealthCheckController ¶
HealthCheckController is an interface that has all the function to be implemented inside health check controller
type HealthCheckControllerImpl ¶
type HealthCheckControllerImpl struct {
Context context.Context
Config *config.Configuration
Tracer *trace.TracerProvider
HealthCheckSvc service.HealthCheckService
}
HealthCheckControllerImpl is an app health check struct that consists of all the dependencies needed for health check controller
func NewHealthCheckController ¶
func NewHealthCheckController(ctx context.Context, config *config.Configuration, tracer *trace.TracerProvider, healthCheckSvc service.HealthCheckService) *HealthCheckControllerImpl
NewHealthCheckController return new instances health check controller
func (*HealthCheckControllerImpl) Check ¶
func (hc *HealthCheckControllerImpl) Check(ctx *gin.Context)
Check godoc @Summary Checking Health Services @Tags Health Check @Accept json @Produce json @Success 200 {object} helper.BaseResponse @Failure 500 {object} helper.BaseResponse @Router /health-check [get]