config

package
v0.0.0-...-9a26d06 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 2 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 {
	Crawler    *CrawlerConfig    `mapstructure:"crawler"`
	HTTPServer *HTTPServerConfig `mapstructure:"server"`
	DB         *DBConfig         `mapstructure:"database"`
}

Config stores the configuration for the application.

func NewConfig

func NewConfig(configFile string) (*Config, error)

NewConfig loads the configuration from the specified file and path.

type CrawlerConfig

type CrawlerConfig struct {
	Agent string `mapstructure:"agent"`
}

CrawlerConfig stores the configuration for the crawler.

type DBConfig

type DBConfig struct {
	Server string `mapstructure:"server"`
	Port   int    `mapstructure:"port"`
	User   string `mapstructure:"user"`
	Pass   string `mapstructure:"password"`
	Name   string `mapstructure:"database"`
}

DBConfig stores the configuration for the database store.

type HTTPServerConfig

type HTTPServerConfig struct {
	Server string `mapstructure:"host"`
	Port   int    `mapstructure:"port"`
	URL    string `mapstructure:"url"`
}

HTTPServerConfig stores the configuration for the HTTP server.

Jump to

Keyboard shortcuts

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