piperenv

package
v0.0.0-...-40d4f7c Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_END_DELIMITER = "}}"
View Source
const DEFAULT_START_DELIMITER = "{{"

Variables

This section is empty.

Functions

func GetParameter

func GetParameter(path, name string) string

GetParameter reads any parameter from the pipeline environment or another environment stored in the file system

func GetResourceParameter

func GetResourceParameter(path, resourceName, paramName string) string

GetResourceParameter reads a resource parameter from the environment stored in the file system

func SetParameter

func SetParameter(path, name, value string) error

SetParameter sets any parameter in the pipeline environment or another environment stored in the file system

func SetResourceParameter

func SetResourceParameter(path, resourceName, paramName string, value interface{}) error

SetResourceParameter sets a resource parameter in the environment stored in the file system

Types

type Artifact

type Artifact struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Artifacts

type Artifacts []Artifact

func (Artifacts) FindByName

func (a Artifacts) FindByName(name string) Artifacts

type CPEMap

type CPEMap map[string]interface{}

CPEMap represents the common pipeline environment map

func (*CPEMap) LoadFromDisk

func (c *CPEMap) LoadFromDisk(path string) error

LoadFromDisk reads the given path from disk and populates it to the CPEMap.

func (*CPEMap) ParseTemplate

func (c *CPEMap) ParseTemplate(cpeTemplate string) (*bytes.Buffer, error)

ParseTemplate allows to parse a template which contains references to the CPE Utility functions make it simple to access specific parts of the CPE

func (*CPEMap) ParseTemplateWithDelimiter

func (c *CPEMap) ParseTemplateWithDelimiter(cpeTemplate string, startDelimiter string, endDelimiter string) (*bytes.Buffer, error)

func (CPEMap) WriteToDisk

func (c CPEMap) WriteToDisk(rootDirectory string) error

WriteToDisk writes the CPEMap to a disk and uses rootDirectory as the starting point

Jump to

Keyboard shortcuts

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