report

package
v0.0.0-...-cbc310f Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompiledFeedbackRegexp *regexp.Regexp

Functions

func ReadReports

func ReadReports(reportPath string) (map[string][]Feedback, error)

func Repository

func Repository(reportPath string) error

func RequestAllReports

func RequestAllReports() map[string][]Feedback

func RequestDomainReports

func RequestDomainReports(domain string) map[string][]Feedback

Types

type AuthResults

type AuthResults struct {
	DKIM []DKIM `xml:"dkim"` // Min 0
	SPF  []SPF  `xml:"spf"`  // Min 1
}

type DKIM

type DKIM struct {
	Domain      string `xml:"domain"`       // Min 1
	Result      string `xml:"result"`       // Min 1
	HumanResult string `xml:"human_result"` // Min 1
	Selector    string `xml:"selector"`     // Min 0
}

type DateRange

type DateRange struct {
	Begin customTime `xml:"begin"`
	End   customTime `xml:"end"`
}

type Feedback

type Feedback struct {
	Metadata        Metadata        `xml:"report_metadata"`
	PolicyPublished PolicyPublished `xml:"policy_published"`
	Records         []Record        `xml:"record"` // Min 1
}

func RequestDomainReport

func RequestDomainReport(domain string, id string) Feedback

type Identifiers

type Identifiers struct {
	HeaderFrom   []string `xml:"header_from"`   // Min 1
	EnvelopeFrom []string `xml:"envelope_from"` // Min 1 ??
	EnvelopeTo   []string `xml:"envelope_to"`   // Min 0
}

type Metadata

type Metadata struct {
	OrganizationName string    `xml:"org_name"`
	Email            string    `xml:"email"`
	ReportID         string    `xml:"report_id"`
	DateRange        DateRange `xml:"date_range"`
	ContactInfo      string    `xml:"extra_contact_info"` // Max 1
}

type PolicyEvaluated

type PolicyEvaluated struct {
	Disposition string `xml:"disposition"`
	DKIM        string `xml:"dkim"`
	SPF         string `xml:"spf"`
}

type PolicyPublished

type PolicyPublished struct {
	Domain                  string    `xml:"domain"`
	DKIM                    string    `xml:"adkim"`
	SPF                     string    `xml:"aspf"`
	Policy                  string    `xml:"p"`
	SubdomainPolicy         string    `xml:"sp"`
	Percent                 customInt `xml:"pct"`
	FailureReportingOptions string    `xml:"fo"`
}

type Query

type Query struct {
	Feedback Feedback `xml:"feedback"`
}

type Record

type Record struct {
	Row         Row         `xml:"row"`
	Identifiers Identifiers `xml:"identifiers"`
	AuthResults AuthResults `xml:"auth_results"`
}

type Row

type Row struct {
	SourceIP        string            `xml:"source_ip"`
	Count           customInt         `xml:"count"`
	PolicyEvaluated []PolicyEvaluated `xml:"policy_evaluated"` // Min 1
}

type SPF

type SPF struct {
	Domain string `xml:"domain"` // Min 1
	Result string `xml:"result"` // Min 1
	Scope  string `xml:"scope"`  // Min 1
}

Jump to

Keyboard shortcuts

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