module

package
v0.0.0-...-3ac8fd0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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) (*data.Module, 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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