enchant

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName      = "Enchant"
	HandlerKey       = "enchant"
	MessageDirection = "out"
	MessageBodyType  = models.JSON
)

Variables

This section is empty.

Functions

func ExampleMessage

func ExampleMessage(cfg config.Configuration, data util.ExampleData) (cc.Message, error)

func NewHandler

func NewHandler() handlers.Handler

func Normalize

func Normalize(cfg config.Configuration, bytes []byte) (cc.Message, error)

Types

type EnchantData

type EnchantData struct {
	LabelId    string `json:"label_id,omitempty"`
	LabelName  string `json:"label_name,omitempty"`
	LabelColor string `json:"label_color,omitempty"`
}

type EnchantModel

type EnchantModel struct {
	Id         string   `json:"id,omitempty"`
	Number     int64    `json:"number,omitempty"`
	UserId     string   `json:"user_id,omitempty"`
	State      string   `json:"state,omitempty"`
	Subject    string   `json:"subject,omitempty"`
	LabelIds   []string `json:"label_ids,omitempty"`
	CustomerId string   `json:"customer_id,omitempty"`
	Type       string   `json:"type,omitempty"`
	ReplyTo    string   `json:"reply_to,omitempty"`
	CreatedAt  string   `json:"created_at,omitempty"`
}

type EnchantOutMessage

type EnchantOutMessage struct {
	Id         string       `json:"id,omitempty"`
	AccountId  string       `json:"account_id,omitempty"`
	AccountURL string       `json:"account_url,omitempty"`
	CreatedAt  string       `json:"created_at,omitempty"`
	Type       string       `json:"type,omitempty"`
	Data       EnchantData  `json:"data,omitempty"`
	ActorType  string       `json:"actor_type,omitempty"`
	ActorId    string       `json:"actor_id,omitempty"`
	ActorName  string       `json:"actor_name,omitempty"`
	ModelType  string       `json:"model_type,omitempty"`
	ModelId    string       `json:"model_id,omitempty"`
	Model      EnchantModel `json:"model,omitempty"`
}

func EnchantOutMessageFromBytes

func EnchantOutMessageFromBytes(bytes []byte) (EnchantOutMessage, error)

Jump to

Keyboard shortcuts

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