evidence

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evidence builds the per-profile evidence report (every removal request and reply, deadlines, the supervisory authority) shared by `eraser export` and the web UI's export download.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderHTML

func RenderHTML(report EvidenceReport) ([]byte, error)

RenderHTML renders the printable report.

Types

type BrokerEvidence

type BrokerEvidence struct {
	BrokerID       string             `json:"broker_id"`
	BrokerName     string             `json:"broker_name"`
	BrokerEmail    string             `json:"broker_email,omitempty"`
	BrokerWebsite  string             `json:"broker_website,omitempty"`
	PipelineStatus string             `json:"pipeline_status,omitempty"`
	PipelineSetBy  string             `json:"pipeline_set_by,omitempty"`
	PastDeadline   bool               `json:"past_deadline"`
	DeadlineDate   *time.Time         `json:"deadline_date,omitempty"`
	Requests       []RequestEvidence  `json:"requests"`
	Responses      []ResponseEvidence `json:"responses"`
}

type DataSubject

type DataSubject struct {
	FullName          string   `json:"full_name"`
	Email             string   `json:"email"`
	DateOfBirth       string   `json:"date_of_birth,omitempty"`
	Phone             string   `json:"phone,omitempty"`
	Address           string   `json:"address,omitempty"`
	NameVariants      []string `json:"name_variants,omitempty"`
	AdditionalEmails  []string `json:"additional_emails,omitempty"`
	AdditionalPhones  []string `json:"additional_phones,omitempty"`
	PreviousAddresses []string `json:"previous_addresses,omitempty"`
}

type EvidenceReport

type EvidenceReport struct {
	GeneratedAt time.Time        `json:"generated_at"`
	ProfileID   string           `json:"profile_id"`
	Subject     DataSubject      `json:"data_subject"`
	Brokers     []BrokerEvidence `json:"brokers"`
	Summary     EvidenceSummary  `json:"summary"`
	// Authority is the supervisory authority for the data subject's country,
	// when it could be resolved - the place to lodge an Art. 77 complaint.
	Authority *dpa.Authority `json:"supervisory_authority,omitempty"`
}

func Build

func Build(
	profile config.Profile,
	requests []history.Record,
	responses []history.BrokerResponse,
	brokerDB *broker.BrokerDatabase,
	engine *emailtmpl.Engine,
	since time.Time,
	now time.Time,
) EvidenceReport

Build assembles the evidence report for one profile from its history.

type EvidenceSummary

type EvidenceSummary struct {
	TotalRequests    int      `json:"total_requests"`
	Sent             int      `json:"sent"`
	Failed           int      `json:"failed"`
	BrokersContacted int      `json:"brokers_contacted"`
	BrokersResponded int      `json:"brokers_responded"`
	PastDeadline     []string `json:"past_deadline_no_reply"`
}

type RequestEvidence

type RequestEvidence struct {
	SentAt          time.Time `json:"sent_at"`
	Recipient       string    `json:"recipient"`
	Template        string    `json:"template"`
	LegalBasis      string    `json:"legal_basis"`
	MessageID       string    `json:"message_id,omitempty"`
	Status          string    `json:"status"`
	Manual          bool      `json:"sent_manually"`
	Error           string    `json:"error,omitempty"`
	RenderedSubject string    `json:"reconstructed_subject,omitempty"`
	RenderedBody    string    `json:"reconstructed_body,omitempty"`
}

type ResponseEvidence

type ResponseEvidence struct {
	ReceivedAt  time.Time `json:"received_at"`
	Type        string    `json:"type"`
	From        string    `json:"from,omitempty"`
	Subject     string    `json:"subject,omitempty"`
	Confidence  float64   `json:"confidence"`
	Body        string    `json:"body,omitempty"`
	FormURL     string    `json:"form_url,omitempty"`
	ConfirmURL  string    `json:"confirm_url,omitempty"`
	NeedsReview bool      `json:"needs_review"`
}

Jump to

Keyboard shortcuts

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