-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.go
More file actions
49 lines (42 loc) · 981 Bytes
/
config.go
File metadata and controls
49 lines (42 loc) · 981 Bytes
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
package push
type StorageDriver string
const (
MySQLStorageDriver StorageDriver = "mysql"
PostgresStorageDriver StorageDriver = "postgres"
MemoryStorageDriver StorageDriver = "memory"
)
type RuntimeConfig struct {
StorageDriver StorageDriver `toml:"storage_driver"`
MySQL *MySQLConfig
Postgres *PostgresConfig
APNS *APNSConfig
FCM *FCMConfig
}
type MySQLConfig struct {
Hostname string
Port string
Database string
Username string
Password string
}
type PostgresConfig struct {
Hostname string
Port string
Database string
Username string
Password string
Prefix string
}
type APNSConfig struct {
CertPath string `toml:"cert_path"`
CertPass string `toml:"cert_passphrase"`
JWTPath string `toml:"jwt_p8_path"`
JWTTeamID string `toml:"jwt_team_id"`
JWTKeyID string `toml:"jwt_key_id"`
Sandbox bool
Topic string
}
type FCMConfig struct {
URL string
ServerKey string `toml:"server_key"`
}