Documentation
¶
Index ¶
- type Application
- type Container
- func (c *Container) Bind(abstract interface{}, concrete interface{})
- func (c *Container) Bound(abstract string) bool
- func (c Container) Copy() Container
- func (c Container) GetBindings() bindings
- func (c *Container) Instance(abstract interface{}, concrete interface{}) interface{}
- func (c *Container) IsAlias(name string) bool
- func (c *Container) JustBind(concrete interface{}) interface{}
- func (c *Container) Make(abstract interface{}) interface{}
- func (c *Container) Singleton(abstract interface{}, concrete interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// The service container
Container Container
// Indicates if the application has been bootstrapped before.
HasBeenBootstrapped bool
}
func (*Application) BindPathsInContainer ¶
func (a *Application) BindPathsInContainer()
Bind all of the application paths in the container.
func (Application) Make ¶
func (a Application) Make(abstract interface{}) interface{}
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
func NewContainer() Container
func (*Container) Bind ¶
func (c *Container) Bind(abstract interface{}, concrete interface{})
Register a binding with the container.
func (Container) GetBindings ¶ added in v0.1.0
func (c Container) GetBindings() bindings
Get the container's bindings.
func (*Container) Instance ¶
func (c *Container) Instance(abstract interface{}, concrete interface{}) interface{}
Register an existing instance as shared in the container.
func (*Container) JustBind ¶ added in v0.2.0
func (c *Container) JustBind(concrete interface{}) interface{}
Register an existing instance as shared in the container without an abstract
Click to show internal directories.
Click to hide internal directories.