weburl

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package weburl builds normatik-ui frontend routes for the CLI's --url flag.

Every function is a pure string substitution against the mapping table in normatik-plans/checkpoints/cli-url-flag.md (CR-besluit 3): a bare numeric ID, or for work-item-types the slug. No query-params, no free user-text, no response-dependent conditional logic — the URL form is deliberately simplified to keep the injection/escaping surface structurally absent.

Functions return a PATH, not a full URL. Base-URL resolution (--profile / NORMATIK_BASE_URL / active-profile precedence, exit 78 on a missing base) is a separate concern (U2). httpx.CanonicalSiteURL already guarantees the resolved base has no trailing slash, and every path here starts with "/", so the caller's join is plain string concatenation (base + path) with no edge case left to reproduce or test in this package. Returning paths also keeps weburl free of any dependency on config/httpx/auth: every builder below is a zero-setup pure function.

No slug generation: AdminWorkItemType takes a slug the caller already has (from a command arg or a response field). A Go-side slug reimplementation was considered and rejected — see the CR's "Verworpen alternatieven" (three-way drift risk against SlugUtils.java / createPageSlug).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminArchive

func AdminArchive() string

AdminArchive returns the admin archive route (archive list).

func AdminArchivePage

func AdminArchivePage(id int64) string

AdminArchivePage returns the archived-page read view route (archive show / future UI ArchivedPageView).

func AdminAudit

func AdminAudit() string

AdminAudit returns the admin audit route (audit search). Never /admin/audit/{id} — that route does not exist (documented bug, Admin/links.ts:160-167).

func AdminDomainEnum

func AdminDomainEnum(id int64) string

AdminDomainEnum returns the admin domain-enum detail route (domain-enums get/create/update/usages).

func AdminDomainEnums

func AdminDomainEnums() string

AdminDomainEnums returns the admin domain-enum list route (domain-enums list/delete).

func AdminGroup

func AdminGroup(id int64) string

AdminGroup returns the admin group detail route (groups get/create/update/activate/deactivate/members *).

func AdminGroups

func AdminGroups() string

AdminGroups returns the admin group list route (groups list/search).

func AdminLanding

func AdminLanding() string

AdminLanding returns the admin landing-settings route (landing-settings get/update).

func AdminMacroScan

func AdminMacroScan() string

AdminMacroScan returns the admin macro-scan route (macros scan <name>); the macro name is not part of the URL.

func AdminTrash

func AdminTrash() string

AdminTrash returns the admin trash route (trash list/purge).

func AdminUser

func AdminUser(id int64) string

AdminUser returns the admin user detail route (users get/create/update/reactivate). Never the /edit variant — see CR besluit 3.

func AdminUsers

func AdminUsers() string

AdminUsers returns the admin user list route (users list/search/delete).

func AdminWorkItemType

func AdminWorkItemType(slug string) string

AdminWorkItemType returns the admin work-item-type detail route (work-item-types get/create/update/transitions *) — the only slug-keyed route in the mapping table, never numeric ID. The caller supplies the slug; this function does not validate or encode it.

func AdminWorkItemTypes

func AdminWorkItemTypes() string

AdminWorkItemTypes returns the admin work-item-type list route (work-item-types list/delete).

func AdminWorkflowRoles

func AdminWorkflowRoles() string

AdminWorkflowRoles returns the admin workflow-roles route (workflow-roles *).

func Page

func Page(id int64) string

Page returns the page detail route. Reused by every mapping-table entry that resolves to a page: pages get/render/create/update/move, pages describe-properties --page, pages revisions snapshot/start/transition/ restore, pages images list/upload, pages restriction *, macros usage, trash restore, archive restore, and work-items * — all of these print this same /pages/{id} URL, so they call Page directly instead of getting their own builder.

func PageAttachments

func PageAttachments(id int64) string

PageAttachments returns the page attachments route (pages attachments upload).

func PageSortChildren

func PageSortChildren(id int64) string

PageSortChildren returns the sort-children route (pages sort-children).

func PageType

func PageType(id int64) string

PageType returns the page-type detail route: page-types get/create/update/move/available-descriptors/chain-link-options, property-descriptors create/sort, and pages describe-properties --page-type all resolve here.

func PageTypes

func PageTypes() string

PageTypes returns the page-type list route (page-types list/delete/find).

func PageVersions

func PageVersions(id int64) string

PageVersions returns the page revision-list route (pages revisions list).

func Pages

func Pages() string

Pages returns the page list/tree route (pages list, pages tree).

func WorkflowDrafts

func WorkflowDrafts() string

WorkflowDrafts returns the drafts queue route (workflow drafts; role-gated CONTRIBUTOR+).

func WorkflowPublish

func WorkflowPublish() string

WorkflowPublish returns the publisher queue route (workflow publish; role-gated PUBLISHER).

func WorkflowReview

func WorkflowReview() string

WorkflowReview returns the reviewer queue route (workflow review; role-gated REVIEWER).

Types

This section is empty.

Jump to

Keyboard shortcuts

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