config

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogConfig    LogConfig              `yaml:"log"`
	DingTalk     DingTalkConfig         `yaml:"dingtalk"`
	Forums       map[string]ForumConfig `yaml:"forums"`
	ProxyPoolAPI string                 `yaml:"proxyPoolAPI"`
	Redis        RedisConfig            `yaml:"redis"`
}

func InitConfig

func InitConfig() (*Config, error)

type DingTalkConfig

type DingTalkConfig struct {
	Token  string `yaml:"token"`
	Secret string `yaml:"secret"`
}

type ForumConfig added in v1.1.9

type ForumConfig struct {
	Cookies       string              `yaml:"cookies"`
	UserKeywords  map[string][]string `yaml:"userKeywords"`
	WaitTimeRange struct {
		Min int `yaml:"min"`
		Max int `yaml:"max"`
	} `yaml:"waitTimeRange"`
}

type LogConfig

type LogConfig struct {
	File       string `yaml:"file"`
	MaxSize    int    `yaml:"maxSize"`
	MaxBackups int    `yaml:"maxBackups"`
	MaxAge     int    `yaml:"maxAge"`
	Compress   bool   `yaml:"compress"`
	Level      string `yaml:"level"`
}

type RedisConfig added in v1.3.1

type RedisConfig struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

Jump to

Keyboard shortcuts

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