dependencies

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: MIT Imports: 7 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) 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
	SecretService secret.Service
	URLValidator  url.Validator
}

type Interface

type Interface interface {
	HTTPClient() (*http.Client, 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