Documentation
¶
Overview ¶
Package reportpdf renders FCAF conformance assessment reports as PDF documents.
Index ¶
- Constants
- func LoadMaterials(suite string, testIDs []string) (map[string]dsl.TestDefinition, map[string]SourceDetails, []string)
- func PrepareImage(data []byte) ([]byte, error)
- func ReferenceFilename(reference string) string
- func Render(ctx context.Context, document Document) ([]byte, error)
- func SourceURL(suite string, sourceTitle string) string
- type Category
- type Document
- type EvidenceEntry
- type ImageAsset
- type Input
- type Metadata
- type RunnerInfo
- type SourceDetails
- type TestEntry
- type TestGroup
Constants ¶
const (
// DefaultSuite is the suite of a report that names none.
DefaultSuite = "wallet_solution/relying_party"
)
Variables ¶
This section is empty.
Functions ¶
func LoadMaterials ¶
func LoadMaterials(suite string, testIDs []string) ( map[string]dsl.TestDefinition, map[string]SourceDetails, []string, )
LoadMaterials reads the catalog definition and the FCAF source Markdown of each test of a report of the given suite (DefaultSuite when empty).
func PrepareImage ¶
func ReferenceFilename ¶
func SourceURL ¶
SourceURL links a test on the FCAF test-cases page of its suite (DefaultSuite when empty). The page derives its anchors from the "# " heading of each source Markdown, which does not always match the source file name that Credimi test IDs come from (CredentialStructure007 in WS_RP_DM_CredentialMetadata_CredentialStructure_007.md).
Types ¶
type Document ¶
type Document struct {
Report engine.Report
Metadata Metadata
JSONSHA256 string
Categories []Category
Evidence []EvidenceEntry
Unassigned []ImageAsset
Warnings []string
SelectedCount int
}
func BuildDocument ¶
type EvidenceEntry ¶
type EvidenceEntry struct {
Key string
Record engine.EvidenceRecord
Referenced bool
}
type ImageAsset ¶
func DeduplicateScreenshots ¶
func DeduplicateScreenshots(images []ImageAsset) ([]ImageAsset, int)
DeduplicateScreenshots keeps one screenshot per Maestro command burst (the last, which captures the final state of the step) and every non-burst screenshot unchanged. It returns the kept images and the dropped count.
type Input ¶
type Input struct {
Report engine.Report
RawJSON []byte
Metadata Metadata
Definitions map[string]dsl.TestDefinition
Sources map[string]SourceDetails
Images []ImageAsset
Warnings []string
}
type RunnerInfo ¶
type SourceDetails ¶
type SourceDetails struct {
Title string
Objective string
References string
Applicability string
WalletRelevancy string
Preconditions string
Scenario string
ExpectedResults string
}
func ParseSourceMarkdown ¶
func ParseSourceMarkdown(markdown string) SourceDetails
type TestEntry ¶
type TestEntry struct {
Execution engine.ExecutedTest
Definition dsl.TestDefinition
Source SourceDetails
Evidence []EvidenceEntry
Images []ImageAsset
}