Documentation
¶
Index ¶
Constants ¶
const ( // Name of https://github.com/AfterShip/email-verifier converter Name converter.Name = "AfterShipEmailVerifier" // EmailRegexString is an email regex EmailRegexString = "" /* 1277-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DepConverter ¶
type DepConverter struct {
// contains filtered or unexported fields
}
DepConverter converts ev.ValidationResult in DepPresentation
func NewDepConverter ¶
func NewDepConverter(converter converter.CompositeConverter, calculateReachable FuncReachable) DepConverter
NewDepConverter creates DepConverter
func NewDepConverterDefault ¶
func NewDepConverterDefault() DepConverter
NewDepConverterDefault creates default DepConverter
func (DepConverter) Can ¶
func (DepConverter) Can(_ evmail.Address, result ev.ValidationResult, _ converter.Options) bool
Can ev.ValidationResult be converted in DepConverter
func (DepConverter) Convert ¶
func (s DepConverter) Convert(email evmail.Address, resultInterface ev.ValidationResult, opts converter.Options) interface{}
Convert ev.ValidationResult in DepConverter
type DepPresentation ¶
type DepPresentation struct { Email string `json:"email"` Reachable Reachable `json:"reachable"` Syntax *SyntaxPresentation `json:"syntax"` SMTP *SMTPPresentation `json:"smtp"` Gravatar *GravatarPresentation `json:"gravatar"` Suggestion string `json:"suggestion"` Disposable bool `json:"disposable"` RoleAccount bool `json:"role_account"` Free bool `json:"free"` HasMxRecords bool `json:"has_mx_records"` }
DepPresentation is a presentation
type FuncReachable ¶
type FuncReachable func(depPresentation DepPresentation) Reachable
FuncReachable is an interface to calculate Reachable
type GravatarConverter ¶
type GravatarConverter struct{}
GravatarConverter converts ev.ValidationResult in GravatarPresentation
func (GravatarConverter) Can ¶
func (GravatarConverter) Can(_ evmail.Address, result ev.ValidationResult, _ converter.Options) bool
Can ev.ValidationResult be converted in GravatarPresentation
func (GravatarConverter) Convert ¶
func (GravatarConverter) Convert(_ evmail.Address, result ev.ValidationResult, _ converter.Options) interface{}
Convert ev.ValidationResult in GravatarPresentation
type GravatarPresentation ¶
GravatarPresentation is presentation for ev.GravatarValidationResult
type Reachable ¶
type Reachable string
Reachable is a type
const ( ReachableYes Reachable = "yes" ReachableNo Reachable = "no" ReachableUnknown Reachable = "unknown" )
Reachable constants
func CalculateReachable ¶
func CalculateReachable(depPresentation DepPresentation) Reachable
CalculateReachable returns Reachable status
type SMTPPresentation ¶
type SMTPPresentation struct { HostExists bool `json:"host_exists"` FullInbox bool `json:"full_inbox"` CatchAll bool `json:"catch_all"` Deliverable bool `json:"deliverable"` Disabled bool `json:"disabled"` }
SMTPPresentation for smtp validator
type SyntaxConverter ¶
type SyntaxConverter struct{}
SyntaxConverter converts ev.ValidationResult in SyntaxPresentation
func (SyntaxConverter) Can ¶
func (SyntaxConverter) Can(_ evmail.Address, result ev.ValidationResult, _ converter.Options) bool
Can ev.ValidationResult be converted in SyntaxPresentation
func (SyntaxConverter) Convert ¶
func (SyntaxConverter) Convert(email evmail.Address, result ev.ValidationResult, _ converter.Options) interface{}
Convert ev.ValidationResult in SyntaxPresentation
type SyntaxPresentation ¶
type SyntaxPresentation struct { Username string `json:"username"` Domain string `json:"domain"` Valid bool `json:"valid"` }
SyntaxPresentation is a syntax result