rest

package
v0.0.0-...-11ae6c6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router interface {
	// Handler returns the HTTP handler
	Handler() *gin.Engine

	// Config returns the current configuration
	Config() domain.Config
}

Router defines the interface for the REST router

func NewRouter

func NewRouter(
	config domain.Config,
	logger logging.Logger,
	entryHandler *handler.EntryHandler,
	translationHandler *handler.TranslationHandler,
	userHandler *handler.UserHandler,
	authMiddleware middleware.AuthMiddleware,
) Router

NewRouter creates a new Router instance

func NewRouterWithErrorHandling

func NewRouterWithErrorHandling(
	config domain.Config,
	logger logging.Logger,
	entryHandler handler.EntryHandlerInterface,
	translationHandler handler.TranslationHandlerInterface,
	userHandler handler.UserHandlerInterface,
	authMiddleware middleware.AuthMiddleware,
) Router

NewRouterWithErrorHandling creates a Router with improved error handling and security enhancements

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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