config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewViper

func NewViper() *viper.Viper

func ReadConfig

func ReadConfig(v *viper.Viper, configPath string) error

func Validate

func Validate(c *Config) error

Types

type Config

type Config struct {
	Verbose   bool           `json:"verbose" mapstructure:"verbose"`
	Format    string         `json:"format" mapstructure:"format"`
	Timeout   time.Duration  `json:"timeout" mapstructure:"timeout"`
	Workers   int            `json:"workers" mapstructure:"workers"`
	NoColor   bool           `json:"no_color" mapstructure:"no_color"`
	Providers ProviderConfig `json:"providers" mapstructure:"providers"`
}

func Default

func Default() *Config

func Load

func Load(v *viper.Viper) (*Config, error)

type ProviderConfig

type ProviderConfig struct {
	Abuse  []string `json:"abuse" mapstructure:"abuse"`
	Purity []string `json:"purity" mapstructure:"purity"`
}

Jump to

Keyboard shortcuts

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