content

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package content is the module manifest: the pages and posts a tenant's public site is made of.

It is the shape every module follows: contracts/, internal/, and one exported function taking a struct of typed dependencies and returning a module.Module. Two absences are decisions rather than omissions.

There are no versions. A history table, a diff, a restore and a retention rule are a module of their own, and the private catalogue has one; what a reference architecture owes is the lifecycle — draft, published, archived — and the events that announce it.

There is no stored HTML. The body is Markdown and the public route renders it on read, through goldmark with raw HTML left out and bluemonday over the result, so a policy that tightens applies to everything ever written instead of to whatever is saved next. See internal/render.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module(_ Deps) module.Module

Module is the manifest. The implementation is constructed here, in one line, and handed to the one place that uses it.

Types

type Deps

type Deps struct{}

Deps is what this module cannot make for itself, and it is empty: content belongs to a tenant by carrying its id, which row-level security matches on, and the author comes off the request's own context. It is a struct rather than no parameter so that the day it needs something, every call site gains a named field instead of a new argument.

Directories

Path Synopsis
Package contracts is everything another module, an app or a test may know about content: the entity, the events, the permissions and the Service interface.
Package contracts is everything another module, an app or a test may know about content: the entity, the events, the permissions and the Service interface.
contenttest
Package contenttest is the conformance suite for contracts.Service, and a fake that passes it.
Package contenttest is the conformance suite for contracts.Service, and a fake that passes it.
Package internal is every implementation of the content module.
Package internal is every implementation of the content module.

Jump to

Keyboard shortcuts

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