config

package
v0.0.0-...-12f948b Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_ENABLED bool = true
View Source
const DEFAULT_ENABLED_STRING string = "true"
View Source
const DEFAULT_SCRAPE_FILE_PATH string = "/tmp/scrape_torrent_ano"
View Source
const DEFAULT_SCRAPE_URL string = "http://127.0.0.1:7662/scrape"
View Source
const DefaultFeedsDir = "feeds.d"
View Source
const DefaultFeedsFile = "feeds.ini"
View Source
const DefaultFeedsJobs = 4
View Source
const DefaultFeedsProxyURL = "http://127.0.0.1:8118/"
View Source
const DefaultSiteName = "TORRENTS.LIVINGSTONE.I2P"
View Source
const DefaultTrackerURL = "http://tracker.livingstone.i2p/a"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB     DBConfig
	Index  IndexConfig
	Log    LogConfig
	Feeds  FeedsConfig
	Scrape ScrapeConfig
}

func (*Config) Load

func (cfg *Config) Load(fname string) error

type DBConfig

type DBConfig struct {
	Type string
	URL  string
}

func (*DBConfig) Load

func (cfg *DBConfig) Load(s *parser.Section) error

type FeedConfig

type FeedConfig struct {
	Name       string
	URL        string
	CategoryID uint64
}

type FeedsConfig

type FeedsConfig struct {
	Directory string
	File      string
	ProxyURL  *url.URL
	Jobs      int
	Feeds     []FeedConfig
	Enabled   bool
}

func (*FeedsConfig) Load

func (cfg *FeedsConfig) Load(s *parser.Section) (err error)

type IndexConfig

type IndexConfig struct {
	CaptchaWidth  int
	CaptchaHeight int
	TrackerURL    *url.URL
	Addr          string
	TemplateDir   string
	StaticDir     string
	TorrentsDir   string
	SiteName      string
}

func (*IndexConfig) Load

func (cfg *IndexConfig) Load(s *parser.Section) (err error)

type LogConfig

type LogConfig struct {
	Level string
}

func (*LogConfig) Load

func (cfg *LogConfig) Load(s *parser.Section) (err error)

type NNTPConfig

type NNTPConfig struct {
	Addr    string
	Enabled bool
}

func (*NNTPConfig) Load

func (cfg *NNTPConfig) Load(s *parser.Section) (err error)

type ScrapeConfig

type ScrapeConfig struct {
	URL       string
	Enabled   bool
	File_path string
}

func (*ScrapeConfig) Load

func (cfg *ScrapeConfig) Load(s *parser.Section) (err error)

Directories

Path Synopsis
Package configparser provides a simple parser for reading/writing configuration (INI) files.
Package configparser provides a simple parser for reading/writing configuration (INI) files.

Jump to

Keyboard shortcuts

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