module

package
v0.0.0-pr75 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 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 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

func LoadModule(module dto.ModuleConfig, inputs map[string]string) (*dto.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 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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