Documentation ¶
Overview ¶
Package profile is used to read the various non-default murex user profiles and modules
Index ¶
Constants ¶
const ( // DisabledFile is an array of disabled modules DisabledFile = "disabled.json" // PackagesFile is used by the package manager, `murex-package`, but we auto-create // it here for consistency PackagesFile = "packages.json" // IgnoredExt is an file extension which can be used on package directories // to have them ignored during start up IgnoredExt = ".ignore" )
const ( // PreloadEnvVar environmental variable name for the preload profile override path. It's stored as a constant so typos are caught by the compiler PreloadEnvVar = "MUREX_PRELOAD" // ModuleEnvVar environmental variable name for the module override path. It's stored as a constant so typos are caught by the compiler ModuleEnvVar = "MUREX_MODULES" // ProfileEnvVar environmental variable name for the profile override path. It's stored as a constant so typos are caught by the compiler ProfileEnvVar = "MUREX_PROFILE" )
const ( F_PRELOAD = 1 << iota F_MODULES F_PROFILE )
Variables ¶
var ( // Packages is a struct of all the modules Packages = make(map[string][]Module) )
Functions ¶
func Execute ¶
func Execute(flags int)
Execute runs the preload script, then murex modules followed by your murex profile
func ModulePath ¶
func ModulePath() string
ModulePath returns the install path of the murex modules / packages
Types ¶
type Dependencies ¶
type Dependencies struct { Optional []string Required []string Platform []string MurexVersion string }
Dependencies is a list of executables required by the module plus a list of OSs the module is expected to work against
type Module ¶
type Module struct { Name string Summary string Version string Source string Package string Disabled bool Loaded bool Dependencies Dependencies }
Module is the structure for each module within a module's directory. Each directory can have multiple modules - this is done so you can separate functionality into different logical modules but still keep them inside one git repository (or other source control). However I expect the typical usage would be one module per repository.
This structure is loaded from module.json file located inside the root of the package.
func LoadPackage ¶
LoadPackage reads in the contents of the package and then validates and sources each module within. The path value should be an absolute path.
type Package ¶
type Package struct { Name string Version string Dependencies Dependencies }
Package is some basic details about the package itself as seen in the package.json file located at the rood directory inside the package itself