Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Errors []struct { Message string `json:"message"` Field interface{} `json:"field"` Help interface{} `json:"help"` } `json:"errors"` }
func GetErrorResponse ¶
func GetErrorResponse(message string, field interface{}, help interface{}) ErrorResponse
type PostRequest ¶
type PostRequest struct { Personalizations []struct { To []struct { Email string `json:"email"` Name string `json:"name"` } `json:"to"` Cc []struct { Email string `json:"email"` Name string `json:"name"` } `json:"cc"` Bcc []struct { Email string `json:"email"` Name string `json:"name"` } `json:"bcc"` Substitutions map[string]string `json:"substitutions"` Subject string `json:"subject"` } `json:"personalizations" validate:"required"` From struct { Email string `json:"email" validate:"required"` Name string `json:"name"` } `json:"from"` ReplyTo struct { Email string `json:"email"` Name string `json:"name"` } `json:"reply_to"` Subject string `json:"subject"` Content []struct { Type string `json:"type"` Value string `json:"value"` } `json:"content" validate:"required"` Attachments []struct { Content string `json:"content"` Type string `json:"type"` Filename string `json:"filename"` Disposition string `json:"disposition"` ContentId string `json:"content_id"` } `json:"attachments"` }
func (*PostRequest) SetPostRequest ¶
func (postRequest *PostRequest) SetPostRequest(requestBody io.ReadCloser) error
func (*PostRequest) Validate ¶
func (postRequest *PostRequest) Validate() (int, ErrorResponse)
Click to show internal directories.
Click to hide internal directories.