Documentation
¶
Index ¶
- type HTTPClient
- type HTTPClientInterface
- type HTTPClientOptions
- func (h HTTPClientOptions) GetAPIKey() string
- func (h HTTPClientOptions) GetAuthScheme() string
- func (h HTTPClientOptions) GetHostURL() string
- func (h HTTPClientOptions) GetTLSConfig() *tls.Config
- func (h HTTPClientOptions) GetTimeout() time.Duration
- func (h *HTTPClientOptions) SetAPIKey(apiKey string) HTTPClientOptionsInterface
- func (h *HTTPClientOptions) SetAuthScheme(scheme string) HTTPClientOptionsInterface
- func (h *HTTPClientOptions) SetHostURL(url string) HTTPClientOptionsInterface
- func (h *HTTPClientOptions) SetTLSConfig(config *tls.Config) HTTPClientOptionsInterface
- func (h *HTTPClientOptions) SetTimeout(timeout time.Duration) HTTPClientOptionsInterface
- type HTTPClientOptionsInterface
- type HTTPRequest
- type HTTPRequestInterface
- type HTTPResponse
- func (h HTTPResponse) GetBody() string
- func (h HTTPResponse) GetIsSuccess() bool
- func (h HTTPResponse) GetStatusCode() int
- func (h *HTTPResponse) SetBody(body string) HTTPResponseInterface
- func (h *HTTPResponse) SetIsSuccess(isSuccess bool) HTTPResponseInterface
- func (h *HTTPResponse) SetStatusCode(statusCode int) HTTPResponseInterface
- type HTTPResponseInterface
- type Inboxroad
- type InboxroadInterface
- type Message
- func (m Message) GetAttachments() MessageAttachmentCollectionInterface
- func (m Message) GetFromEmail() string
- func (m Message) GetFromName() string
- func (m Message) GetHTML() string
- func (m Message) GetHeaders() MessageHeaderCollectionInterface
- func (m Message) GetMessageID() string
- func (m Message) GetReplyToEmail() string
- func (m Message) GetSubject() string
- func (m Message) GetText() string
- func (m Message) GetToEmail() string
- func (m Message) GetToName() string
- func (m *Message) SetAttachments(attachments MessageAttachmentCollectionInterface) MessageInterface
- func (m *Message) SetFromEmail(email string) MessageInterface
- func (m *Message) SetFromName(name string) MessageInterface
- func (m *Message) SetHTML(html string) MessageInterface
- func (m *Message) SetHeaders(headers MessageHeaderCollectionInterface) MessageInterface
- func (m *Message) SetMessageID(messageID string) MessageInterface
- func (m *Message) SetReplyToEmail(email string) MessageInterface
- func (m *Message) SetSubject(subject string) MessageInterface
- func (m *Message) SetText(text string) MessageInterface
- func (m *Message) SetToEmail(email string) MessageInterface
- func (m *Message) SetToName(name string) MessageInterface
- func (m Message) ToInboxroadMap() StringAnyMap
- func (m Message) ToMap() StringAnyMap
- type MessageAttachment
- func (m MessageAttachment) GetContent() string
- func (m MessageAttachment) GetContentAsBase64() string
- func (m MessageAttachment) GetMimeType() string
- func (m MessageAttachment) GetName() string
- func (m *MessageAttachment) SetContent(content string) MessageAttachmentInterface
- func (m *MessageAttachment) SetMimeType(mimeType string) MessageAttachmentInterface
- func (m *MessageAttachment) SetName(name string) MessageAttachmentInterface
- func (m MessageAttachment) ToInboxroadMap() StringMap
- func (m MessageAttachment) ToMap() StringMap
- type MessageAttachmentCollection
- func (m *MessageAttachmentCollection) Add(header MessageAttachmentInterface) MessageAttachmentCollectionInterface
- func (m *MessageAttachmentCollection) GetItems() []MessageAttachmentInterface
- func (m MessageAttachmentCollection) ToInboxroadSliceMap() SliceStringMap
- func (m MessageAttachmentCollection) ToSliceMap() SliceStringMap
- type MessageAttachmentCollectionInterface
- type MessageAttachmentInterface
- type MessageHeader
- func (m MessageHeader) GetKey() string
- func (m MessageHeader) GetValue() string
- func (m *MessageHeader) SetKey(key string) MessageHeaderInterface
- func (m *MessageHeader) SetValue(value string) MessageHeaderInterface
- func (m MessageHeader) ToInboxroadMap() StringMap
- func (m MessageHeader) ToMap() StringMap
- type MessageHeaderCollection
- type MessageHeaderCollectionInterface
- type MessageHeaderInterface
- type MessageInterface
- type MessagesAPI
- type MessagesAPIInterface
- type MessagesAPISendResponse
- type MessagesAPISendResponseInterface
- type SliceStringMap
- type StringAnyMap
- type StringMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(options HTTPClientOptionsInterface) *HTTPClient
func (*HTTPClient) NewRequest ¶
func (h *HTTPClient) NewRequest() HTTPRequestInterface
type HTTPClientInterface ¶
type HTTPClientInterface interface {
NewRequest() HTTPRequestInterface
}
type HTTPClientOptions ¶
type HTTPClientOptions struct {
// contains filtered or unexported fields
}
func (HTTPClientOptions) GetAPIKey ¶
func (h HTTPClientOptions) GetAPIKey() string
func (HTTPClientOptions) GetAuthScheme ¶
func (h HTTPClientOptions) GetAuthScheme() string
func (HTTPClientOptions) GetHostURL ¶
func (h HTTPClientOptions) GetHostURL() string
func (HTTPClientOptions) GetTLSConfig ¶
func (h HTTPClientOptions) GetTLSConfig() *tls.Config
func (HTTPClientOptions) GetTimeout ¶
func (h HTTPClientOptions) GetTimeout() time.Duration
func (*HTTPClientOptions) SetAPIKey ¶
func (h *HTTPClientOptions) SetAPIKey(apiKey string) HTTPClientOptionsInterface
func (*HTTPClientOptions) SetAuthScheme ¶
func (h *HTTPClientOptions) SetAuthScheme(scheme string) HTTPClientOptionsInterface
func (*HTTPClientOptions) SetHostURL ¶
func (h *HTTPClientOptions) SetHostURL(url string) HTTPClientOptionsInterface
func (*HTTPClientOptions) SetTLSConfig ¶
func (h *HTTPClientOptions) SetTLSConfig(config *tls.Config) HTTPClientOptionsInterface
func (*HTTPClientOptions) SetTimeout ¶
func (h *HTTPClientOptions) SetTimeout(timeout time.Duration) HTTPClientOptionsInterface
type HTTPClientOptionsInterface ¶
type HTTPClientOptionsInterface interface { SetHostURL(url string) HTTPClientOptionsInterface GetHostURL() string SetAuthScheme(scheme string) HTTPClientOptionsInterface GetAuthScheme() string SetAPIKey(apiKey string) HTTPClientOptionsInterface GetAPIKey() string SetTimeout(timeout time.Duration) HTTPClientOptionsInterface GetTimeout() time.Duration SetTLSConfig(config *tls.Config) HTTPClientOptionsInterface GetTLSConfig() *tls.Config }
func NewHTTPClientOptions ¶
func NewHTTPClientOptions() HTTPClientOptionsInterface
type HTTPRequest ¶
type HTTPRequest struct {
// contains filtered or unexported fields
}
func (*HTTPRequest) Get ¶
func (h *HTTPRequest) Get(url string) (HTTPResponseInterface, error)
func (*HTTPRequest) GetBody ¶
func (h *HTTPRequest) GetBody() string
func (*HTTPRequest) Post ¶
func (h *HTTPRequest) Post(url string) (HTTPResponseInterface, error)
func (*HTTPRequest) SetBody ¶
func (h *HTTPRequest) SetBody(body string) HTTPRequestInterface
type HTTPRequestInterface ¶
type HTTPRequestInterface interface { SetBody(body string) HTTPRequestInterface GetBody() string Get(url string) (HTTPResponseInterface, error) Post(url string) (HTTPResponseInterface, error) }
type HTTPResponse ¶
type HTTPResponse struct {
// contains filtered or unexported fields
}
func (HTTPResponse) GetBody ¶
func (h HTTPResponse) GetBody() string
func (HTTPResponse) GetIsSuccess ¶
func (h HTTPResponse) GetIsSuccess() bool
func (HTTPResponse) GetStatusCode ¶
func (h HTTPResponse) GetStatusCode() int
func (*HTTPResponse) SetBody ¶
func (h *HTTPResponse) SetBody(body string) HTTPResponseInterface
func (*HTTPResponse) SetIsSuccess ¶
func (h *HTTPResponse) SetIsSuccess(isSuccess bool) HTTPResponseInterface
func (*HTTPResponse) SetStatusCode ¶
func (h *HTTPResponse) SetStatusCode(statusCode int) HTTPResponseInterface
type HTTPResponseInterface ¶
type HTTPResponseInterface interface { SetBody(body string) HTTPResponseInterface GetBody() string SetStatusCode(statusCode int) HTTPResponseInterface GetStatusCode() int SetIsSuccess(isSuccess bool) HTTPResponseInterface GetIsSuccess() bool }
func NewHTTPResponse ¶
func NewHTTPResponse() HTTPResponseInterface
type Inboxroad ¶
type Inboxroad struct {
// contains filtered or unexported fields
}
func NewInboxroad ¶
func NewInboxroad(httpClient HTTPClientInterface) *Inboxroad
func (Inboxroad) NewMessagesAPI ¶
func (ir Inboxroad) NewMessagesAPI() MessagesAPIInterface
type InboxroadInterface ¶
type InboxroadInterface interface {
NewMessagesAPI() MessagesAPIInterface
}
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (Message) GetAttachments ¶
func (m Message) GetAttachments() MessageAttachmentCollectionInterface
func (Message) GetFromEmail ¶
func (Message) GetFromName ¶
func (Message) GetHeaders ¶
func (m Message) GetHeaders() MessageHeaderCollectionInterface
func (Message) GetMessageID ¶
func (Message) GetReplyToEmail ¶
func (Message) GetSubject ¶
func (Message) GetToEmail ¶
func (*Message) SetAttachments ¶
func (m *Message) SetAttachments(attachments MessageAttachmentCollectionInterface) MessageInterface
func (*Message) SetFromEmail ¶
func (m *Message) SetFromEmail(email string) MessageInterface
func (*Message) SetFromName ¶
func (m *Message) SetFromName(name string) MessageInterface
func (*Message) SetHTML ¶
func (m *Message) SetHTML(html string) MessageInterface
func (*Message) SetHeaders ¶
func (m *Message) SetHeaders(headers MessageHeaderCollectionInterface) MessageInterface
func (*Message) SetMessageID ¶
func (m *Message) SetMessageID(messageID string) MessageInterface
func (*Message) SetReplyToEmail ¶
func (m *Message) SetReplyToEmail(email string) MessageInterface
func (*Message) SetSubject ¶
func (m *Message) SetSubject(subject string) MessageInterface
func (*Message) SetText ¶
func (m *Message) SetText(text string) MessageInterface
func (*Message) SetToEmail ¶
func (m *Message) SetToEmail(email string) MessageInterface
func (*Message) SetToName ¶
func (m *Message) SetToName(name string) MessageInterface
func (Message) ToInboxroadMap ¶
func (m Message) ToInboxroadMap() StringAnyMap
func (Message) ToMap ¶
func (m Message) ToMap() StringAnyMap
type MessageAttachment ¶
type MessageAttachment struct {
// contains filtered or unexported fields
}
func (MessageAttachment) GetContent ¶
func (m MessageAttachment) GetContent() string
func (MessageAttachment) GetContentAsBase64 ¶
func (m MessageAttachment) GetContentAsBase64() string
func (MessageAttachment) GetMimeType ¶
func (m MessageAttachment) GetMimeType() string
func (MessageAttachment) GetName ¶
func (m MessageAttachment) GetName() string
func (*MessageAttachment) SetContent ¶
func (m *MessageAttachment) SetContent(content string) MessageAttachmentInterface
func (*MessageAttachment) SetMimeType ¶
func (m *MessageAttachment) SetMimeType(mimeType string) MessageAttachmentInterface
func (*MessageAttachment) SetName ¶
func (m *MessageAttachment) SetName(name string) MessageAttachmentInterface
func (MessageAttachment) ToInboxroadMap ¶
func (m MessageAttachment) ToInboxroadMap() StringMap
func (MessageAttachment) ToMap ¶
func (m MessageAttachment) ToMap() StringMap
type MessageAttachmentCollection ¶
type MessageAttachmentCollection struct {
// contains filtered or unexported fields
}
func (*MessageAttachmentCollection) Add ¶
func (m *MessageAttachmentCollection) Add(header MessageAttachmentInterface) MessageAttachmentCollectionInterface
func (*MessageAttachmentCollection) GetItems ¶
func (m *MessageAttachmentCollection) GetItems() []MessageAttachmentInterface
func (MessageAttachmentCollection) ToInboxroadSliceMap ¶
func (m MessageAttachmentCollection) ToInboxroadSliceMap() SliceStringMap
func (MessageAttachmentCollection) ToSliceMap ¶
func (m MessageAttachmentCollection) ToSliceMap() SliceStringMap
type MessageAttachmentCollectionInterface ¶
type MessageAttachmentCollectionInterface interface { Add(header MessageAttachmentInterface) MessageAttachmentCollectionInterface GetItems() []MessageAttachmentInterface ToSliceMap() SliceStringMap ToInboxroadSliceMap() SliceStringMap }
func NewMessageAttachmentCollection ¶
func NewMessageAttachmentCollection() MessageAttachmentCollectionInterface
func NewMessageAttachmentCollectionFromSliceMap ¶
func NewMessageAttachmentCollectionFromSliceMap(rawAttachments SliceStringMap) MessageAttachmentCollectionInterface
type MessageAttachmentInterface ¶
type MessageAttachmentInterface interface { SetName(name string) MessageAttachmentInterface GetName() string SetContent(content string) MessageAttachmentInterface GetContent() string SetMimeType(mimeType string) MessageAttachmentInterface GetMimeType() string GetContentAsBase64() string ToMap() StringMap ToInboxroadMap() StringMap }
func NewMessageAttachment ¶
func NewMessageAttachment(name, content, mimeType string) MessageAttachmentInterface
type MessageHeader ¶
type MessageHeader struct {
// contains filtered or unexported fields
}
func (MessageHeader) GetKey ¶
func (m MessageHeader) GetKey() string
func (MessageHeader) GetValue ¶
func (m MessageHeader) GetValue() string
func (*MessageHeader) SetKey ¶
func (m *MessageHeader) SetKey(key string) MessageHeaderInterface
func (*MessageHeader) SetValue ¶
func (m *MessageHeader) SetValue(value string) MessageHeaderInterface
func (MessageHeader) ToInboxroadMap ¶
func (m MessageHeader) ToInboxroadMap() StringMap
func (MessageHeader) ToMap ¶
func (m MessageHeader) ToMap() StringMap
type MessageHeaderCollection ¶
type MessageHeaderCollection struct {
// contains filtered or unexported fields
}
func (*MessageHeaderCollection) Add ¶
func (m *MessageHeaderCollection) Add(header MessageHeaderInterface) MessageHeaderCollectionInterface
func (*MessageHeaderCollection) GetItems ¶
func (m *MessageHeaderCollection) GetItems() []MessageHeaderInterface
func (MessageHeaderCollection) ToInboxroadMap ¶
func (m MessageHeaderCollection) ToInboxroadMap() StringMap
func (MessageHeaderCollection) ToSliceMap ¶
func (m MessageHeaderCollection) ToSliceMap() SliceStringMap
type MessageHeaderCollectionInterface ¶
type MessageHeaderCollectionInterface interface { Add(header MessageHeaderInterface) MessageHeaderCollectionInterface GetItems() []MessageHeaderInterface ToSliceMap() SliceStringMap ToInboxroadMap() StringMap }
func NewMessageHeaderCollection ¶
func NewMessageHeaderCollection() MessageHeaderCollectionInterface
func NewMessageHeaderCollectionFromSliceMap ¶
func NewMessageHeaderCollectionFromSliceMap(rawHeaders SliceStringMap) MessageHeaderCollectionInterface
type MessageHeaderInterface ¶
type MessageHeaderInterface interface { SetKey(key string) MessageHeaderInterface GetKey() string SetValue(value string) MessageHeaderInterface GetValue() string ToMap() StringMap ToInboxroadMap() StringMap }
func NewMessageHeader ¶
func NewMessageHeader(key, value string) MessageHeaderInterface
type MessageInterface ¶
type MessageInterface interface { SetMessageID(messageID string) MessageInterface GetMessageID() string SetFromEmail(email string) MessageInterface GetFromEmail() string SetFromName(name string) MessageInterface GetFromName() string SetToEmail(email string) MessageInterface GetToEmail() string SetToName(name string) MessageInterface GetToName() string SetReplyToEmail(email string) MessageInterface GetReplyToEmail() string SetSubject(subject string) MessageInterface GetSubject() string SetText(text string) MessageInterface GetText() string SetHTML(subject string) MessageInterface GetHTML() string SetHeaders(headers MessageHeaderCollectionInterface) MessageInterface GetHeaders() MessageHeaderCollectionInterface SetAttachments(attachments MessageAttachmentCollectionInterface) MessageInterface GetAttachments() MessageAttachmentCollectionInterface ToMap() StringAnyMap ToInboxroadMap() StringAnyMap }
func NewMessage ¶
func NewMessage() MessageInterface
func NewMessageFromMap ¶
func NewMessageFromMap(params StringAnyMap) MessageInterface
type MessagesAPI ¶
type MessagesAPI struct {
// contains filtered or unexported fields
}
func NewMessagesAPI ¶
func NewMessagesAPI(httpClient HTTPClientInterface) *MessagesAPI
func (*MessagesAPI) Send ¶
func (m *MessagesAPI) Send(message MessageInterface) (MessagesAPISendResponseInterface, error)
type MessagesAPIInterface ¶
type MessagesAPIInterface interface {
Send(message MessageInterface) (MessagesAPISendResponseInterface, error)
}
type MessagesAPISendResponse ¶
type MessagesAPISendResponse struct {
HTTPResponse
}
func (MessagesAPISendResponse) GetMessageID ¶
func (m MessagesAPISendResponse) GetMessageID() string
type MessagesAPISendResponseInterface ¶
type MessagesAPISendResponseInterface interface { HTTPResponseInterface GetMessageID() string }
func NewMessagesAPISendResponse ¶
func NewMessagesAPISendResponse() MessagesAPISendResponseInterface
type SliceStringMap ¶
type SliceStringMap = []StringMap
type StringAnyMap ¶
type StringAnyMap = map[string]interface{}
Click to show internal directories.
Click to hide internal directories.