forked from matcornic/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
receipt.go
55 lines (51 loc) · 1.24 KB
/
receipt.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
package main
import (
"github.com/matcornic/hermes/v2"
)
type receipt struct {
}
func (r *receipt) Name() string {
return "receipt"
}
func (r *receipt) Email() hermes.Email {
return hermes.Email{
Body: hermes.Body{
Name: "Jon Snow",
Intros: []string{
"Your order has been processed successfully.",
},
Table: hermes.Table{
Data: [][]hermes.Entry{
{
{Key: "Item", Value: "Golang"},
{Key: "Description", Value: "Open source programming language that makes it easy to build simple, reliable, and efficient software"},
{Key: "Price", Value: "$10.99"},
},
{
{Key: "Item", Value: "Hermes"},
{Key: "Description", Value: "Programmatically create beautiful e-mails using Golang."},
{Key: "Price", Value: "$1.99"},
},
},
Columns: hermes.Columns{
CustomWidth: map[string]string{
"Item": "20%",
"Price": "15%",
},
CustomAlignment: map[string]string{
"Price": "right",
},
},
},
Actions: []hermes.Action{
{
Instructions: "You can check the status of your order and more in your dashboard:",
Button: hermes.Button{
Text: "Go to Dashboard",
Link: "https://hermes-example.com/dashboard",
},
},
},
},
}
}