handler

package
v0.0.0-...-4c8fc35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFRExchangeOAuthCode = "failed+to+extract+code+parameter"
	ErrFRFetchOAuthProfile = "failed+to+fetch+profile"
)

user handler error

View Source
var (
	ErrBindRequest     = fiber.NewError(fiber.StatusBadRequest, "failed to bind request")
	ErrValidateRequest = fiber.NewError(fiber.StatusBadRequest, "failed to validate request")
)

Functions

func NewCartHandler

func NewCartHandler(log *logrus.Logger, validator *validator.Validate, cartUseCase usecaseInterface.CartUseCase) interfaces.CartHandler

func NewMenuHandler

func NewMenuHandler(log *logrus.Logger, validator *validator.Validate, menuUseCase usecaseInterface.MenuUseCase) interfaces.MenuHandler

func NewProductHandler

func NewProductHandler(log *logrus.Logger, validator *validator.Validate, productUC usecaseInterface.ProductUseCase) interfaces.ProductHandler

func NewPropertyHandler

func NewPropertyHandler(log *logrus.Logger, validator *validator.Validate, propertyUseCase usecaseInterface.PropertyUseCase) interfaces.PropertyHandler

func NewUserHandler

func NewUserHandler(log *logrus.Logger, validator *validator.Validate, facebookOAuth *oauth2.Config, googleOAuth *oauth2.Config, userUC usecaseInterface.UserUseCase) interfaces.UserHandler

func NewWishHandler

func NewWishHandler(log *logrus.Logger, validator *validator.Validate, wishlistUseCase usecaseInterface.WishlistUseCase) interfaces.WishlistHandler

Types

type CartHandler

type CartHandler struct {
	Log         *logrus.Logger
	Validator   *validator.Validate
	CartUseCase usecaseInterface.CartUseCase
}

func (*CartHandler) GetMyCart

func (h *CartHandler) GetMyCart(ctx fiber.Ctx) error

func (*CartHandler) ManageCart

func (h *CartHandler) ManageCart(ctx fiber.Ctx) error
type MenuHandler struct {
	Log         *logrus.Logger
	Validator   *validator.Validate
	MenuUseCase usecaseInterface.MenuUseCase
}
func (h *MenuHandler) GetEducation(ctx fiber.Ctx) error
func (h *MenuHandler) GetEducationDetails(ctx fiber.Ctx) error
func (h *MenuHandler) GetHomepage(ctx fiber.Ctx) error
func (h *MenuHandler) GetMarket(ctx fiber.Ctx) error

type ProductHandler

type ProductHandler struct {
	Log            *logrus.Logger
	Validator      *validator.Validate
	ProductUseCase usecaseInterface.ProductUseCase
}

func (*ProductHandler) GetProductDetails

func (h *ProductHandler) GetProductDetails(ctx fiber.Ctx) error

func (*ProductHandler) GetProductReviews

func (h *ProductHandler) GetProductReviews(ctx fiber.Ctx) error

func (*ProductHandler) GetProducts

func (h *ProductHandler) GetProducts(ctx fiber.Ctx) error

type PropertyHandler

type PropertyHandler struct {
	Log             *logrus.Logger
	Validator       *validator.Validate
	PropertyUseCase usecaseInterface.PropertyUseCase
}

func (*PropertyHandler) AddPropertyDiscuss

func (h *PropertyHandler) AddPropertyDiscuss(ctx fiber.Ctx) error

func (*PropertyHandler) GetMyWishlistProperties

func (h *PropertyHandler) GetMyWishlistProperties(ctx fiber.Ctx) error

func (*PropertyHandler) GetProperties

func (h *PropertyHandler) GetProperties(ctx fiber.Ctx) error

func (*PropertyHandler) GetPropertyDetails

func (h *PropertyHandler) GetPropertyDetails(ctx fiber.Ctx) error

func (*PropertyHandler) GetPropertyDiscuss

func (h *PropertyHandler) GetPropertyDiscuss(ctx fiber.Ctx) error

func (*PropertyHandler) GetPropertyReviews

func (h *PropertyHandler) GetPropertyReviews(ctx fiber.Ctx) error

func (*PropertyHandler) ManageWishlistsProperties

func (h *PropertyHandler) ManageWishlistsProperties(ctx fiber.Ctx) error

type UserHandler

type UserHandler struct {
	Log           *logrus.Logger
	Validator     *validator.Validate
	FacebookOAuth *oauth2.Config
	GoogleOAuth   *oauth2.Config
	UserUserCase  usecaseInterface.UserUseCase
}

func (*UserHandler) FacebookOAuthCallback

func (h *UserHandler) FacebookOAuthCallback(ctx fiber.Ctx) error

func (*UserHandler) GoogleOAuthCallback

func (h *UserHandler) GoogleOAuthCallback(ctx fiber.Ctx) error

func (*UserHandler) Login

func (h *UserHandler) Login(ctx fiber.Ctx) error

func (*UserHandler) Logout

func (h *UserHandler) Logout(ctx fiber.Ctx) error

func (*UserHandler) PreRegister

func (h *UserHandler) PreRegister(ctx fiber.Ctx) error

func (*UserHandler) RegisterComplete

func (h *UserHandler) RegisterComplete(ctx fiber.Ctx) error

func (*UserHandler) RegisterWithEmailPassword

func (h *UserHandler) RegisterWithEmailPassword(ctx fiber.Ctx) error

func (*UserHandler) RegisterWithOAuth

func (h *UserHandler) RegisterWithOAuth(ctx fiber.Ctx) error

func (*UserHandler) RenewAccessToken

func (h *UserHandler) RenewAccessToken(ctx fiber.Ctx) error

func (*UserHandler) SendVerificationCodeForRegister

func (h *UserHandler) SendVerificationCodeForRegister(ctx fiber.Ctx) error

func (*UserHandler) URLOAuthFacebook

func (h *UserHandler) URLOAuthFacebook(ctx fiber.Ctx) error

func (*UserHandler) URLOAuthGoogle

func (h *UserHandler) URLOAuthGoogle(ctx fiber.Ctx) error

type WishlistHandler

type WishlistHandler struct {
	Log             *logrus.Logger
	Validator       *validator.Validate
	WishlistUseCase usecaseInterface.WishlistUseCase
}

func (*WishlistHandler) GetMyWishlist

func (h *WishlistHandler) GetMyWishlist(ctx fiber.Ctx) error

func (*WishlistHandler) ManageWishlists

func (h *WishlistHandler) ManageWishlists(ctx fiber.Ctx) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL