config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaults

func SetDefaults()

Types

type DatabaseConfig

type DatabaseConfig struct {
	AutoMigrate bool
	Database    string
	Driver      string
	Host        string
	Limit       uint32
	Password    string
	Path        string
	Port        int
	Username    string
	SSL         string
}

func GetDatabaseFromGlobalConfig

func GetDatabaseFromGlobalConfig() *DatabaseConfig

type DirectoryConfig

type DirectoryConfig struct {
	Input          string `mapstructure:"input"`
	Output         string `mapstructure:"output"`
	Type           string `mapstructure:"type"`
	DeleteOriginal bool   `mapstructure:"deleteOriginal"`
}

func GetDirectoriesFromGlobalConfig

func GetDirectoriesFromGlobalConfig() []DirectoryConfig

type GlobalConfig

type GlobalConfig struct {
	Database *DatabaseConfig
	Logging  *LoggingConfig
	Parser   *ParserConfig
}

func GetGlobalConfig

func GetGlobalConfig() *GlobalConfig

type LoggingConfig

type LoggingConfig struct {
	Compress bool
	Level    string
	MaxAge   uint32
	MaxSize  uint32
	Name     string
	Path     string
}

func GetLoggerFromGlobalConfig

func GetLoggerFromGlobalConfig() *LoggingConfig

type ParserConfig

type ParserConfig struct {
	Directories   []DirectoryConfig `mapstructure:"directories"`
	ParseInterval int
}

func GetParserFromGlobalConfig

func GetParserFromGlobalConfig() *ParserConfig

Jump to

Keyboard shortcuts

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