Documentation ¶
Index ¶
- Constants
- func CheckModuleOptions(options data.ModuleConfig) error
- func CloneModule(module data.ModuleConfig) (repo *git.Repository, err error)
- func LoadModule(module data.ModuleConfig, inputs map[string]string) (moduleData *data.Module, err error)
- func PrepareModule(module data.ModuleConfig) (string, error)
- func ProcessModule(module data.ModuleConfig) (data.ModuleConfig, error)
Constants ¶
View Source
const REPO_DIR = "repos"
Variables ¶
This section is empty.
Functions ¶
func CheckModuleOptions ¶
func CheckModuleOptions(options data.ModuleConfig) error
func CloneModule ¶
func CloneModule(module data.ModuleConfig) (repo *git.Repository, err error)
clone the given repo and return the full local path to the repo TODO: check if we have the repo already cloned handle fetching new changes perhaps the commit hash is not the latest at the moment we will do the slow thing and clone the repo every time
func LoadModule ¶
func LoadModule(module data.ModuleConfig, inputs map[string]string) (moduleData *data.Module, err error)
- prepare the module - now we have the text of the template - inject the given values using template syntax - JSON parse and check we don't have errors
func PrepareModule ¶
func PrepareModule(module data.ModuleConfig) (string, error)
PrepareModule get a module cloned and checked out then return the text content of the template
- process shortcuts
- check if we have the repo cloned
- checkout the correct hash
- check and read the file
func ProcessModule ¶
func ProcessModule(module data.ModuleConfig) (data.ModuleConfig, error)
given a module - check if it's a shortcut and if yes expand the shortcut into the other module props
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.