Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithoutErrsSMTPPresentation = SMTPPresentation{ CanConnectSMTP: true, HasFullInbox: false, IsCatchAll: true, IsDeliverable: true, IsDisabled: false, IsGreyListed: false, } FalseSMTPPresentation = SMTPPresentation{ CanConnectSMTP: false, HasFullInbox: false, IsCatchAll: false, IsDeliverable: false, IsDisabled: false, IsGreyListed: false, } )
Default results
Functions ¶
Types ¶
type CompositeConverter ¶
type CompositeConverter struct {
// contains filtered or unexported fields
}
CompositeConverter converts ev.ValidationResult depends of ev.ValidationResult.ValidatorName()
func NewCompositeConverter ¶
func NewCompositeConverter(converters MapConverters) CompositeConverter
NewCompositeConverter creates CompositeConverter
func (CompositeConverter) Can ¶
func (p CompositeConverter) Can(email evmail.Address, result ev.ValidationResult, opts Options) bool
Can result ev.ValidationResult be converted
func (CompositeConverter) Convert ¶
func (p CompositeConverter) Convert(email evmail.Address, result ev.ValidationResult, opts Options) interface{}
Convert ev.ValidationResult depends of ev.ValidationResult.ValidatorName()
type Interface ¶
type Interface interface { // Can defines the possibility applying of a converter Can(email evmail.Address, result ev.ValidationResult, opts Options) bool // Convert converts ev.ValidationResult in some presenter Convert(email evmail.Address, result ev.ValidationResult, opts Options) interface{} }
Interface converts ev.ValidationResult in some presenter
type MapConverters ¶
type MapConverters map[ev.ValidatorName]Interface
MapConverters is a map of converters
type SMTPConverter ¶
type SMTPConverter struct{}
SMTPConverter converts ev.ValidationResult in SMTPConverter
func NewSMTPConverter ¶
func NewSMTPConverter() *SMTPConverter
NewSMTPConverter creates SMTPConverter
func (SMTPConverter) Can ¶
func (SMTPConverter) Can(_ evmail.Address, result ev.ValidationResult, _ Options) bool
Can ev.ValidationResult be converted in SMTPConverter
func (SMTPConverter) Convert ¶
func (SMTPConverter) Convert(_ evmail.Address, result ev.ValidationResult, _ Options) interface{}
Convert ev.ValidationResult in SMTPConverter
type SMTPPresentation ¶
type SMTPPresentation struct { CanConnectSMTP bool `json:"can_connect_smtp"` HasFullInbox bool `json:"has_full_inbox"` IsCatchAll bool `json:"is_catch_all"` IsDeliverable bool `json:"is_deliverable"` IsDisabled bool `json:"is_disabled"` IsGreyListed bool `json:"is_grey_listed"` }
SMTPPresentation is a presentation of smtp from ev.ValidationResult
Click to show internal directories.
Click to hide internal directories.