templating

package
v0.1.136 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Inspired by similar approach in: https://github.com/helm/helm (Apache 2.0 License).

Inspired by similar approach in: https://github.com/helm/helm (Apache 2.0 License).

Inspired by similar approach in: https://github.com/helm/helm (Apache 2.0 License).

Index

Constants

View Source
const (
	TemplateYAMLName    = "template.outblocks"
	TemplateProjectName = "template.outblocks.project"
	TemplateValuesName  = "template.outblocks.values"
	TemplateValuesJSON  = "template.outblocks.values.json"
	TemplateProjectJSON = "template.outblocks.project.json"
)

Variables

View Source
var ErrMissingMetadata = errors.New("template metadata (template.outblocks.yaml) missing")
View Source
var (
	TemplateTypes = []string{"project"}
)

Functions

This section is empty.

Types

type Installer

type Installer interface {
	Download() error
	CopyTo(dest string) error
}

func NewInstaller

func NewInstaller(source, version string) (Installer, error)

type LocalInstaller

type LocalInstaller struct {
	// contains filtered or unexported fields
}

func NewLocalInstaller

func NewLocalInstaller(source string) (*LocalInstaller, error)

func (*LocalInstaller) CopyTo

func (b *LocalInstaller) CopyTo(dest string) error

func (*LocalInstaller) Download

func (i *LocalInstaller) Download() error

type Template

type Template struct {
	Type          string   `json:"type"`
	TemplateFiles []string `json:"template_files"`

	Project *TemplateProject
	Values  *TemplateValues
	// contains filtered or unexported fields
}

func LoadTemplate

func LoadTemplate(dir string) (*Template, error)

func (*Template) HasProjectPrompt

func (t *Template) HasProjectPrompt() bool

func (*Template) HasValuesPrompt

func (t *Template) HasValuesPrompt() bool

func (*Template) ParseProjectTemplate

func (t *Template) ParseProjectTemplate(projectName string, input map[string]interface{}) error

func (*Template) ParseValuesTemplate

func (t *Template) ParseValuesTemplate(input map[string]interface{}) ([]byte, error)

func (*Template) Validate

func (t *Template) Validate() error

type TemplateProject

type TemplateProject struct {
	Plugins      []*config.Plugin              `json:"plugins"`
	Dependencies map[string]*config.Dependency `json:"dependencies"`
	DNS          []*config.DNS                 `json:"dns"`
	// contains filtered or unexported fields
}

type TemplateValues

type TemplateValues struct {
	Val map[string]interface{}
}

type VCSInstaller

type VCSInstaller struct {
	Repo    vcs.Repo
	Version string
	// contains filtered or unexported fields
}

func NewVCSInstaller

func NewVCSInstaller(source, version string) (*VCSInstaller, error)

func (*VCSInstaller) CopyTo

func (b *VCSInstaller) CopyTo(dest string) error

func (*VCSInstaller) Download

func (i *VCSInstaller) Download() error

Jump to

Keyboard shortcuts

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