Documentation ¶
Index ¶
- Constants
- func CheckModuleOptions(options dto.ModuleConfig) error
- func CloneModule(module dto.ModuleConfig) (repo *git.Repository, err error)
- func LoadModule(module dto.ModuleConfig, inputs map[string]string) (*dto.Module, error)
- func PrepareModule(module dto.ModuleConfig) (string, error)
- func ProcessModule(module dto.ModuleConfig) (dto.ModuleConfig, error)
Constants ¶
View Source
const REPO_DIR = "repos"
Variables ¶
This section is empty.
Functions ¶
func CheckModuleOptions ¶
func CheckModuleOptions(options dto.ModuleConfig) error
func CloneModule ¶
func CloneModule(module dto.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 ¶
- 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 dto.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 dto.ModuleConfig) (dto.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.