report

package
v0.2.0-beta-report-001 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRowHeight

func CalculateRowHeight(pdf *gofpdf.Fpdf, text string, width, lineHeight float64) float64

CalculateRowHeight calculates the required height for a MultiCell.

func GeneratePDFReport

func GeneratePDFReport(stepWiseData map[string]StepData, filename string) error

func ProcessVerifiedEvidence

func ProcessVerifiedEvidence(verifiedEvidence map[string][]source.VerifiedCollection, reportConfig ReportConfig) (map[string]StepData, error)

Types

type AttestationInfo

type AttestationInfo struct {
	ID     string   `yaml:"id"`
	URL    string   `yaml:"url"`
	Fields []string `yaml:"fields"`
}

AttestationInfo holds information about each attestation in the report.

type Functionary

type Functionary struct {
	//Important fields from the certificate
	CommonName    string    `json:"commonName"`
	Email         string    `json:"email"`
	URI           string    `json:"uri"`
	CACommonName  string    `json:"caCommonName"`
	TimeStampedAt time.Time `json:"timeStampedAt"`
}

type ReportConfig

type ReportConfig struct {
	Title        string            `yaml:"title"`
	StepsSummary bool              `yaml:"steps_summary"`
	Attestations []AttestationInfo `yaml:"attestations"`
}

func LoadReportConfig

func LoadReportConfig(filePath string) (ReportConfig, error)

LoadReportConfig reads the YAML configuration file and unmarshals it into a ReportConfig struct.

type StepData

type StepData struct {
	StartTime time.Time              `json:"startTime"`
	EndTime   time.Time              `json:"endTime"`
	Data      map[string]interface{} `json:"data"`
	Signers   []Functionary          `json:"signers"`
}

Jump to

Keyboard shortcuts

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