routes

package
v0.0.0-...-7fab21c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(c *fiber.Ctx) error

@Summary HealthCheck @Description This endpoint checks the health of our application. @Tags HealthCheck @Success 200 {object} HealthCheckSchema @Router /healthcheck [get]

func RequestUser

func RequestUser(c *fiber.Ctx) *models.User

func SetupRoutes

func SetupRoutes(app *fiber.App, db *gorm.DB)

func SuccessResponse

func SuccessResponse(message string) schemas.ResponseSchema

func ValidateRequest

func ValidateRequest(c *fiber.Ctx, data interface{}) (*int, *utils.ErrorResponse)

Types

type CreateCheckOutSchema

type CreateCheckOutSchema struct {
	Orders []OrderItem `json:"orders"`
}

type Endpoint

type Endpoint struct {
	DB *gorm.DB
}

func (Endpoint) CreateCheckoutSession

func (endpoint Endpoint) CreateCheckoutSession(c *fiber.Ctx) error

func (Endpoint) CreateNewProduct

func (endpoint Endpoint) CreateNewProduct(c *fiber.Ctx) error

func (Endpoint) CreateNewReview

func (endpoint Endpoint) CreateNewReview(c *fiber.Ctx) error

func (Endpoint) CreatePaymentIntent

func (endpoint Endpoint) CreatePaymentIntent(c *fiber.Ctx) error

func (Endpoint) DeleteMe

func (endpoint Endpoint) DeleteMe(c *fiber.Ctx) error

func (Endpoint) DeleteProduct

func (endpoint Endpoint) DeleteProduct(c *fiber.Ctx) error

func (Endpoint) FindProductById

func (endpoint Endpoint) FindProductById(c *fiber.Ctx) error

func (Endpoint) FindProductBySlug

func (endpoint Endpoint) FindProductBySlug(c *fiber.Ctx) error

func (Endpoint) GetAllProducts

func (endpoint Endpoint) GetAllProducts(c *fiber.Ctx) error

func (Endpoint) GetAllUsers

func (endpoint Endpoint) GetAllUsers(c *fiber.Ctx) error

func (Endpoint) GetUserByParamsID

func (endpoint Endpoint) GetUserByParamsID(c *fiber.Ctx) error

func (Endpoint) GoogleCallback

func (endpoint Endpoint) GoogleCallback(c *fiber.Ctx) error

func (Endpoint) GoogleLogin

func (endpoint Endpoint) GoogleLogin(c *fiber.Ctx) error

func (Endpoint) HandleStripeWebhook

func (endpoint Endpoint) HandleStripeWebhook(c *fiber.Ctx) error

func (Endpoint) Login

func (endpoint Endpoint) Login(c *fiber.Ctx) error

func (Endpoint) LoginWithOtp

func (endpoint Endpoint) LoginWithOtp(c *fiber.Ctx) error

func (Endpoint) Logout

func (endpoint Endpoint) Logout(c *fiber.Ctx) error

func (Endpoint) Refresh

func (endpoint Endpoint) Refresh(c *fiber.Ctx) error

func (Endpoint) Register

func (endpoint Endpoint) Register(c *fiber.Ctx) error

func (Endpoint) ResendVerificationEmail

func (endpoint Endpoint) ResendVerificationEmail(c *fiber.Ctx) error

func (Endpoint) SendLoginOtp

func (endpoint Endpoint) SendLoginOtp(c *fiber.Ctx) error

func (Endpoint) SendPasswordResetOtp

func (endpoint Endpoint) SendPasswordResetOtp(c *fiber.Ctx) error

func (Endpoint) SendUserEmailChangeOtp

func (endpoint Endpoint) SendUserEmailChangeOtp(c *fiber.Ctx) error

func (Endpoint) SetNewPassword

func (endpoint Endpoint) SetNewPassword(c *fiber.Ctx) error

func (Endpoint) SetProductDiscount

func (endpoint Endpoint) SetProductDiscount(c *fiber.Ctx) error

func (Endpoint) UpdateMe

func (endpoint Endpoint) UpdateMe(c *fiber.Ctx) error

func (Endpoint) UpdateProductDetails

func (endpoint Endpoint) UpdateProductDetails(c *fiber.Ctx) error

func (Endpoint) UpdateProductStock

func (endpoint Endpoint) UpdateProductStock(c *fiber.Ctx) error

func (Endpoint) UpdateSignedInUserPassword

func (endpoint Endpoint) UpdateSignedInUserPassword(c *fiber.Ctx) error

func (Endpoint) UpdateUserEmail

func (endpoint Endpoint) UpdateUserEmail(c *fiber.Ctx) error

func (Endpoint) ValidateMe

func (endpoint Endpoint) ValidateMe(c *fiber.Ctx) error

func (Endpoint) VerifyAccount

func (endpoint Endpoint) VerifyAccount(c *fiber.Ctx) error

type HealthCheckSchema

type HealthCheckSchema struct {
	Success string `json:"success" example:"pong"`
}

type OrderItem

type OrderItem struct {
	ProductID string `json:"product_id"`
	Quantity  int    `json:"quantity"`
}

Jump to

Keyboard shortcuts

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