- Replace prazdnikisegodnyaru with celebratoday as first is banned in Russia - Update .golangci.yml rule set - Megatons of fixes for linter - Update README.md
40 lines
1.6 KiB
Go
40 lines
1.6 KiB
Go
// Package config нужен, чтобы разбить кольцевую зависимость.
|
|
package config
|
|
|
|
import (
|
|
"github.com/cockroachdb/pebble"
|
|
"github.com/go-redis/redis/v8"
|
|
)
|
|
|
|
type (
|
|
// MyConfig структурка, описывающая конфиг.
|
|
MyConfig struct { //nolint: govet // Идите в пень, мне так удобнее.
|
|
Server string `json:"server,omitempty"`
|
|
Port int `json:"port,omitempty"`
|
|
Timeout int `json:"timeout,omitempty"`
|
|
Loglevel string `json:"loglevel,omitempty"`
|
|
Log string `json:"log,omitempty"`
|
|
Channel string `json:"channel,omitempty"`
|
|
DataDir string `json:"datadir,omitempty"`
|
|
Csign string `json:"csign,omitempty"`
|
|
ForwardsMax int64 `json:"forwards_max,omitempty"`
|
|
OpenWeatherMap struct { //nolint: govet // Идите в пень, мне так удобнее.
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
Country bool `json:"country,omitempty"`
|
|
Appid string `json:"appid,omitempty"`
|
|
} `json:"openweathermap"`
|
|
Flickr struct { //nolint: govet // Идите в пень, мне так удобнее.
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
Key string `json:"key,omitempty"`
|
|
Secret string `json:"secret,omitempty"`
|
|
OAuthToken string `json:"oauth_token,omitempty"`
|
|
OAuthTokenSecret string `json:"oauth_token_secret,omitempty"`
|
|
} `json:"flickr"`
|
|
UserAgents []string `json:"user_agents,omitempty"`
|
|
PcacheDB map[string]*pebble.DB
|
|
RedisClient *redis.Client
|
|
}
|
|
)
|
|
|
|
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */
|