Documentation
¶
Overview ¶
Package modulith defines canonical descriptors for compile-time application module boundaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Module ¶
func Module() sdk.Definition
Module marks package documentation as an application-module root.
The root package is the module's default public API. Descendant packages are internal unless explicitly exposed by NamedInterface. Spice validates cross-module import edges, allowed dependencies, cycles, and unassigned packages before generation.
// @import { Module } from "github.com/spice-framework/spice/annotation/modulith"
// @Module(allowedDependencies=["example.com/app/inventory"])
package orders
func ModuleHandler ¶
ModuleHandler contributes an application-module root and its allowed dependencies.
func NamedInterface ¶
func NamedInterface() sdk.Definition
NamedInterface exposes one descendant package as a named module API.
The descriptor is repeatable on package documentation. Consumers reference the owning module and API explicitly; a named interface never exposes other descendant packages by implication.
// @import { NamedInterface } from "github.com/spice-framework/spice/annotation/modulith"
// @NamedInterface("events")
package api
func NamedInterfaceHandler ¶
NamedInterfaceHandler contributes one explicitly exposed module API.
Types ¶
This section is empty.