Documentation
¶
Overview ¶
Package modelith reads modelith domain models (*.modelith.yaml files) into arch.DomainModel: the entities with their relationships, attributes and actions, the enums with their values in declared order, the glossary, the invariants and the imports that anarch-lint compares with the code. It parses through github.com/StevenACoffman/indomain's model package, the reader codetospec uses too, so both read one format one way; decoding is strict, so a field the format does not have is an error. Checking the rest of the format is modelith's job, with `modelith lint`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(file string, src []byte) (arch.DomainModel, error)
Parse reads the domain model src, the contents of the file at file. A file that is not YAML, has a field the format lacks, or is not a DomainModel of version v1, is EINVALID naming the file and pointing to `modelith lint`, which checks what this strict decoding does not.
Types ¶
This section is empty.