Help us shape the future of Go! Take the 2026 Go Developer Survey

report

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: EUPL-1.2 Imports: 16 Imported by: 0

Documentation

Overview

Package report produit le dossier technique CRA exportable (HTML et JSON).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(dir string, d Dossier, lang i18n.Lang) error

Write écrit cra-dossier.json et cra-dossier.html dans dir (créé en 0700, fichiers en 0600).

Types

type BOMSummary

type BOMSummary struct {
	File        string    `json:"file"`
	SpecVersion string    `json:"spec_version"`
	Generator   string    `json:"generator"`
	Timestamp   time.Time `json:"timestamp"`
	Components  int       `json:"components"`
}

BOMSummary résume un SBOM du dossier.

type DeadlineView

type DeadlineView struct {
	Step   string     `json:"step"`
	Due    *time.Time `json:"due"`
	Done   *time.Time `json:"done"`
	Status string     `json:"status"`
}

DeadlineView est l'échéance d'une étape de signalement.

type Doc

type Doc struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

Doc est une partie narrative (cra/docs/*.md), rendue en texte échappé.

type Dossier

type Dossier struct {
	Product     dossier.Product `json:"product"`
	BOMs        []BOMSummary    `json:"boms"`
	Scan        *scan.Result    `json:"scan"`
	Reports     []ReportView    `json:"reports"`
	Docs        []Doc           `json:"docs"`
	GeneratedAt time.Time       `json:"generated_at"`
}

Dossier est le modèle pur du dossier technique ; ses balises JSON forment le schéma.

func Build

func Build(d dossier.Dossier, res *scan.Result, now time.Time) (Dossier, error)

Build assemble le dossier : résumés des SBOM, échéances calculées à now, parties narratives de cra/docs/*.md (triées par nom). res peut être nil (export sans scan).

type ReportView

type ReportView struct {
	ID             string         `json:"id"`
	Kind           string         `json:"kind"`
	Summary        string         `json:"summary"`
	AwareAt        *time.Time     `json:"aware_at"`
	FixAvailableAt *time.Time     `json:"fix_available_at"`
	EarlyWarningAt *time.Time     `json:"early_warning_at"`
	NotificationAt *time.Time     `json:"notification_at"`
	FinalAt        *time.Time     `json:"final_at"`
	Deadlines      []DeadlineView `json:"deadlines"`
}

ReportView est un signalement avec ses échéances à la date d'export.

Jump to

Keyboard shortcuts

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