-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlp.go
53 lines (47 loc) · 1.72 KB
/
dlp.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
package tdproto
import "time"
// DLPBasicData structure for basic data (used for team, group, task, etc.)
type DLPBasicData struct {
UUID string `json:"uuid"`
Number uint `json:"number"`
Name string `json:"name"`
Description string `json:"description"`
}
// DLPUserData structure to store sender/receiver user information
type DLPUserData struct {
UUID string `json:"uuid"`
ContactUUID string `json:"contact_uuid"`
Name string `json:"name"`
FirstName string `json:"first_name"`
MiddleName string `json:"middle_name"`
LastName string `json:"last_name"`
Role string `json:"role"`
ContactPhone string `json:"contact_phone"`
ContactEmail string `json:"contact_email"`
IsBot bool `json:"is_bot"`
}
// DLPMessageData structure to store information about message
type DLPMessageData struct {
Text string `json:"text"`
Comment string `json:"comment"`
}
// DLPFileData structure to store information about file event
type DLPFileData struct {
Link string `json:"link"` // TODO
// Content []byte `json:"content"` // TODO
Comment string `json:"comment"` // TODO
}
// DLPEvent structure to store all information about event
type DLPEvent struct {
UUID string `json:"uuid"`
EventChannel ChatType `json:"event_channel"`
EventTime time.Time `json:"event_time"`
MediaType Mediatype `json:"media_type"`
TeamData DLPBasicData `json:"team_data"`
SenderData DLPUserData `json:"sender_data"`
DirectData DLPUserData `json:"direct_data"`
GroupData DLPBasicData `json:"group_data"`
TaskData DLPBasicData `json:"task_data"`
FileData DLPFileData `json:"file_data"`
MessageData DLPMessageData `json:"message_data"`
}