controller

package
v0.4.34 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 21 Imported by: ? modules, 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

Overview

Content managed by Project Forge, see [projectforge.md] for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Act added in v0.2.5

func Act(key string, w http.ResponseWriter, r *http.Request, f ActFn)

func ActSite added in v0.2.5

func ActSite(key string, w http.ResponseWriter, r *http.Request, f func(as *app.State, ps *cutil.PageState) (string, error))

func ActionEdit

func ActionEdit(w http.ResponseWriter, r *http.Request)

func ActionOrdering

func ActionOrdering(w http.ResponseWriter, r *http.Request)

func ActionSave

func ActionSave(w http.ResponseWriter, r *http.Request)

func ERsp added in v0.2.5

func ERsp(msg string, args ...any) (string, error)

func FlashAndRedir added in v0.2.5

func FlashAndRedir(success bool, msg string, redir string, ps *cutil.PageState) (string, error)

func Home

func Home(w http.ResponseWriter, r *http.Request)

func NotFoundAction added in v0.4.0

func NotFoundAction(w http.ResponseWriter, r *http.Request)

func NotFoundResponse added in v0.4.0

func NotFoundResponse(w http.ResponseWriter, r *http.Request) func(as *app.State, ps *cutil.PageState) (string, error)

func Options

func Options(w http.ResponseWriter, _ *http.Request)

func Refresh

func Refresh(w http.ResponseWriter, r *http.Request)

func Render added in v0.2.5

func Render(r *http.Request, as *app.State, page layout.Page, ps *cutil.PageState, breadcrumbs ...string) (string, error)

func ReturnToReferrer added in v0.2.5

func ReturnToReferrer(msg string, dflt string, ps *cutil.PageState) (string, error)

func SetAppState

func SetAppState(a *app.State, logger util.Logger) error

func SetSiteState

func SetSiteState(a *app.State, logger util.Logger) error

func Site

func Site(w http.ResponseWriter, r *http.Request)

func Unauthorized

func Unauthorized(w http.ResponseWriter, r *http.Request, reason string, accounts user.Accounts) func(as *app.State, ps *cutil.PageState) (string, error)

func WorkspaceProject

func WorkspaceProject(w http.ResponseWriter, r *http.Request)

func WorkspaceSource

func WorkspaceSource(w http.ResponseWriter, r *http.Request)

Types

type ActFn added in v0.4.0

type ActFn func(as *app.State, ps *cutil.PageState) (string, error)

Directories

Path Synopsis
Package cutil - Content managed by Project Forge, see [projectforge.md] for details.
Package cutil - Content managed by Project Forge, see [projectforge.md] for details.

Jump to

Keyboard shortcuts

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