projectconfig

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GraphRootName = "graphRoot"

GraphRootName represents the root of the graph of modules in a project

Variables

View Source
var RootDir = "./"

Functions

func CreateProjectConfigFile

func CreateProjectConfigFile(dir string, projectName string, projectContext *ZeroProjectConfig) error

CreateProjectConfigFile extracts the required content for zero project config file then write to disk.

func SetRootDir

func SetRootDir(dir string)

Types

type Condition

type Condition struct {
	Action     string   `yaml:"action"`
	MatchField string   `yaml:"matchField"`
	WhenValue  string   `yaml:"whenValue"`
	Data       []string `yaml:"data,omitempty"`
}

type Files

type Files struct {
	Directory  string `yaml:"dir,omitempty"`
	Repository string `yaml:"repo,omitempty"`
	Source     string
}

type Module

type Module struct {
	DependsOn  []string   `yaml:"dependsOn,omitempty"`
	Parameters Parameters `yaml:"parameters,omitempty"`
	Files      Files
	Conditions []Condition `yaml:"conditions,omitempty"`
}

func NewModule

func NewModule(parameters Parameters, directory string, repository string, source string, dependsOn []string, conditions []Condition) Module

type Modules

type Modules map[string]Module

type Parameters

type Parameters map[string]string

type ZeroProjectConfig

type ZeroProjectConfig struct {
	Name                   string `yaml:"name"`
	ShouldPushRepositories bool   `yaml:"shouldPushRepositories"`
	Parameters             map[string]string
	Modules                Modules `yaml:"modules"`
}

func LoadConfig

func LoadConfig(filePath string) *ZeroProjectConfig

func (*ZeroProjectConfig) GetDAG

func (c *ZeroProjectConfig) GetDAG() dag.AcyclicGraph

GetDAG returns a graph of the module names used in this project config

func (*ZeroProjectConfig) Print

func (c *ZeroProjectConfig) Print()

Jump to

Keyboard shortcuts

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