-
Notifications
You must be signed in to change notification settings - Fork 2
/
Interface.go
56 lines (44 loc) · 1.16 KB
/
Interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2019 Reaction Engineering International. All rights reserved.
// Use of this source code is governed by the MIT license in the file LICENSE.txt.
package email
import "github.com/reaction-eng/restlib/utils"
/**
Simple struct for email
*/
type HeaderInfo struct {
To []string
Bcc []string
Subject string
ReplyTo string
}
/**
Simple email message
*/
type Interface interface {
/**
Get the specific news istem
*/
SendEmail(email *HeaderInfo, body string, attachments map[string][]*utils.Base64File) error
/**
Send html email
*/
SendEmailTemplateString(email *HeaderInfo, templateString string, data interface{}, attachments map[string][]*utils.Base64File) error
SendEmailTemplateFile(email *HeaderInfo, templateString string, data interface{}, attachments map[string][]*utils.Base64File) error
/**
Send html email
*/
SendEmailTable(email *HeaderInfo, tableData TableInfo, attachments map[string][]*utils.Base64File) error
}
/**
Simple email message
*/
type TableInfo interface {
//Check to see if it node
IsNode() bool
//Get the title
GetTitle() string
//Get value
GetValue() string
//Get the children
GetChildren() []TableInfo
}