This commit is contained in:
2019-12-22 01:17:18 +05:00
parent da4bc379d8
commit a52b18ffe4
31 changed files with 202 additions and 82 deletions

View File

@@ -24,8 +24,8 @@
package config
// ConfigDatabase describes database configuration.
type ConfigDatabase struct {
// Database describes database configuration.
type Database struct {
Type string `yaml:"type"`
Path string `yaml:"path"`
Address string `yaml:"address"`

View File

@@ -24,8 +24,8 @@
package config
// ConfigHTTP describes HTTP server configuration.
type ConfigHTTP struct {
// HTTP describes HTTP server configuration.
type HTTP struct {
Address string `yaml:"address"`
Port string `yaml:"port"`
AllowInsecure bool `yaml:"allow_insecure"`

View File

@@ -24,8 +24,8 @@
package config
// ConfigLogging describes logger configuration.
type ConfigLogging struct {
// Logging describes logger configuration.
type Logging struct {
LogToFile bool `yaml:"log_to_file"`
FileName string `yaml:"filename"`
LogLevel string `yaml:"loglevel"`

View File

@@ -24,7 +24,7 @@
package config
// ConfigPastes describes pastes subsystem configuration.
type ConfigPastes struct {
// Pastes describes pastes subsystem configuration.
type Pastes struct {
Pagination int `yaml:"pagination"`
}

View File

@@ -24,10 +24,10 @@
package config
// ConfigStruct describes whole configuration.
type ConfigStruct struct {
Database ConfigDatabase `yaml:"database"`
Logging ConfigLogging `yaml:"logging"`
HTTP ConfigHTTP `yaml:"http"`
Pastes ConfigPastes `yaml:"pastes"`
// Struct describes whole configuration.
type Struct struct {
Database Database `yaml:"database"`
Logging Logging `yaml:"logging"`
HTTP HTTP `yaml:"http"`
Pastes Pastes `yaml:"pastes"`
}