web

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRootRouter added in v2.4.4

func NewRootRouter(settings RouterSetting) (model.Router, error)

NewRootRouter creates and inits root http router.

Types

type Router

type Router struct {
	APIRouter        model.Router
	ManagementRouter model.Router
	LoginAppRouter   model.Router
	AdminRouter      model.Router
	AdminPanelRouter model.Router
	RootRouter       *http.ServeMux
	UpdateCORS       func()
}

Router is a root router to handle REST API, web, and admin requests.

func (*Router) ServeHTTP

func (ar *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements identifo.Router interface.

type RouterSetting

type RouterSetting struct {
	Server           model.Server
	Logger           *log.Logger
	ServeAdminPanel  bool
	Host             *url.URL
	LoggerSettings   model.LoggerSettings
	AppOriginChecker model.OriginChecker
	APICors          *cors.Cors
	RestartChan      chan<- bool
	Locale           string
}

RouterSetting contains settings for root http router.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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