external

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJSON

func DecodeJSON(reader io.Reader) (map[string]string, error)

DecodeJSON implements a Decode function for decoding values from JSON.

func DecodeYAML

func DecodeYAML(reader io.ReadCloser) (map[string]string, error)

DecodeYAML implements a Decode function for decoding values from YAML.

func EncodeJSON

func EncodeJSON(variables []repositories.Variable, writer io.Writer) error

EncodeJSON implements an Encode function for encoding variables to JSON.

func EncodeYAML

func EncodeYAML(variables []repositories.Variable, writer io.Writer) error

EncodeYAML implements an Encode function for encoding variables to YAML.

Types

type Decode

type Decode func(io.Reader) (map[string]string, error)

Decode provides a function interface for decoding variable maps from an io.Reader.

type Encode

type Encode func([]repositories.Variable, io.Writer) error

Encode provides a function interface for encoding variable slices to an io.Writer.

type Resolver

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

Resolver implements a variable resolver that resolves using an external mechanism. The resolver works by encoding the variables requiring resolution and writing those to an io.Writer then reading and decoding the resolved variables from an io.Reader.

func NewResolver

func NewResolver(decode Decode, encode Encode, reader io.Reader, writer io.Writer) *Resolver

NewResolver returns a new instance of an Resolver.

func (*Resolver) Resolve

func (r *Resolver) Resolve(variables []repositories.Variable) (map[string]string, error)

Resolve resolves variables.

Jump to

Keyboard shortcuts

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