site

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: 6 Imported by: 0

Documentation

Overview

Package site is the module manifest: the data a tenant's public site is made of, and none of the rendering.

It is the smallest module here, and the three absences are the interesting part. There is no rest.Spec, because a Spec is five routes on a collection and a tenant has one site: the settings are a singleton, so the routes are a read and a PUT. There is no job, because nothing about a site happens because time passed. And there is no HTML — a theme reads a title, a navigation and a colour and decides what to do with them, which is E4's admin shell and whatever public theme follows it. This module owns the data that theme reads, and owning it separately is what lets the theme be replaced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module(_ Deps) module.Module

Module is the manifest, and the service it is built on.

The three routes this module used to write by hand are rest.Singleton now: one row per tenant, a read, a PUT, and a public face. They were the same three routes modules/billing wrote for its subscription, with the same transaction ritual and the same error mapping and no resource registered, so neither module had a generated screen. The kernel has the shape now, and this is the module that shows what it takes: a Load that answers with the defaults rather than a 404, a Save, and a Face saying what a visitor may see.

Types

type Deps

type Deps struct{}

Deps is what this module cannot make for itself, and it is empty: a site belongs to a tenant by carrying its id, which row-level security matches on. 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 a tenant's public site: the settings, the event, the permission and the Service interface.
Package contracts is everything another module, an app or a test may know about a tenant's public site: the settings, the event, the permission and the Service interface.
sitetest
Package sitetest is the conformance suite for contracts.Service, and a fake that passes it.
Package sitetest is the conformance suite for contracts.Service, and a fake that passes it.
Package internal is every implementation of the site module.
Package internal is every implementation of the site module.

Jump to

Keyboard shortcuts

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