extract

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToTemplateSection

func AppendToTemplateSection(
	interfaceTemplateSection *interface{},
	valueSection *map[string]map[string]map[string]string,
	secretSection *map[string]map[string]map[string]string,
	templatePathSlice []string,
	templateDir int,
	templateDepth int,
	isSecret bool,
	name ...string)

AppendToTemplateSection Add parse line to template section

func GetInitialTemplateStructure

func GetInitialTemplateStructure(driverConfig *eUtils.DriverConfig, templatePathSlice []string) ([]string, int, int)

GetInitialTemplateStructure Initializes the structure of the template section using the template directory path Input:

  • A slice of the template file path delimited by "/"

Output:

  • String(s) containing the structure of the template section

func Parse

func Parse(config *core.CoreConfig, cds *vcutils.ConfigDataStore,
	args []string,
	currentDir string,
	templatePathSlice []string,
	templateDir int,
	templateDepth int,
	service string,
	interfaceTemplateSection *interface{},
	valueSection *map[string]map[string]map[string]string,
	secretSection *map[string]map[string]map[string]string,
) error

Parse Parses a .tmpl file line into .yml file line(s) Input:

  • .tmlp file line
  • The current template directory

Output:

  • String(s) containing the .yml file subsections

func ToSeed

func ToSeed(driverConfig *eUtils.DriverConfig, mod *helperkv.Modifier,
	cds *vcutils.ConfigDataStore,
	templatePath string,
	project string,
	service string,
	templateFromVault bool,
	interfaceTemplateSection *interface{},
	valueSection *map[string]map[string]map[string]string,
	secretSection *map[string]map[string]map[string]string,
) (*interface{}, *map[string]map[string]map[string]string, *map[string]map[string]map[string]string, int, error)

ToSeed parses a <foo>.yml.tmpl file into a <foo>.yml file which then can be used for seeding vault Input:

  • Directory location of .tmpl file
  • Log file for logging support information

Output:

  • Parsed string containing the .yml file

Types

type TemplateResultData

type TemplateResultData struct {
	InterfaceTemplateSection interface{}
	ValueSection             map[string]map[string]map[string]string
	SecretSection            map[string]map[string]map[string]string
	TemplateDepth            int
	Env                      string
	SubSectionValue          string
	SectionPath              string // Where the data came from in vault
}

Jump to

Keyboard shortcuts

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