home to your local SPACEGIRL 馃挮 arimelody.space
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at dev 50 lines 1.2 kB view raw
1package model 2 3import ( 4 "embed" 5 6 "github.com/jmoiron/sqlx" 7 8 "arimelody-web/log" 9) 10 11type ( 12 DBConfig struct { 13 Host string `toml:"host"` 14 Port int64 `toml:"port"` 15 Name string `toml:"name"` 16 User string `toml:"user"` 17 Pass string `toml:"pass"` 18 } 19 20 DiscordConfig struct { 21 AdminID string `toml:"admin_id" comment:"NOTE: admin_id to be deprecated in favour of local accounts and SSO."` 22 ClientID string `toml:"client_id"` 23 Secret string `toml:"secret"` 24 } 25 26 TwitchConfig struct { 27 Broadcaster string `toml:"broadcaster"` 28 ClientID string `toml:"client_id"` 29 Secret string `toml:"secret"` 30 } 31 32 Config struct { 33 BaseUrl string `toml:"base_url" comment:"Used for OAuth redirects."` 34 Host string `toml:"host"` 35 Port int64 `toml:"port"` 36 DataDirectory string `toml:"data_dir"` 37 TrustedProxies []string `toml:"trusted_proxies"` 38 DB DBConfig `toml:"db"` 39 Discord *DiscordConfig `toml:"discord"` 40 Twitch *TwitchConfig `toml:"twitch"` 41 } 42 43 AppState struct { 44 DB *sqlx.DB 45 Config Config 46 Log log.Logger 47 Twitch *TwitchState 48 PublicFS embed.FS 49 } 50)