env

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: GPL-2.0, GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

The `env` middleware manipulates environment variables

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvMiddleware

type EnvMiddleware struct {
	Setenv    func(string, string) error
	ExpandEnv func(string) string
}

func NewEnvMiddleware

func NewEnvMiddleware() EnvMiddleware

func NewEnvMiddlewareWithProvider

func NewEnvMiddlewareWithProvider(
	setenv func(string, string) error,
	expandEnv func(string) string,
) EnvMiddleware

func (EnvMiddleware) Apply

func (envMiddleware EnvMiddleware) Apply(
	run *pipeline.Run,
	next func(*pipeline.Run),
	_ *middleware.ExecutionContext,
)

func (EnvMiddleware) String

func (envMiddleware EnvMiddleware) String() string

type Interpolator

type Interpolator struct {
	Substitutions map[string]interface{}
	ExpandEnv     func(string) string
}

func NewInterpolator

func NewInterpolator(envMiddleware EnvMiddleware) *Interpolator

func (*Interpolator) ParseString

func (interpolator *Interpolator) ParseString(value string) interface{}

Jump to

Keyboard shortcuts

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