routes

package
v0.0.0-...-fd201ba Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPrometheus

func RegisterPrometheus(log logger.Logger)

Types

type Router

type Router struct {
	Engine *gin.Engine
	// contains filtered or unexported fields
}

Router is a wrapper for HTTP router

func NewRouter

func NewRouter(
	log logger.Logger,
	conf config.Config,
	trans translation.Translator,
	healthHandler handler.HealthHandler,
) (*Router, error)

NewRouter creates a new HTTP router

func (*Router) NewAuthRouter

func (r *Router) NewAuthRouter(
	authHandler handler.AuthHandler,
	roleHandler handler.RoleHandler,
	permissionHandler handler.PermissionHandler,
	authCache port.AuthCache,
) *Router

NewAuthRouter creates a new HTTP router

func (*Router) NewUserRouter

func (r *Router) NewUserRouter(userHandler handler.UserHandler) *Router

NewUserRouter creates a new HTTP router

func (*Router) Serve

func (r *Router) Serve(server *http.Server)

Serve starts the HTTP server

Jump to

Keyboard shortcuts

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