Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container is a dependency injection container.
func (*Container) Compile ¶
func (c *Container) Compile()
Compile compiles the container. It iterates over all nodes in graph and register their parameters.
func (*Container) Provide ¶
func (c *Container) Provide(params ProvideParams)
Provide adds constructor into container with parameters.
type ProvideParams ¶
type ProvideParams struct {
Name string
Provider interface{}
Interfaces []interface{}
Parameters ParameterBag
IsPrototype bool
}
ProvideParams is a `Provide()` method options. Name is a unique identifier of type instance. Provider is a constructor function. Interfaces is a interface that implements a provider result type.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.