Versions in this module Expand all Collapse all v0 v0.1.2 Nov 1, 2026 v0.1.1 Oct 27, 2026 v0.1.0 Oct 27, 2026retracted Changes in this version + const Create + const DefaultPageSize + const DefaultPath + const Delete + const Edit + const Export + const GroupModules + const GroupSystem + const NotInTrash + const Publish + const Review + const View + func AdministratorsOnly(next http.Handler) http.Handler + func CSVCell(value string) string + func ContentLocale(r *http.Request, config locales.Config) string + func Date(ctx context.Context, t time.Time) string + func DateTime(ctx context.Context, t time.Time) string + func EachTrashItem(ids []string, fn func(id string) error, reason func(err error) string) error + func FieldError(field, text string) form.FieldErrors + func FilterURL(r *http.Request, path, name, value string) string + func Filter[T any](s Search, items []T, fields func(T) []string) []T + func Format(ctx context.Context) frontend.Format + func KeepSearch(r *http.Request, target string) string + func LanguageLabel(code string) string + func LanguageName(code string) string + func LocaleURL(target, locale string) string + func Matches(query string, fields ...string) bool + func PageNumber(r *http.Request) int + func PageURL(r *http.Request, path string, number int) string + func Paginate[T any](items []T, number, size int) ([]T, bool) + func Query(r *http.Request) string + func ReservedSections() []string + func ReviewLabel(state content.ReviewState) string + func RouteName(section, name string) string + func RouteURL(ctx context.Context, name string, args ...any) string + func Schema() fs.FS + func SearchLimit() int + func T(ctx context.Context, key string, args ...any) string + func TN(ctx context.Context, singular, plural string, n int, args ...any) string + func TimezoneChoices(selected string) form.SortedSelect[string] + func WithError(r *http.Request, text string) *http.Request + func WriteCSV(w http.ResponseWriter, name string, header []string, rows [][]string) error + type AccountRow struct + Admin bool + Created string + Disabled bool + Email string + ID string + Name string + Role string + Status string + URL string + type AccountView struct + Email string + Errors form.FieldErrors + Name string + Password form.RenderModel + Role string + TwoStep *TwoStepView + type AccountsView struct + Create form.RenderModel + DeleteForm *form.RenderModel + Errors form.FieldErrors + Membership *MembershipForm + Pager Pager + ProfileErrors form.FieldErrors + ProfileForm *form.RenderModel + RoleErrors form.FieldErrors + RoleForm *form.RenderModel + Selected *AccountRow + Sessions []SessionRow + StatusForm *form.RenderModel + TwoStep string + TwoStepForm *form.RenderModel + Users []AccountRow + type ActionGroup struct + Actions []QuickAction + Name string + type Admin struct + func New(accounts *auth.Service, options Options, sections ...Section) (*Admin, error) + func (a *Admin) BadRequest(w http.ResponseWriter, r *http.Request) + func (a *Admin) Bind(r *http.Request, input any) (form.FieldErrors, error) + func (a *Admin) Can(r *http.Request, permission Permission) bool + func (a *Admin) Close(context.Context) error + func (a *Admin) Confirm(r *http.Request, model form.RenderModel, message string) form.RenderModel + func (a *Admin) Connector() connector.Connector + func (a *Admin) Context(ctx context.Context) context.Context + func (a *Admin) Editor(r *http.Request) (user auth.User, can func(adminURL, action string) bool, ok bool) + func (a *Admin) Fail(w http.ResponseWriter, r *http.Request, err error) + func (a *Admin) Forbidden(w http.ResponseWriter, r *http.Request) + func (a *Admin) Form(r *http.Request, input any, action, submit string) form.RenderModel + func (a *Admin) ImportMapHash() string + func (a *Admin) Language() string + func (a *Admin) Location(r *http.Request) *time.Location + func (a *Admin) MapForm(r *http.Request, input any) (form.FieldErrors, error) + func (a *Admin) NotifyReviewers(r *http.Request, section, title, adminPath string) + func (a *Admin) ParseSchedule(r *http.Request) (publishAt, unpublishAt time.Time, err error) + func (a *Admin) Path() string + func (a *Admin) Permanence() Permanence + func (a *Admin) PurgeTrash(ctx context.Context, cutoff time.Time) (int, error) + func (a *Admin) QuickActions(r *http.Request) []QuickAction + func (a *Admin) Redirect(w http.ResponseWriter, r *http.Request, target string) + func (a *Admin) RedirectFlash(w http.ResponseWriter, r *http.Request, target string, message flash.Message) + func (a *Admin) RedirectNotice(w http.ResponseWriter, r *http.Request, target, message string) + func (a *Admin) Render(w http.ResponseWriter, r *http.Request, view Page) + func (a *Admin) ReviewSections(r *http.Request) []ReviewSection + func (a *Admin) RevisionPanel(r *http.Request, revisions Revisions) RevisionPanel + func (a *Admin) Router() *router.Router + func (a *Admin) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (a *Admin) T(r *http.Request, key string, args ...any) string + func (a *Admin) TrashURL(section string) string + func (a *Admin) TryURL(name string, args ...any) (string, error) + func (a *Admin) URL(name string, args ...any) string + func (a *Admin) UserName(r *http.Request, id string) string + func (a *Admin) Validate(r *http.Request, input any) form.FieldErrors + func (a *Admin) ValidateSchema(r *http.Request, schema form.Schema, values url.Values) form.FieldErrors + type AttentionPanel struct + Reviews []ReviewEntry + Sections []NavigationLink + type CSVRow struct + Line int + Values []string + func ReadCSV(source io.Reader) ([]CSVRow, error) + type Callout struct + Action string + Done int + Text string + Title string + Total int + URL string + type DashboardView struct + Actions []QuickAction + Callouts []Callout + More []ActionGroup + WebsiteURL string + type FormPageView struct + Error string + Errors form.FieldErrors + Form *form.RenderModel + Intro string + Links []PageLink + Message string + Title string + type FormScreen struct + Action string + Admin *Admin + BackLabel string + BackURL string + Heading string + Intro string + Load func(ctx context.Context) (In, error) + Save func(r *http.Request, in In) (form.FieldErrors, error) + Submit string + Title string + func (s FormScreen[In]) Post(w http.ResponseWriter, r *http.Request) + func (s FormScreen[In]) Show(w http.ResponseWriter, r *http.Request) + type FormScreenView struct + BackLabel string + BackURL string + Errors form.FieldErrors + Form form.RenderModel + Heading string + Intro string + Title string + type GroupRow struct + Members int + Name string + URL string + type GroupsView struct + Create form.RenderModel + Errors form.FieldErrors + Groups []GroupRow + type HistoryEntry struct + Author string + Note string + Number int + PreviewURL string + Published bool + Restore *form.RenderModel + Review string + Selected bool + Time string + URL string + When string + type List struct + Pager Pager + Rows []T + type ListPage struct + All func(ctx context.Context) ([]T, error) + Fields func(T) []string + Load func(ctx context.Context, limit, offset int) (rows []T, more bool, err error) + Path string + Size int + func (p ListPage[T]) Read(r *http.Request) (List[T], error) + type Locale string + func (l Locale) GetLocale() string + func (l Locale) Language() string + type LocaleTab struct + Active bool + Code string + Complete bool + Name string + Overview bool + Started bool + URL string + func LocaleTabs(codes []string, current, target string, status TranslationStatus) []LocaleTab + type LoginView struct + Errors form.FieldErrors + ForgotPassword bool + Form form.RenderModel + Message string + Setup bool + type MatrixCell struct + Allowed bool + Unavailable bool + Value string + type MatrixGroup struct + Name string + Rows []MatrixRow + type MatrixRow struct + Cells []MatrixCell + Section string + Title string + type MatrixView struct + Actions []string + Columns int + Delete form.RenderModel + Errors form.FieldErrors + Form form.RenderModel + Groups []MatrixGroup + Name string + Rows []MatrixRow + type MembershipForm struct + Form *form.RenderModel + type Move struct + Arrow string + Label string + URL string + func Moves(up, down string) []Move + type NavigationGroup struct + Active bool + Badge int + Key string + Links []NavigationLink + Name string + type NavigationLink struct + Active bool + Badge int + Icon string + Path string + Title string + type Options struct + AbsoluteURL func(r *http.Request, path string) string + Authorize func(ctx context.Context, user auth.User, permission Permission) bool + CatalogueDir string + Diagnostics render.Diagnostics + Language string + Mail mail.Sender + Path string + Permanence Permanence + RemindSetup func() + Review content.ReviewPolicy + Router *router.Router + Secure bool + SetupToken string + Timezone func(ctx context.Context) *time.Location + Title string + TrashDays func(ctx context.Context) int + type Page struct + Data any + Dot partial.Dot + Files fs.FS + Fragments []render.Fragment + Includes []string + Label string + Status int + Template string + Title string + type PageLink struct + Title string + URL string + type Pager struct + NextURL string + Page int + PreviousURL string + func NewPager(r *http.Request, path string, number int, more bool) Pager + type PanelHeading struct + ID string + Icon string + Title string + type PanelState struct + Failed []string + Heading PanelHeading + func (p PanelState) FailedList() string + type Permanence interface + Permanent func(ctx context.Context, section, id string) (bool, error) + SetPermanent func(ctx context.Context, section, id string, permanent bool) error + func NewPermanence(database *db.DB) Permanence + type Permission struct + Action string + Section string + type PresenceView struct + Label string + More int + MoreLabel string + Stream string + Viewers []PresenceViewer + type PresenceViewer struct + Hue int + Initials string + Name string + Title string + type QuickAction struct + Label string + Section string + URL string + type RecentEntry struct + Author string + Icon string + Section string + Status string + Time string + Title string + URL string + When string + type RecentItem struct + Author string + Status string + Title string + URL string + UpdatedAt time.Time + type RecentPanel struct + Items []RecentEntry + type ReviewEntry struct + Author string + Icon string + Section string + Time string + Title string + URL string + When string + type ReviewInput struct + Note string + Publish bool + type ReviewItem struct + SubmittedAt time.Time + SubmittedBy string + Title string + URL string + type ReviewPanel struct + Approve *form.RenderModel + NeedsApproval bool + Note string + Reject *form.RenderModel + ReviewedAt string + ReviewedBy string + ReviewedTime string + State string + Submit *form.RenderModel + SubmittedAt string + SubmittedBy string + SubmittedTime string + type ReviewSection struct + ID string + Title string + type RevisionPanel struct + CanPublish bool + CanUnpublish bool + History []HistoryEntry + Latest int + Permanent bool + PreviewURL string + Publish form.RenderModel + PublishAt string + PublishTime string + Published int + Review bool + Schedule *form.RenderModel + ScheduledRevision int + Selected int + Timezone string + Unpublish form.RenderModel + UnpublishAt string + UnpublishTime string + Unschedule *form.RenderModel + type Revisions struct + History []content.Revision + Latest int + Locale string + Names map[string]string + Permanent bool + Preview bool + PublishedID string + Review bool + Schedule *content.Schedule + Section string + Selected content.Revision + URL func(name string, args ...any) string + type Route struct + func (r *Route) As(name string) *Route + func (r *Route) Use(middleware ...func(http.Handler) http.Handler) *Route + type Routes struct + func (r *Routes) Admin() *Admin + func (r *Routes) Get(pattern, action string, handler http.HandlerFunc) *Route + func (r *Routes) Post(pattern, action string, handler http.HandlerFunc) *Route + func (r *Routes) Section() Section + func (r *Routes) URL(name string, args ...any) string + type ScheduleInput struct + PublishAt time.Time + UnpublishAt time.Time + type ScheduledEntry struct + Change string + Icon string + Offline bool + Section string + Time string + Title string + URL string + When string + type ScheduledItem struct + PublishAt time.Time + Title string + URL string + UnpublishAt time.Time + type ScheduledPanel struct + Items []ScheduledEntry + type Search struct + Text string + func NewSearch(text string) Search + func SearchOf(r *http.Request) Search + func (s Search) Active() bool + func (s Search) Matches(fields ...string) bool + type SearchBox struct + Action string + ClearURL string + Keep []SearchParam + NewLabel string + NewURL string + Text string + type SearchParam struct + Name string + Value string + type Section struct + AdminOnly bool + Badge func(ctx context.Context) int + Callout func(ctx context.Context) (Callout, bool) + Files fs.FS + Group string + Hidden bool + ID string + Icon string + MaxBodyBytes int64 + NewLabel string + NewPath string + NewRoute string + Path string + Permission string + Recent func(ctx context.Context, limit int) ([]RecentItem, error) + Review func(ctx context.Context, limit int) ([]ReviewItem, error) + Routes func(*Routes) + Scheduled func(ctx context.Context, limit int) ([]ScheduledItem, error) + Stylesheet string + Title string + Trash Trash + func (s Section) PermissionID() string + func (s Section) RouteName(name string) string + type SessionRow struct + Active bool + Created string + Expires string + LastSeen string + Revoke *form.RenderModel + type ShellView struct + Dashboard bool + Groups []NavigationGroup + Language string + Logout form.RenderModel + Navigation []NavigationLink + PageTitle string + Presence PresenceView + SectionTitle string + SectionURL string + Stylesheets []template.HTML + Title string + User *auth.User + type Tab struct + Active bool + Count int + Counted bool + Label string + URL string + Value string + type Tabs struct + Items []Tab + Label string + func FilterTabs(r *http.Request, label, path, name, current string, tabs ...Tab) Tabs + type TranslationStatus func(locale string) (complete, started bool) + type Trash interface + List func(ctx context.Context, query string, limit, offset int) ([]TrashItem, int, error) + Purge func(ctx context.Context, ids []string) error + Restore func(ctx context.Context, ids []string) error + func JoinTrash(trashes ...Trash) Trash + func RecordTrash[T any](records TrashRecords[T]) Trash + type TrashEntry struct + DeletedBy string + Kind string + Time string + Title string + URL string + Value string + When string + type TrashError struct + Err error + ID string + Reason string + func (e *TrashError) Error() string + func (e *TrashError) Unwrap() error + type TrashGroup struct + Error bool + Icon string + Items []TrashEntry + MoreURL string + Section string + Title string + Total int + type TrashItem struct + DeletedAt time.Time + DeletedBy string + ID string + Kind string + Title string + URL string + type TrashRecords struct + Fields func(record T) []string + Item func(record T) TrashItem + Load func(ctx context.Context, limit, offset int) ([]T, int, error) + Purge func(ctx context.Context, id string) error + Reason func(err error) string + Undelete func(ctx context.Context, id string) error + type TrashView struct + Action string + CanChange bool + Days int + Filters Tabs + Groups []TrashGroup + Pager Pager + PurgeQuestion string + Section string + type TwoStepSetup struct + Cancel form.RenderModel + Confirm form.RenderModel + Errors form.FieldErrors + Key string + QR string + type TwoStepView struct + Codes []string + Off *form.RenderModel + OffErrors form.FieldErrors + On bool + Recovery *form.RenderModel + RecoveryCodes int + RecoveryErrors form.FieldErrors + Setup *TwoStepSetup + Start *form.RenderModel