Documentation
¶
Index ¶
- type Application
- func (a *Application) BindPathsInContainer(path inter.BasePath)
- func (a *Application) Container() *Container
- func (a *Application) Environment() (string, error)
- func (a *Application) IsEnvironment(environments ...string) bool
- func (a Application) Make(abstract interface{}) interface{}
- func (a *Application) SetContainer(container *Container)
- 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) Extend(abstract interface{}, function func(service interface{}) interface{})
- 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 {
// Indicates if the application has been bootstrapped before.
HasBeenBootstrapped bool
// contains filtered or unexported fields
}
func (*Application) BindPathsInContainer ¶
func (a *Application) BindPathsInContainer(path inter.BasePath)
Bind all of the application paths in the container.
func (*Application) Container ¶
func (a *Application) Container() *Container
Get the service container
func (*Application) Environment ¶
func (a *Application) Environment() (string, error)
func (*Application) IsEnvironment ¶
func (a *Application) IsEnvironment(environments ...string) bool
func (Application) Make ¶
func (a Application) Make(abstract interface{}) interface{}
Resolve the given type from the container.
func (*Application) SetContainer ¶
func (a *Application) SetContainer(container *Container)
Set the service container
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) Extend ¶
func (c *Container) Extend(abstract interface{}, function func(service interface{}) interface{})
"Extend" an abstract type in 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.