http

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(cfg ServerConfig, mw Middlewares) http.Handler

Types

type Handlers added in v0.1.24

type Handlers struct {
	UI          *ui.UIHandler
	API         *api.APIHandler
	InternalAPI *internalapi.Handler
}

type Middlewares

type Middlewares struct {
	RedirectIfAuthenticated func(http.Handler) http.Handler

	RequireAppAccessAuthWithRefresh      func(http.Handler) http.Handler
	RequireAppAccessAuthAPI              func(http.Handler) http.Handler
	RequireAdminAccessAuthWithRefresh    func(http.Handler) http.Handler
	RequireAdminAccessAuthAPI            func(http.Handler) http.Handler
	RequireOperatorAccessAuthWithRefresh func(http.Handler) http.Handler
	RequireOperatorAccessAuthAPI         func(http.Handler) http.Handler
	RequireAppVerifiedEmailUI            func(http.Handler) http.Handler
	RequireAppVerifiedEmailAPI           func(http.Handler) http.Handler
	RequireAdminVerifiedEmailUI          func(http.Handler) http.Handler
	RequireOperatorVerifiedEmailUI       func(http.Handler) http.Handler
	RequireRecentAuthenticationUI        func(http.Handler) http.Handler
	RequireRecentAuthenticationAPI       func(http.Handler) http.Handler
	RequireInternalAPIAuth               func(http.Handler) http.Handler
	RequirePublicOrganizationManagement  func(http.Handler) http.Handler
	RequireAdminRole                     func(http.Handler) http.Handler
	RequireOperatorRole                  func(http.Handler) http.Handler

	RequireCSRF    func(http.Handler) http.Handler
	RequireAPICSRF func(http.Handler) http.Handler

	ReturnTo                  func(http.Handler) http.Handler
	HTMX                      func(http.Handler) http.Handler
	RequireChallengeEnabled   func(http.Handler) http.Handler
	RequireAllowlistEnabled   func(http.Handler) http.Handler
	OptionalAppAccessIdentity func(http.Handler) http.Handler
}

type Server

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

func NewServer

func NewServer(cfg ServerConfig, mw Middlewares) *Server

func (*Server) Close added in v0.22.0

func (s *Server) Close() error

func (*Server) Serve added in v0.22.0

func (s *Server) Serve(listener net.Listener) error

func (*Server) SetReady added in v0.22.0

func (s *Server) SetReady(ready bool)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Version           string
	Addr              string
	Dev               bool
	TrustProxyHeaders bool
	TrustedProxyCIDRs []netip.Prefix
	Logger            *slog.Logger
	Observability     *observability.Service
	OAuthProviders    oauth.OAuthProviders
	Handlers          Handlers
	Readiness         *meta.Readiness
	// contains filtered or unexported fields
}

Directories

Path Synopsis
handlers
api
ui
kit
Package openapi contains code generated from contract/openapi.yaml.
Package openapi contains code generated from contract/openapi.yaml.
Package showcase renders Core's real UI templates with deterministic fixture data.
Package showcase renders Core's real UI templates with deterministic fixture data.
templates

Jump to

Keyboard shortcuts

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