models

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageGetResponse

type MessageGetResponse struct {
	ID string `json:"id"`
	// swagger: allOf
	*MessagesStorageValue
}

MessageGetResponse -- response to get message request

swagger:model

type MessageListEntry

type MessageListEntry struct {
	ID           string    `json:"id,omitempty"`
	UserID       string    `json:"user_id,omitempty"`
	TemplateName string    `json:"template_name,omitempty"`
	CreatedAt    time.Time `json:"created_at,omitempty"`
}

MessageListEntry -- model for messages list

swagger:model

type MessageListQuery

type MessageListQuery struct {
	Page    int `form:"page,omitempty"`
	PerPage int `form:"per_page,omitempty"`
}

MessageListQuery -- query for message list

swagger:model

type MessageListResponse

type MessageListResponse struct {
	Messages []MessageListEntry `json:"message_list"`
	// swagger: allOf
	*MessageListQuery
}

MessageListEntry -- model for messages list with query

swagger:model

type MessagesStorageValue

type MessagesStorageValue struct {
	UserID       string                 `json:"user_id"`
	TemplateName string                 `json:"template_name"`
	Variables    map[string]interface{} `json:"variables,omitempty"`
	CreatedAt    time.Time              `json:"created_at"`
	Message      string                 `json:"message"`
}

MessagesStorageValue -- model for message in storage

swagger:model

type Recipient

type Recipient struct {
	// required: true
	ID string `json:"id"`
	// required: true
	Name string `json:"name"`
	// required: true
	Email     string                 `json:"email"`
	Variables map[string]interface{} `json:"variables"`
}

Recipient -- recipient info for send mail method

swagger:model

type SendRequest

type SendRequest struct {
	Delay   int `json:"delay"` // in minutes
	Message struct {
		CommonVariables map[string]string `json:"common_variables"`
		// required: true
		Recipients []Recipient `json:"recipient_data"`
	} `json:"message"`
}

SimpleSendResponse -- response to send mail using send method

swagger:model

type SendResponse

type SendResponse struct {
	Statuses []SendStatus `json:"email_list"`
}

SendResponse -- response to send mail using send method

swagger:model

type SendStatus

type SendStatus struct {
	RecipientID  string `json:"recipient_id"`
	TemplateName string `json:"template_name"`
	Status       string `json:"status"`
}

SendStatus -- status of sent emails

swagger:model

type SimpleSendRequest

type SimpleSendRequest struct {
	// required: true
	Template string `json:"template"`
	// required: true
	UserID string `json:"user_id"`
	// required: true
	Variables map[string]interface{} `json:"variables"`
}

SimpleSendRequest -- request to send mail using simple send method

swagger:model

type SimpleSendResponse

type SimpleSendResponse struct {
	UserID string `json:"user_id"`
}

SimpleSendResponse -- response to send mail using simple send method

swagger:model

type Template

type Template struct {
	// required: true
	Name string `json:"name,omitempty"`
	// required: true
	Version string `json:"version,omitempty"`
	// required: true
	Data string `json:"data,omitempty"`
	// required: true
	Subject   string     `json:"subject,omitempty"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
}

Template -- template model

swagger:model

type TemplatesListEntry

type TemplatesListEntry struct {
	Name     string   `json:"name,omitempty"`
	Versions []string `json:"versions,omitempty"`
}

TemplatesListEntry -- model for template list

swagger:model

type TemplatesListResponse

type TemplatesListResponse struct {
	Templates []TemplatesListEntry `json:"templates,omitempty"`
}

TemplatesListResponse -- templates list response

swagger:model

Jump to

Keyboard shortcuts

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