serialization

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressJson

type AddressJson struct {

	// EmaillAddress is a valid email address
	EmailAddress string `json:"EmailAddress"`

	//The friendly or display name for the recipient.
	FriendlyName string `json:"FriendlyName"`
}

An AddressJson represents an individual email address for a message. To be serialized into JSON string before sending to the Injection Api.

type AttachmentJson

type AttachmentJson struct {

	// Name of attachment (displayed in email clients)
	Name string `json:"Name"`

	// Attachment data
	Content *[]byte `json:"Content"`

	// When set, used to embed an image within the body of an email message.
	ContentID string `json:"ContentId"`

	// The ContentType (MIME type) of the attachment.
	ContentType string `json:"ContentType"`

	// A list of custom headers added to the attachment.
	CustomHeaders []CustomHeadersJson `json:"CustomHeaders"`
}

AttachmentJson Represents a message attachment in the form of a byte array. To be serialized into JSON string before sending to the Injection Api.

type CustomHeadersJson

type CustomHeadersJson struct {

	// Gets or sets the custom header name
	Name string `json:"Name"`

	// Gets or sets the custom header value
	Value string `json:"Value"`
}

CustomHeadersJson represents a custom header as a name and value pair. To be serialized into JSON string before sending to the Injection Api.

type InjectionRequestJson

type InjectionRequestJson struct {

	// Your SocketLabs ServerId number.
	ServerID int `json:"serverId"`

	// Your SocketLabs Injection API key.
	APIKey string `json:"APIKey"`

	// Slice of messages to be sent.
	Messages []MessageJson `json:"Messages"`
}

InjectionRequestJson Represents a injection request for sending to the Injection Api.

type MergeDataJson

type MergeDataJson struct {

	// Defines merge field data for all messages in the request
	Global []MergeFieldJson `json:"Global,omitempty"`

	// Defines merge field data for each message
	PerMessage [][]MergeFieldJson `json:"PerMessage,omitempty"`
}

MergeDataJson represents MergeData for a single message. To be serialized into JSON string before sending to the Injection Api.

type MergeFieldJson

type MergeFieldJson struct {

	// Gets or sets the merge field
	Field string `json:"Field"`

	// Gets or sets the merge field value
	Value string `json:"Value"`
}

MergeFieldJson represents a merge field as a field and value pair. To be serialized into JSON string before sending to the Injection Api.

type MessageJson

type MessageJson struct {

	// List of To recipients.
	To []AddressJson `json:"To"`

	// List of Cc recipients.
	Cc []AddressJson `json:"Cc,omitempty"`

	// List of Bcc recipients.
	Bcc []AddressJson `json:"Bcc,omitempty"`

	// From Address
	From AddressJson `json:"From"`

	// Message Subject
	Subject string `json:"Subject"`

	// Container for both global and per recipient merge data (only applicable to bulk style messages)
	MergeData *MergeDataJson `json:"MergeData,omitempty"`

	// Plain text portion of the message body.
	TextBody string `json:"TextBody,omitempty"`

	// HTML portion of the message body.
	HTMLBody string `json:"HtmlBody,omitempty"`

	//AMP portion of the message body.
	AMPBody string `json:"AmpBody,omitempty"`

	// Api Template for the message.
	APITemplate string `json:"ApiTemplate,omitempty"`

	// Custom MailingId for the message.
	MailingID string `json:"MailingId,omitempty"`

	// Custom MessageId for the message.
	MessageID string `json:"MessageId,omitempty"`

	// Optional character set for your message.
	CharSet string `json:"CharSet,omitempty"`

	// Reply To address.
	ReplyTo *AddressJson `json:"ReplyTo,omitempty"`

	// List of attachments.
	Attachments []AttachmentJson `json:"Attachments,omitempty"`

	// List of custom message headers added to the message.
	CustomHeaders []CustomHeadersJson `json:"CustomHeaders,omitempty"`
}

MessageJson Represents a message for sending to the Injection Api. To be serialized into JSON string before sending to the Injection Api.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL