-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.go
50 lines (41 loc) · 1.01 KB
/
structs.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
package main
import (
utopiago "github.com/Sagleft/utopialib-go/v2"
"github.com/gin-gonic/gin"
"gopkg.in/tucnak/telebot.v2"
)
type solution struct {
Config appConfig
Gin *gin.Engine
Messengers messengerClients
LastError error
}
type messengerClients struct {
Utopia utopiago.Client
Telegram *telebot.Bot
}
type appConfig struct {
Utopia utopiaConfig `json:"utopia"`
Telegram telegramConfig `json:"telegram"`
BindPort string `json:"bind_port"`
FrontEnd frontendConfig `json:"frontend"`
}
type frontendConfig struct {
Version string `json:"version"`
}
type utopiaConfig struct {
Host string `json:"host"`
Protocol string `json:"protocol"`
Port int `json:"port"`
Token string `json:"token"`
ChannelID string `json:"channel_id"`
}
type telegramConfig struct {
Token string `json:"token"`
ChatID int64 `json:"chat_id"`
SilentMode bool `json:"silent_mode"`
}
type response struct {
Status string `json:"status"`
ErrorInfo string `json:"error"`
}