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 ¶
- func AdminArchive() string
- func AdminArchivePage(id int64) string
- func AdminAudit() string
- func AdminDomainEnum(id int64) string
- func AdminDomainEnums() string
- func AdminGroup(id int64) string
- func AdminGroups() string
- func AdminLanding() string
- func AdminMacroScan() string
- func AdminTrash() string
- func AdminUser(id int64) string
- func AdminUsers() string
- func AdminWorkItemType(slug string) string
- func AdminWorkItemTypes() string
- func AdminWorkflowRoles() string
- func Page(id int64) string
- func PageAttachments(id int64) string
- func PageSortChildren(id int64) string
- func PageType(id int64) string
- func PageTypes() string
- func PageVersions(id int64) string
- func Pages() string
- func WorkflowDrafts() string
- func WorkflowPublish() string
- func WorkflowReview() string
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
PageAttachments returns the page attachments route (pages attachments upload).
func PageSortChildren ¶
PageSortChildren returns the sort-children route (pages sort-children).
func PageType ¶
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 ¶
PageVersions returns the page revision-list route (pages revisions list).
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.