Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FormatJSON is the format constant for a JSON output FormatJSON = "json" // FormatJSONP is the format constant for a JSONP output FormatJSONP = "jsonp" // FormatXML is the format constant for a XML output FormatXML = "xml" )
Variables ¶
View Source
var ( // ErrMissingCallback is thrown when the request is missing the // callback queryparam ErrMissingCallback = echo.NewHTTPError(http.StatusBadRequest, "Missing callback queryparam") // ErrUnsupportedFormat is thrown when the requestor has // defined an unsupported response format ErrUnsupportedFormat = echo.NewHTTPError(http.StatusBadRequest, "Unsupported format specified") )
Functions ¶
func FormatEncoder ¶
FormatEncoder is an encoder that reads the format from the passed echo context and writes the status code and response based on that format on the URL
func HealthHandler ¶
func HealthHandler() echo.HandlerFunc
HealthHandler returns a HealthResponse indicating the current health state of the service
func LookupHandler ¶
func LookupHandler(v *verifier.Verifier) echo.HandlerFunc
LookupHandler performs a single email verification and returns a fully populated lookup or an error
Types ¶
type Health ¶
type Health struct {
Status string `json:"status"`
}
Health is a healthcheck response body
type Lookup ¶
type Lookup struct { XMLName xml.Name `json:"-" xml:"lookup"` Address string `json:"address" xml:"address"` Username string `json:"username" xml:"username"` Domain string `json:"domain" xml:"domain"` MD5Hash string `json:"md5Hash" xml:"md5Hash"` ValidFormat bool `json:"validFormat" xml:"validFormat"` Deliverable bool `json:"deliverable" xml:"deliverable"` FullInbox bool `json:"fullInbox" xml:"fullInbox"` HostExists bool `json:"hostExists" xml:"hostExists"` CatchAll bool `json:"catchAll" xml:"catchAll"` }
Lookup contains all output data for an email verification Lookup
Click to show internal directories.
Click to hide internal directories.