env

package
v0.32.1 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: 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

Package env provides a middleware handling 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