Documentation
¶
Index ¶
- type ConcreteFunc
- type Container
- func (c *Container) Bind(abstract string, concrete ConcreteFunc, shared bool)
- func (c *Container) Get(abstract string) (interface{}, error)
- func (c *Container) GetProviders() []provider.Provider
- func (c *Container) Instance(abstract string, concrete interface{})
- func (c *Container) Make(abstract string) (interface{}, error)
- func (c *Container) MustMake(abstract string) interface{}
- func (c *Container) Register(provider provider.Provider)
- func (c *Container) Singleton(abstract string, concrete ConcreteFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcreteFunc ¶
type ConcreteFunc func(*Container) interface{}
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func (*Container) Bind ¶
func (c *Container) Bind(abstract string, concrete ConcreteFunc, shared bool)
Bind Register a binding with the container.
func (*Container) GetProviders ¶
GetProviders returns all registered providers.
func (*Container) Singleton ¶
func (c *Container) Singleton(abstract string, concrete ConcreteFunc)
Singleton Register a shared binding in the container.
Click to show internal directories.
Click to hide internal directories.