config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2021 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
	// DefaultLogPath is default path for log file.
	DefaultLogPath string
)

Functions

func GetLogDir

func GetLogDir() string

GetLogDir provides location for storing logs.

func GetLogFile

func GetLogFile() string

GetLogFile provides name of logfile.

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 GetPluginsDir

func GetPluginsDir() string

GetPluginsDir gets location of plugins directory.

NOTE: This is deprecated, Use GetPluginsLibrary() instead.

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 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 SetPluginsDir

func SetPluginsDir(library string)

SetPluginsDir sets location of plugins directory.

NOTE: This is deprecated, Use SetPluginsLibrary() instead.

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"`
		// PluginDir is deprecated. Use Library instead.
		PluginDir string `yaml:"plugin dir"`
	}
}

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