report

package
v0.0.0-...-9e3aff1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report interface {
	Buffer(headerXml bool) (*bytes.Buffer, error)
	String(headerXml bool) (string, error)
	Byte(headerXml bool) ([]byte, error)
	Zip() (*bytes.Buffer, error)
	SendReport()

	GetFileName() string
	GetZipName() string

	GetFromEmail() *tools.MailAddress
	GetFromOrg() string
	GetReportId() string
	GetDomain() string
	GetDateRange() (time.Time, time.Time)

	GetUriEmail() tools.ListMailAddress
	GetUriHttp() []string
	GetUriFtp() []string
	GetUriUnknown() []string
}

func GetReport

func GetReport(repuri string, meta ReportMetadata, policy ReportPolicy, record []ReportRecord) Report

type ReportAuth

type ReportAuth struct {
	SPF  ReportSPF    `xml:"spf"`
	DKIM []ReportDKIM `xml:"dkim"`
}

func GetReportAuth

func GetReportAuth(domain, result string, dkim []ReportDKIM) ReportAuth

type ReportDKIM

type ReportDKIM struct {
	Domain string `xml:"domain"`
	Result string `xml:"result"`
}

func GetReportDKIM

func GetReportDKIM(domain, result string) ReportDKIM

type ReportMetadata

type ReportMetadata struct {
	OrgName   string `xml:"org_name"`
	Email     string `xml:"email"`
	ReportId  string `xml:"report_id"`
	DateRange struct {
		Begin int `xml:"begin"`
		End   int `xml:"end"`
	} `xml:"date_range"`
}

Copyright 2018 Nicolas JUHEL

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

func GetReportMetadata

func GetReportMetadata(org, email string, id string, begin, end int) ReportMetadata

type ReportPolicy

type ReportPolicy struct {
	Domain string `xml:"domain"`
	ADKIM  string `xml:"adkim"`
	ASPF   string `xml:"aspf"`
	P      string `xml:"p"`
	SP     string `xml:"sp,omitempty"`
	PCT    int    `xml:"pct"`
}

func GetReportPolicy

func GetReportPolicy(domain, adkim, aspf, p, sp string, pct int) ReportPolicy

type ReportRecord

type ReportRecord struct {
	Row         ReportRow `xml:"row"`
	Identifiers struct {
		HeaderFrom string `xml:"header_from"`
	} `xml:"identifiers"`
	AuthResults ReportAuth `xml:"auth_results"`
}

Copyright 2018 Nicolas JUHEL

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

func GetReportRecord

func GetReportRecord(ip, disp, dkim, spf, from, domain, result string, count int, repdkim []ReportDKIM) ReportRecord

type ReportRow

type ReportRow struct {
	SourceIp        string `xml:"source_ip"`
	Count           int    `xml:"count"`
	PolicyEvaluated struct {
		Disposition string `xml:"disposition"`
		DKIM        string `xml:"dkim"`
		SPF         string `xml:"spf"`
	} `xml:"policy_evaluated"`
}

func GetReportRow

func GetReportRow(ip, disp, dkim, spf string, count int) ReportRow

type ReportSPF

type ReportSPF struct {
	Domain string `xml:"domain"`
	Result string `xml:"result"`
}

func GetReportSPF

func GetReportSPF(domain, result string) ReportSPF

Jump to

Keyboard shortcuts

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