router

package
v0.0.0-...-2551f53 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRoutes

func SetupRoutes(server Server)

Types

type Server

type Server interface {
	GetRouter() *gin.Engine
	GetRepository() repository.Repository
	GetTokenMaker() token.TokenMaker
	RunDBMigration()
	Start()

	// Product
	CreateProduct(ctx *gin.Context)
	UpdateProduct(ctx *gin.Context)
	DeleteProductByID(ctx *gin.Context)
	GetProductByID(ctx *gin.Context)
	GetProducts(ctx *gin.Context)

	// Cart
	GetCartDetails(ctx *gin.Context)
	AddCartItem(ctx *gin.Context)
	RemoveCartItem(ctx *gin.Context)
	Checkout(ctx *gin.Context)

	// User
	Register(ctx *gin.Context)

	// Auth
	Login(ctx *gin.Context)
}

Jump to

Keyboard shortcuts

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