driver

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyContext = &context{}
View Source
var ErrDriverFnNotFound = errors.New("driver function not found")

Functions

This section is empty.

Types

type Context added in v0.1.1

type Context interface {
	Variables() map[string]interface{}
	References() map[string]interface{} // retro-compatibility with v0.1.2
}

func NewContext added in v0.1.1

func NewContext(vars map[string]interface{}) Context

type Driver

type Driver interface {
	Lookup(...string) (DriverFn, error)
	SetDryRun(bool)
	SetLogger(*logger.Logger)
}

func NewMultiDriver

func NewMultiDriver(drivers ...Driver) Driver

type DriverFn

type DriverFn func(Context, map[string]interface{}) (interface{}, error)

type MultiDriver

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

func (*MultiDriver) Lookup

func (d *MultiDriver) Lookup(lookups ...string) (driverFn DriverFn, err error)

func (*MultiDriver) SetDryRun

func (d *MultiDriver) SetDryRun(dry bool)

func (*MultiDriver) SetLogger

func (d *MultiDriver) SetLogger(l *logger.Logger)

Jump to

Keyboard shortcuts

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