cfg

package
v0.1.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleUrlConfig

type ArticleUrlConfig struct {
	Referer string   `yaml:"referer"`
	RealmId []string `yaml:"realmId"`
	Spec    int      `yaml:"spec"`
}

func (*ArticleUrlConfig) Clone

type Config

type Config struct {
	Server             ServerConfig              `yaml:"server"`
	Database           DatabaseConfig            `yaml:"database"`
	ProxyServer        ProxyServerConfig         `yaml:"proxyServer"`
	Observers          map[string]ObserverConfig `yaml:"observers"`
	ArticlesRequestUrl string                    `yaml:"articlesRequestUrl"`
	ArticleUrl         []ArticleUrlConfig        `yaml:"articleUrl"`
	Logger             LoggerConfig              `yaml:"logger"`
}
var GlobalConfig *Config

type DatabaseConfig

type DatabaseConfig struct {
	Host         string `yaml:"host"`
	Port         int    `yaml:"port"`
	UserName     string `yaml:"username"`
	Password     string `yaml:"password"`
	DbName       string `yaml:"dbname"`
	ReservedConn int    `yaml:"reservedConn"`
}

type LoggerConfig

type LoggerConfig struct {
	Level      string `yaml:"level"`
	OnSave     bool   `yaml:"onSave"`
	Path       string `yaml:"path"`
	MaxSize    int    `yaml:"maxSize"`
	MaxBackups int    `yaml:"maxBackups"`
	MaxAge     int    `yaml:"maxAge"`
}

type ObserverConfig

type ObserverConfig struct {
	Prefix                  string `yaml:"prefix"`
	Spec                    int    `yaml:"spec"`
	PerArticleMinDelay      int    `yaml:"perArticleMinDelay"`
	PerArticleMaxDelay      int    `yaml:"perArticleMaxDelay"`
	PerCommentsPageMinDelay int    `yaml:"perCommentsPageMinDelay"`
	PerCommentsPageMaxDelay int    `yaml:"perCommentsPageMaxDelay"`
	IdleTime                int    `yaml:"idleTime"`
	RetryCount              int    `yaml:"retryCount"`
	RetryInterval           int    `yaml:"retryInterval"`
}

type ProxyServerConfig

type ProxyServerConfig struct {
	Port        int    `yaml:"port"`
	Host        string `yaml:"host"`
	CustomProxy string `yaml:"customProxy"`
}

type ServerConfig

type ServerConfig struct {
	Port int    `yaml:"port"`
	Host string `yaml:"host"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL