config

package
v0.2.30 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundConfig = errors.New("NotFound Config")
)
View Source
var (
	YamlConfigPath = configFilePath("config.yml")
)

Functions

func IsFileExist

func IsFileExist(fPath string) bool

Types

type Config

type Config struct {
	LowercaseKeywords bool                 `json:"lowercaseKeywords" yaml:"lowercaseKeywords"`
	Connections       []*database.DBConfig `json:"connections" yaml:"connections"`
}

func GetConfig

func GetConfig(fp string) (*Config, error)

func GetDefaultConfig

func GetDefaultConfig() (*Config, error)

func NewConfig

func NewConfig() *Config

func (*Config) Load

func (c *Config) Load(fp string) error

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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