Versions in this module Expand all Collapse all v0 v0.1.0 Jun 6, 2026 Changes in this version + var ErrEmptyAuthorEmail = errors.New("author email is required") + var ErrEmptyProductName = errors.New("product name is required") + var ErrInvalidAdherenceLevel = errors.New("invalid adherence level") + var ErrInvalidCatalog = errors.New("catalog not found") + var ErrInvalidChapter = errors.New("chapter not found in catalog") + var ErrInvalidComponent = errors.New("invalid component name") + var ErrInvalidCriterion = errors.New("criterion not found in catalog chapter") + var ErrInvalidFormat = errors.New("invalid format: must be .yaml, .yml, or .json") + type Adherence struct + Level AdherenceLevel + Notes string + type AdherenceLevel string + const LevelDoesNotSupport + const LevelNotApplicable + const LevelNotEvaluated + const LevelPartiallySupports + const LevelSupports + func ValidAdherenceLevels() []AdherenceLevel + func (a AdherenceLevel) IsValid() bool + type Chapter struct + Criteria []Criterion + Disabled bool + Notes string + type Component struct + Adherence Adherence + Name ComponentName + type ComponentName string + const ComponentAuthoringTool + const ComponentElectronicDoc + const ComponentNone + const ComponentSoftware + const ComponentWeb + func ValidComponentNames() []ComponentName + func (c ComponentName) IsValid() bool + type Contact struct + Address string + CompanyName string + Email string + Name string + Phone string + Website string + type Criterion struct + Components []Component + Num string + type Option func(*Report) + func WithAuthor(name, email string) Option + func WithAuthorCompany(name, email, companyName string) Option + func WithCatalog(catalogID string) Option + func WithEvaluationMethods(methods string) Option + func WithFeedback(feedback string) Option + func WithLegalDisclaimer(disclaimer string) Option + func WithLicense(license string) Option + func WithNotes(notes string) Option + func WithProduct(name, version string) Option + func WithProductDescription(name, version, description string) Option + func WithReportDate(date string) Option + func WithReportDateNow() Option + func WithRepository(url string) Option + func WithTitle(title string) Option + func WithVendor(name, email string) Option + func WithVersion(version int) Option + type Product struct + Description string + Name string + Version string + type RelatedOpenACR struct + Type string + URL string + type Report struct + Author Contact + Catalog string + Chapters map[string]Chapter + EvaluationMethods string + Feedback string + LastModifiedDate string + LegalDisclaimer string + License string + Notes string + Product Product + RelatedOpenACRs []RelatedOpenACR + ReportDate string + Repository string + Title string + Vendor *Contact + Version int + func Load(path string) (*Report, error) + func LoadJSON(r io.Reader) (*Report, error) + func LoadJSONBytes(data []byte) (*Report, error) + func LoadYAML(r io.Reader) (*Report, error) + func LoadYAMLBytes(data []byte) (*Report, error) + func NewReport(opts ...Option) *Report + func (r *Report) JSON() ([]byte, error) + func (r *Report) Save(path string) error + func (r *Report) Validate() []ValidationError + func (r *Report) ValidateAgainstCatalog(cat *catalog.Catalog) []ValidationError + func (r *Report) WriteJSON(w io.Writer) error + func (r *Report) WriteYAML(w io.Writer) error + func (r *Report) YAML() ([]byte, error) + type ValidationError struct + Err error + Field string + Message string + func (e ValidationError) Error() string + func (e ValidationError) Unwrap() error