Documentation
¶
Index ¶
- Variables
- func ExtractDependencies(env componego.Environment) ([]componego.Dependency, error)
- func Get[T any](env componego.Environment) (T, error)
- func GetOrPanic[T any](env componego.Environment) T
- func Invoke[T any](fn any, env componego.Environment) (T, error)
- func InvokeOrPanic[T any](fn any, env componego.Environment) T
- func NewManager() (componego.DependencyInvoker, func(container.Container) error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDependencyManager = xerrors.New("error inside dependency manager", "E0510") ErrExtractDependencies = ErrDependencyManager.WithMessage("an error occurred while receiving dependencies", "E0511") ErrNilArgument = ErrDependencyManager.WithMessage("nil argument", "E0512") ErrNotFunction = ErrDependencyManager.WithMessage("argument is not a function and cannot be used as a constructor for dependency injection", "E0513") ErrVariadicFunction = ErrDependencyManager.WithMessage("function has a variable number of arguments and cannot be used as a constructor for dependency injection", "E0514") ErrNotAllowedTarget = ErrDependencyManager.WithMessage("target is not allowed for dependency injection", "E0515") )
Functions ¶
func ExtractDependencies ¶
func ExtractDependencies(env componego.Environment) ([]componego.Dependency, error)
ExtractDependencies returns a list of dependencies from the application and components. This is a raw list without any transformations.
func GetOrPanic ¶
func GetOrPanic[T any](env componego.Environment) T
func InvokeOrPanic ¶
func InvokeOrPanic[T any](fn any, env componego.Environment) T
func NewManager ¶
func NewManager() (componego.DependencyInvoker, func(container.Container) error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.