gen-relationships

command
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: GPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command gen-relationships reads configs/relationship-types.yaml and emits generated source files for both the Go backend and the TypeScript frontend.

Usage:

cd api && go run ./cmd/gen-relationships

Or via the Makefile target:

make generate-relationships

The YAML file is the SINGLE SOURCE OF TRUTH for the asset relationship type registry. The generated files (relationship_types_generated.go on the Go side, relationship.types.generated.ts on the TS side) are committed but must NEVER be edited by hand — they will be overwritten on the next run.

Workflow when adding a new relationship type:

  1. Edit api/configs/relationship-types.yaml
  2. Run `make generate-relationships`
  3. Commit the YAML + the two generated files together

Jump to

Keyboard shortcuts

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