Documentation ¶
Index ¶
Constants ¶
View Source
const ( SMS = "Sms" EMAIL = "Email" FAKE = "Fake" )
Variables ¶
View Source
var TypeDb = GetDriver()
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Insert(TemplateDB) error FindAll() ([]TemplateDB, error) Find(ID string) (TemplateDB, error) Remove(ID string) bool }
type Event ¶
type Event struct { AccountID string `json:"AccountId"` Subject string `json:"Subject"` Channel map[string]bool `json:"Channel"` Lang string `json:"Language"` Recipient []string `json:"Recipient"` CustomData map[string]string `json:"CustomData"` TemplateType string `json:"TemplateType"` DateCreated time.Time `json:"dateCreated"` }
Event struct
type Fake ¶
type Fake struct{}
Fake struct
func (*Fake) FindAll ¶
func (f *Fake) FindAll() ([]TemplateDB, error)
func (*Fake) Insert ¶
func (f *Fake) Insert(t TemplateDB) error
type Message ¶
type Message struct { MessageID string `json:"messageId,omitempty"` Channel string `json:"channel,omitempty"` TemplateId string `json:"templateId,omitempty"` CustomData map[string]string `json:"customData,omitempty"` Subject string `json:"subject,omitempty"` Content string `json:"content,omitempty"` Recipient string `json:"recipient,omitempty"` FileAttached string `json:"fileAttached,omitempty"` MessageResponse MessageResponse `json:"messageResponse,omitempty"` DateCreated time.Time `json:"dateCreated,omitempty"` }
Message struct
type MessageResponse ¶
type MessageResponse struct { Response string `json:"response,omitempty"` Status string `json:"status,omitempty"` APIStatus string `json:"apiStatus,omitempty"` TimeOfResponse time.Time `json:"timeOfResponse,omitempty"` }
MessageResponse struct
type MongoDB ¶
type MongoDB struct{}
func (MongoDB) FindAll ¶
func (m MongoDB) FindAll() ([]TemplateDB, error)
func (MongoDB) Insert ¶
func (m MongoDB) Insert(template TemplateDB) error
type Template ¶
type Template struct { TemplateId string `bson:"_id" json:"TemplateId"` Channel string `bson:"Channel" json:"Channel"` Language string `bson:"Lang" json:"Lang"` Content string `bson:"Content" json:"Content"` }
Template struct
type TemplateDB ¶
Click to show internal directories.
Click to hide internal directories.