routers

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: GPL-3.0 Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigApplier added in v0.35.0

func ConfigApplier(db *file.DbUtils, identity *crypt.Identity, runtime webservice.Runtime, set func(http.Handler)) servercfg.Applier

ConfigApplier returns the applier of the settings of the web manager: when one changes, it builds the handler again as Init does and hands it to set. The handler is built once the new settings are current, from the same arguments as Init.

func Init

func Init(db *file.DbUtils, identity *crypt.Identity, runtime webservice.Runtime) (http.Handler, error)

Init returns the handler of the web manager acting on the store db and on runtime, the running server; the login encrypts credentials to identity.

func InitIPRegister added in v0.34.9

func InitIPRegister(db *file.DbUtils, identity *crypt.Identity, runtime webservice.Runtime) http.Handler

InitIPRegister returns the handler of the registration page on its own listener and behind bridge://ipreg: the page at / and /ip/register, its static files and captcha, behind the global access lists.

Types

type State added in v0.34.8

type State struct {
	App            *webapi.App
	ConfigProvider func() *servercfg.Snapshot
}

State centralizes router-side dependencies so transport code does not reach into global singletons directly.

func NewState added in v0.34.8

func NewState(app *webapi.App) *State

func (*State) AdminUsername added in v0.34.8

func (s *State) AdminUsername() string

func (*State) Authorization added in v0.34.8

func (s *State) Authorization() webservice.AuthorizationService

func (*State) AvailablePageSpecs added in v0.34.8

func (s *State) AvailablePageSpecs(specs []webapi.PageSpec) []webapi.PageSpec

func (*State) BaseURL added in v0.34.8

func (s *State) BaseURL() string

func (*State) CurrentConfig added in v0.34.8

func (s *State) CurrentConfig() *servercfg.Snapshot

func (*State) LoginPolicy added in v0.34.8

func (s *State) LoginPolicy() webservice.LoginPolicyService

func (*State) LoginURL added in v0.34.8

func (s *State) LoginURL() string

func (*State) PermissionResolver added in v0.34.8

func (s *State) PermissionResolver() webservice.PermissionResolver

func (*State) System added in v0.34.8

func (s *State) System() webservice.SystemService

Jump to

Keyboard shortcuts

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