Documentation
¶
Index ¶
- Variables
- func HTTPErrorf(code int, message TextLabel, format string, a ...any) error
- func InternalHTTPError(cause error) error
- func LiteralHTTPError(code int, err error) error
- func NewHTTPError(code int, msgID string, text string, cause error) error
- func PT(loc *i18n.Localizer, msg *i18n.Message) string
- func SortMenuItems(menu []MenuItem)
- type AlterContext
- type Application
- type Authenticator
- type Component
- type ComponentObserver
- type ErrorInfo
- type HTTPError
- type HTTPHandlerFuncWithErr
- type HTTPHandlerWithErr
- type HookAlterFunc
- type HookFunc
- type Hooks
- type Link
- type MenuHook
- type MenuHooks
- type MenuItem
- type OIDCAuth
- type OIDCUserInfoSource
- type Page
- type PageHandler
- type PageHandlerFunc
- type PageMux
- type PageRenderer
- type TeplateFuncSource
- type TextLabel
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkipRender = errors.New("skip render")
Functions ¶
func InternalHTTPError ¶
func LiteralHTTPError ¶
Types ¶
type AlterContext ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func (*Application) Cleanup ¶
func (a *Application) Cleanup()
func (*Application) GetMenu ¶
func (a *Application) GetMenu() []MenuItem
type Authenticator ¶
type ComponentObserver ¶
type ComponentObserver interface {
ObserveComponent(c Component)
}
type HTTPError ¶
func AsHTTPError ¶
type HTTPHandlerFuncWithErr ¶
type HTTPHandlerFuncWithErr func(w http.ResponseWriter, r *http.Request) error
func (HTTPHandlerFuncWithErr) ServeHTTP ¶
func (fn HTTPHandlerFuncWithErr) ServeHTTP(w http.ResponseWriter, r *http.Request) error
type HTTPHandlerWithErr ¶
type HTTPHandlerWithErr interface {
ServeHTTP(w http.ResponseWriter, r *http.Request) error
}
type HookAlterFunc ¶
type HookAlterFunc[D any, T any] func(ctx context.Context, data AlterContext[D], list []T) []T
type Hooks ¶
func (*Hooks[D, T]) Alter ¶
func (h *Hooks[D, T]) Alter(ctx context.Context, data AlterContext[D], list []T) []T
func (*Hooks[D, T]) RegisterAlter ¶
func (h *Hooks[D, T]) RegisterAlter(fn HookAlterFunc[D, T])
func (*Hooks[D, T]) RegisterHook ¶
type OIDCAuth ¶
type OIDCAuth struct {
// contains filtered or unexported fields
}
func NewOIDCAuth ¶
func (*OIDCAuth) OIDCUserInfo ¶
func (*OIDCAuth) RegisterRoutes ¶
type OIDCUserInfoSource ¶
type PageHandler ¶
type PageHandlerFunc ¶
type PageMux ¶
type PageMux struct {
// contains filtered or unexported fields
}
func NewPageMux ¶
func NewPageMux( r *PageRenderer, mux *http.ServeMux, ) *PageMux
func (*PageMux) Handle ¶
func (pm *PageMux) Handle(pattern string, handler PageHandler)
func (*PageMux) HandleFunc ¶
func (pm *PageMux) HandleFunc(pattern string, handler PageHandlerFunc)
type PageRenderer ¶
type PageRenderer struct {
// contains filtered or unexported fields
}
func NewPageRenderer ¶
func (*PageRenderer) ErrorPage ¶
func (pr *PageRenderer) ErrorPage( ctx context.Context, w http.ResponseWriter, r *http.Request, info ErrorInfo, )
func (*PageRenderer) RenderPage ¶
func (pr *PageRenderer) RenderPage( ctx context.Context, w http.ResponseWriter, r *http.Request, p *Page, )
type TeplateFuncSource ¶
Click to show internal directories.
Click to hide internal directories.