mapping

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package mapping provides generic types and I/O for framework-to-control mappings.

Each framework mapping is a list of entries where each entry maps an external requirement ID to internal controls and tracks an assessment status. The YAML field names are configurable via FrameworkConfig.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrameworkMapping added in v0.3.0

type FrameworkMapping struct {
	Entries []MappingEntry
	Extra   map[string]interface{} // non-list top-level keys (e.g. framework, version)
}

FrameworkMapping holds all mapping entries for one framework.

type MappingEntry added in v0.3.0

type MappingEntry struct {
	Key        string   // value from key_field
	Status     string   // value from status_field (result or coverage)
	WorkStatus string   // value from work_status_field (optional, e.g. EUDI "status")
	Controls   []string // mapped control IDs
	Owner      string
	Notes      string                 // value from notes_field
	Raw        map[string]interface{} // all original YAML fields (preserved on save)
}

MappingEntry holds one generic mapping entry.

type Mappings

type Mappings map[string]*FrameworkMapping

Mappings maps framework ID → loaded mapping.

func Load

func Load(mappingsDir string, frameworks []config.FrameworkConfig) (Mappings, error)

Load reads mapping YAML files for all configured frameworks.

func (Mappings) Save

func (m Mappings) Save(mappingsDir string, frameworks []config.FrameworkConfig) error

Save writes mapping files back to disk.

Jump to

Keyboard shortcuts

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