domainpacks

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PackGovernance exposes the governance metadata schema as a domain pack.
	PackGovernance = "governance"

	// PackResearchProvenance exposes the research provenance schema as a domain pack.
	PackResearchProvenance = "research_provenance"

	// PackEntity exposes the entity and source graph schema as a domain pack.
	PackEntity = "entity"
)
View Source
const PackAssessmentDrift = "assessment_drift"

PackAssessmentDrift is the ID of the assessment drift audit pack.

View Source
const PackPolicyProcess = "policy_process"

PackPolicyProcess is the ID of the policy/process drift audit pack.

Variables

This section is empty.

Functions

func FieldColumnMap

func FieldColumnMap(packID string) map[string]string

FieldColumnMap returns metadata-key to projection-column mapping for a pack.

func Register

func Register(pack Pack) error

Register adds a pack to the process-wide registry. Optional packages can call this from init() to make their schema available to DocGraph.

Types

type Field

type Field struct {
	Key         string
	Column      string
	ValueType   string
	Required    bool
	Aliases     []string
	Description string
}

Field describes one metadata key owned by a domain schema pack.

type Pack

type Pack struct {
	ID               string
	Name             string
	Version          string
	Domain           string
	Description      string
	Status           string
	BuiltIn          bool
	EnabledByDefault bool
	MinSchemaVersion int
	Fields           []Field
}

Pack is a declarative schema pack. Packs define metadata fields and optional typed projection columns without owning core schema migrations directly.

func BuiltinAssessmentDriftPack

func BuiltinAssessmentDriftPack() Pack

BuiltinAssessmentDriftPack returns the assessment drift audit schema as a bundled optional pack. EnabledByDefault is false — users opt in per project.

func BuiltinEntityPack

func BuiltinEntityPack() Pack

BuiltinEntityPack returns the entity and source graph schema as a pack.

func BuiltinGovernancePack

func BuiltinGovernancePack() Pack

BuiltinGovernancePack returns the current governance schema as a pack.

func BuiltinPolicyProcessPack

func BuiltinPolicyProcessPack() Pack

BuiltinPolicyProcessPack returns the policy/process drift audit schema as a bundled optional pack. EnabledByDefault is false — users opt in per project.

func BuiltinResearchProvenancePack

func BuiltinResearchProvenancePack() Pack

BuiltinResearchProvenancePack returns the current research schema as a pack.

func EnabledPacks

func EnabledPacks() []Pack

EnabledPacks returns process-wide packs enabled by default, sorted by ID.

func Packs

func Packs() []Pack

Packs returns all process-wide packs sorted by ID.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry stores pack definitions contributed by core or optional packages.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns an empty pack registry.

func (*Registry) EnabledPacks

func (r *Registry) EnabledPacks() []Pack

EnabledPacks returns packs whose default state is enabled.

func (*Registry) FieldColumnMap

func (r *Registry) FieldColumnMap(packID string) map[string]string

FieldColumnMap returns a copy of the projection mapping for packID.

func (*Registry) Packs

func (r *Registry) Packs() []Pack

Packs returns all registered packs sorted by ID.

func (*Registry) Register

func (r *Registry) Register(pack Pack) error

Register validates and stores a pack in this registry.

Jump to

Keyboard shortcuts

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