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 ¶
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