Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/asggo/spf
/ functions
Functions
24 in github.com/asggo/spf
⨍
Functions
24
◇
Types & classes
7
↓ 5 callers
Function
NewSPF
Create a new SPF record for the given domain using the provided string. If the provided string is not valid an error is returned.
spf.go:104
↓ 5 callers
Function
parseMechanism
(r Result, str, domain string)
mechanism.go:226
↓ 3 callers
Function
NewMechanism
NewMechanism creates a new Mechanism struct using the given string and domain name. When the mechanism does not define the domain, the provided domain
mechanism.go:206
↓ 3 callers
Method
Test
Test evaluates each mechanism to determine the result for the client. Mechanisms are evaluated in order until one of them provides a valid result. If
spf.go:42
↓ 2 callers
Function
buildNetworks
(ips []string, prefix string)
net.go:36
↓ 2 callers
Function
getSPFRecord
(domain string)
spf.go:82
↓ 2 callers
Function
ipInNetworks
(ip net.IP, networks []*net.IPNet)
net.go:26
↓ 2 callers
Function
networkCIDR
(ip, prefix string)
net.go:9
↓ 1 callers
Method
Evaluate
Evaluate determines if the given IP address is covered by the mechanism. If the IP is covered, the mechanism result is returned and error is nil. If t
mechanism.go:135
↓ 1 callers
Method
ResultTag
ResultTag maps the Result code to a suitable char
mechanism.go:56
↓ 1 callers
Method
SPFString
SPFString returns a formatted SPF object as a string suitable for use in a TXT record.
spf.go:71
↓ 1 callers
Function
SPFTest
* Exported functions. */ SPFTest determines the clients sending status for the given email addres. SPFTest will return one of the following results:
spf.go:174
↓ 1 callers
Method
String
Return a Mechanism as a string
mechanism.go:37
↓ 1 callers
Method
String
Return an SPF record as a string.
spf.go:54
↓ 1 callers
Method
Valid
Ensure the mechanism is valid
mechanism.go:103
↓ 1 callers
Function
aNetworks
(m *Mechanism)
net.go:49
↓ 1 callers
Function
mxNetworks
(m *Mechanism)
net.go:55
↓ 1 callers
Function
testPTR
(m *Mechanism, ip string)
net.go:68
Method
SPFString
SPFString return a string representation of a mechanism, suitable for using in a TXT record.
mechanism.go:73
Function
TestNewMechanism
(t *testing.T)
mechanism_test.go:37
Function
TestNewSPF
(t *testing.T)
spf_test.go:25
Function
TestSPFString
(t *testing.T)
spf_test.go:64
Function
TestSPFTest
(t *testing.T)
spf_test.go:42
Function
TestValidMechanism
(t *testing.T)
mechanism_test.go:15