Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configuration{ AdminUsername: "REPLACE_ME", Listen: "127.0.0.1:8080", Logger: []zapwriter.Config{DefaultLoggerConfig}, DatabaseType: "sqlite3", DatabaseURL: "./github2telegram.DB", PollingInterval: 5 * time.Minute, ProcessingFeeds: make(map[string]bool), }
View Source
var DefaultLoggerConfig = zapwriter.Config{
Logger: "",
File: "stdout",
Level: "debug",
Encoding: "json",
EncodingTime: "iso8601",
EncodingDuration: "seconds",
}
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { sync.RWMutex Listen string `yaml:"listen"` Logger []zapwriter.Config `yaml:"logger"` DatabaseType string `yaml:"database_type"` DatabaseURL string `yaml:"database_url"` DatabaseLogin string `yaml:"database_login"` DatabasePassword string `yaml:"database_password"` AdminUsername string `yaml:"admin_username"` PollingInterval time.Duration `yaml:"polling_interval"` Endpoints map[string]NotificationConfig `yaml:"endpoints"` DB *sql.DB `yaml:"-"` Senders map[string]NotificationEndpoints `yaml:"-"` FeedsConfig []*FeedsConfig `yaml:"-"` CurrentId int `yaml:"-"` ProcessingFeeds map[string]bool `yaml:"-"` }
func (*Configuration) GetDB ¶
func (c *Configuration) GetDB() *sql.DB
type FeedsConfig ¶
type FeedsConfig struct { Repo string Filters []FiltersConfig PollingInterval time.Duration Notifications []string }
type FiltersConfig ¶
type NotificationConfig ¶
type NotificationEndpoints ¶
Click to show internal directories.
Click to hide internal directories.