This repository was archived by the owner on Jun 26, 2023. It is now read-only.
forked from eFishery/NeMo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.go
More file actions
145 lines (123 loc) · 3.54 KB
/
Copy pathstruct.go
File metadata and controls
145 lines (123 loc) · 3.54 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package main
type Setting struct {
UserAgent string `json:"USER_AGENT"`
RandMin int `json:"RAND_MIN"`
RandMax int `json:"RAND_MAX"`
LimitRandMax int `json:"LIMIT_RAND_MAX"`
SessionsDir string `json:"SESSION_DIR"`
CoralDir string `json:"CORAL_DIR"`
BuildDir string `json:"BUILD_DIR"`
AwsS3RegionName string `json:"AWS_S3_REGION_NAME"`
AwsS3Dir string `json:"AWS_S3_DIR"`
AwsS3EndpointUrl string `json:"AWS_S3_ENDPOINT_URL"`
AwsStorageBucketName string `json:"AWS_STORAGE_BUCKET_NAME"`
AwsSecretAccessKey string `json:"AWS_SECRET_ACCESS_KEY"`
AwsAccessKeyId string `json:"AWS_ACCESS_KEY_ID"`
}
type Commands struct {
Prefix string `yaml:"prefix"`
Command string `yaml:"command"`
Message string `yaml:"message"`
Record bool `yaml:"record"`
RunProcess bool `yaml:"run_process"`
}
type ExitCommand struct {
Prefix string `yaml:"prefix"`
Command string `yaml:"command"`
Message string `yaml:"message"`
}
type Validation struct {
Rule string `yaml:"rule"`
Message string `yaml:"message"`
}
type Question struct {
Slug string `yaml:"slug"`
Asking string `yaml:"asking"`
Validation Validation `yaml:"validation"`
}
type Questions struct {
Question Question
}
type Process struct {
Timeout int `yaml:"timeout"`
ExitCommand ExitCommand `yaml:"exit_command"`
EndMessage string `yaml:"end_message"`
Questions []Questions `yaml:"questions"`
}
type Author struct {
Name string `yaml:"name"`
Phone string `yaml:"phone"`
Email string `yaml:"email"`
Dept string `yaml:"dept"`
BU string `yaml:"bussiness_unit"`
}
type Webhook struct {
Service string `yaml:"service"` // SLACK, DISCORD, WEBHOOK
URL string `yaml:"url"`
}
type Coral struct {
Author Author `yaml:"author"`
Schedule `yaml:"schedule"`
DefaultGreeting Greeting `yaml:"default_greeting"`
Commands Commands `yaml:"commands"`
Process Process `yaml:"process"`
Webhook Webhook `yaml:"webhook"`
ExpectedUsers []string `yaml:"expected_users"`
}
type BuildCommand struct {
Prefix string `json:"prefix"`
Command string `json:"command"`
Record bool `json:"record"`
Message string `json:"message"`
RunProcess string `json:"run_process"`
}
type pesanFetch struct {
Message string `json:"message"`
}
type Data struct {
Slug string `json:"slug"`
Question string `json:"question"`
Answer string `json:"answer"`
Created string `json:"created"`
}
type Session struct {
PhoneNumber string `json:"phone_number"`
CurrentProcess string `json:"current_process"`
CurrentQuestionSlug int `json:"current_question_slug"`
ProcessStatus string `json:"process_status"` // DONE, WAIT_ANSWER, SENDED
Datas []Data `json:"data"`
Sent string `json:"sent"`
SentTo string `json:"sent_to"`
Created string `json:"created"`
Expired string `json:"expired"`
Finished string `json:"finished"`
}
type discord struct {
Content string `json:"content"`
}
type Schedule struct {
Rule string `json:"rule"`
ProcessName string `json:"process_name"`
Message string `json:"message" yaml:"message"`
Sender string `json:"sender"`
ExpectedUsers []string `json:"expected_users" yaml:"expected_users"`
}
type BuildGreeting struct {
ProcessName string `json:"process_name"`
Message string `json:"message" yaml:"message"`
Webhook Webhook `json:"webhook" yaml:"webhook"`
ExpectedUsers []string `json:"expected_users" yaml:"expected_users"`
}
type Greeting struct {
Message string `yaml:"message"`
Webhook Webhook `yaml:"webhook"`
}
type LogGreeting struct {
Message string `json:"message" yaml:"message"`
PhoneNumber string `json:"phone_number" yaml:"phone_number"`
}
// func NewProcess() {
// return &Process{
// Timeout: 300,
// }
// }