config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// EnvConfFile is environment variable containing the config file path.
	EnvConfFile string
	// DefaultConfigPath is default path for config file used when EnvConfFile is not set.
	DefaultConfigPath string
)

Functions

func GetLogDir

func GetLogDir() string

GetLogDir provides location for storing logs.

func GetLogFile

func GetLogFile() string

GetLogFile provides name of logfile.

func GetLogLevel added in v1.0.4

func GetLogLevel() string

GetLogLevel provides name of loglevel.

func GetPMLogDir

func GetPMLogDir() string

GetPMLogDir provides location for storing Plugin Manager logs.

NOTE: The plugin logs would be stored "plugins" directory under the
same path, and use GetPluginsLogDir() to get that path.

func GetPMLogFile

func GetPMLogFile() string

GetPMLogFile gets the file for storing Plugin Manager logs.

func GetPluginsLibrary

func GetPluginsLibrary() string

GetPluginsLibrary gets location of plugins library.

func GetPluginsLogDir

func GetPluginsLogDir() string

GetPluginsLogDir provides location for storing individual plugins execution logs.

func Load

func Load() error

Load config information

func SetLogDir

func SetLogDir(logDir string)

SetLogDir sets the location for storing Plugin Manager logs.

Use GetPMLogDir() to obtain this location from config.
NOTE: The plugin logs would be stored "plugins" directory under the
same path, and use GetPluginsLogDir() to get that path.

func SetLogFile

func SetLogFile(logFile string)

SetLogFile sets the log file to use.

Use GetLogDir() to obtain this location from config.
NOTE: The plugin logs would be stored "plugins" directory under the
same path, and use Get/SetPluginsLogDir() to get/set that path.

func SetLogLevel added in v1.0.4

func SetLogLevel(logLevel string)

SetLogLevel sets the log level.

func SetPMLogDir

func SetPMLogDir(logDir string)

SetPMLogDir sets the location for storing Plugin Manager logs.

Use GetPMLogDir() to obtain this location from config.
NOTE: The plugin logs would be stored "plugins" directory under the
same path, and use GetPluginsLogDir() to get that path.

func SetPMLogFile

func SetPMLogFile(logfile string)

SetPMLogFile sets the file for storing Plugin Manager logs.

func SetPluginsLibrary

func SetPluginsLibrary(library string)

SetPluginsLibrary sets the plugins library location.

Types

type Config

type Config struct {
	// PluginManager configuration information.
	PluginManager struct {
		// Library is the path where plugin directories containing plugin files are present.
		Library  string `yaml:"library"`
		LogDir   string `yaml:"log dir"`
		LogFile  string `yaml:"log file"`
		LogLevel string `yaml:"log level"`
	}
}

Config is Plugin Manager's configuration information.

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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