dependencies

package
v0.46.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const InterpreterDepsKey = "interpreter"

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Deps Deps
}

Dependencies implements the Interface. Any deps which are nil will produce an explicit error.

func NewDefaults

func NewDefaults() Dependencies

NewDefaults produces a set of dependencies. Not all dependencies have valid defaults and will not be set.

func (Dependencies) FilesystemService added in v0.46.1

func (d Dependencies) FilesystemService() (filesystem.Service, error)

func (Dependencies) HTTPClient

func (d Dependencies) HTTPClient() (*http.Client, error)

func (Dependencies) SecretService

func (d Dependencies) SecretService() (secret.Service, error)

func (Dependencies) URLValidator

func (d Dependencies) URLValidator() (url.Validator, error)

type Deps

type Deps struct {
	HTTPClient        *http.Client
	FilesystemService filesystem.Service
	SecretService     secret.Service
	URLValidator      url.Validator
}

type Interface

type Interface interface {
	HTTPClient() (*http.Client, error)
	FilesystemService() (filesystem.Service, error)
	SecretService() (secret.Service, error)
	URLValidator() (url.Validator, error)
}

func NewEmpty

func NewEmpty() Interface

NewEmpty produces an empty set of dependencies. Accessing any dependency will result in an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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