/
type.go
31 lines (26 loc) · 1.36 KB
/
type.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
package atdocs
import "go.mongodb.org/mongo-driver/bson/primitive"
type FileAttachment struct {
MIMEType string `json:"mimetype,omitempty" bson:"mimetype,omitempty"`
Name string `json:"name,omitempty" bson:"name,omitempty"`
Base64 string `json:"base64,omitempty" bson:"base64,omitempty"`
}
type EmailMessage struct {
From string `json:"from,omitempty" bson:"from,omitempty"`
To string `json:"to,omitempty" bson:"to,omitempty"`
Subject string `json:"subject,omitempty" bson:"subject,omitempty"`
Body string `json:"body,omitempty" bson:"body,omitempty"`
Attachments []FileAttachment `json:"attachments,omitempty" bson:"attachments,omitempty"`
}
type Success struct {
ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"`
LabelIds []string `json:"labels,omitempty" bson:"labels,omitempty"`
Queue Queue `json:"queue,omitempty" bson:"queue,omitempty"`
}
type Queue struct {
ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"`
Session string `json:"session,omitempty" bson:"session,omitempty"`
Function string `json:"function,omitempty" bson:"function,omitempty"`
Scope []string `json:"scope,omitempty" bson:"scope,omitempty"`
Base64 string `json:"base64,omitempty" bson:"base64,omitempty"`
}