routes

package
v0.0.0-...-712712c Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAdminNonAuthRoutes

func AddAdminNonAuthRoutes(Method, path string, handler gin.HandlerFunc, Roles ...string)

func AddAdminRoutes

func AddAdminRoutes(Method, path string, handler gin.HandlerFunc, Roles ...string)

func AddAuthRoutes

func AddAuthRoutes(Method, path string, handler gin.HandlerFunc, Roles ...string)

func AddNonAuthRoutes

func AddNonAuthRoutes(Method, path string, handler gin.HandlerFunc)

func ClientJWTMiddleware

func ClientJWTMiddleware(jwtService *middleware.JWTService) gin.HandlerFunc

func InitRouter

func InitRouter(conf *config.Config, jwtService *middleware.JWTService)

func LoadRoutes

func LoadRoutes(conf *config.Config, db *sqlx.DB, jwtService *middleware.JWTService)

func RegisterAdminRoutes

func RegisterAdminRoutes(engine *gin.RouterGroup, jwtService *middleware.JWTService)

func RegisterClientRoutes

func RegisterClientRoutes(engine *gin.RouterGroup, jwtService *middleware.JWTService)

func UserJWTMiddleware

func UserJWTMiddleware(jwtService *middleware.JWTService) gin.HandlerFunc

todo implement jwt middleware

Types

type OrderDataAdapter

type OrderDataAdapter struct {
	// contains filtered or unexported fields
}

func (*OrderDataAdapter) GetRestaurantByID

func (a *OrderDataAdapter) GetRestaurantByID(restID int, productsIDS []int) (order.Restaurant, error)

type Routes

type Routes struct {
	Method  string
	Path    string
	Handler gin.HandlerFunc
	Auth    bool
	Roles   []string
}

Jump to

Keyboard shortcuts

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