di

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMustReturnSomething   = fmt.Errorf("providers must return something")
	ErrMustNotReturnTuple    = fmt.Errorf("providers must not return tuples")
	ErrUnableToParseFuncBody = fmt.Errorf("provider function has no parsable body")
)
View Source
var (
	ErrMissingDependency  = fmt.Errorf("missing dependency detected")
	ErrCyclicalDependency = fmt.Errorf("circular dependency detected")
)
View Source
var ErrSourceIsInvalid = fmt.Errorf("source is invalid")
View Source
var (
	ErrUnableToParse = errors.New("unable to parse source")
)

Functions

func CyclicalError

func CyclicalError(first, second model.Identifier) error

CyclicalError is used to denote that there are cyclical dependencies within a module.

func MissingError

func MissingError(provider model.Provider, missing ...model.Identifier) error

MissingError is used to denote that there are dependencies which were requested, but not provided within a module.

Types

type Generator

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

func (*Generator) Generate

func (g *Generator) Generate(source, command string) ([]byte, error)

Jump to

Keyboard shortcuts

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