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 ( // ErrInvalidCallback is thrown when the request is missing the callback queryparam ErrInvalidCallback = echo.NewHTTPError(http.StatusBadRequest, "Invalid callback query param provided") // ErrUnsupportedFormat is thrown when the requestor has defined an unsupported response format ErrUnsupportedFormat = echo.NewHTTPError(http.StatusBadRequest, "Unsupported format") )
View Source
var ErrVerificationFailure = echo.NewHTTPError(http.StatusInternalServerError, "Failed to perform email verification lookup")
ErrVerificationFailure is thrown when there is error while validating an email
Functions ¶
Types ¶
type Encoder ¶
Encoder is a function type that encodes a response given a context, a status code and a response
type Health ¶
type Health struct {
Status string `json:"status"`
}
Health is a healthcheck response body
type Service ¶
type Service struct { Logger *logrus.Entry Encode Encoder Timeout time.Duration Verifier *verifier.Verifier }
Service contains all dependencies for the Trumail API
func NewService ¶
NewService generates a new, fully populated Trumail reference
Click to show internal directories.
Click to hide internal directories.