Documentation
¶
Index ¶
- type Application
- func (a *Application) BindPathsInContainer(path inter.BasePath)
- func (a *Application) BindStruct(abstract interface{}) interface{}
- func (a *Application) Container() *inter.Container
- func (a *Application) Environment() (string, error)
- func (a *Application) Instance(abstract interface{}, concrete interface{}) interface{}
- func (a *Application) IsEnvironment(environments ...string) bool
- func (a *Application) Make(abstract interface{}) interface{}
- func (a *Application) SetContainer(container inter.Container)
- func (a *Application) Singleton(abstract interface{}, concrete interface{})
- type Container
- func (c *Container) Bind(abstract interface{}, concrete interface{})
- func (c *Container) BindStruct(concrete interface{}) interface{}
- func (c *Container) Bindings() inter.Bindings
- func (c *Container) Bound(abstract string) bool
- func (c Container) Copy() inter.Container
- func (c *Container) Extend(abstract interface{}, function func(service interface{}) interface{})
- func (c *Container) Instance(abstract interface{}, concrete interface{}) interface{}
- func (c *Container) IsAlias(name string) bool
- 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 {
// contains filtered or unexported fields
}
func NewApp ¶
func NewApp() *Application
func (*Application) BindPathsInContainer ¶
func (a *Application) BindPathsInContainer(path inter.BasePath)
Bind all of the application paths in the container.
func (*Application) BindStruct ¶
func (a *Application) BindStruct(abstract interface{}) interface{}
func (*Application) Container ¶
func (a *Application) Container() *inter.Container
Get the service container
func (*Application) Environment ¶
func (a *Application) Environment() (string, error)
func (*Application) Instance ¶
func (a *Application) Instance(abstract interface{}, concrete interface{}) interface{}
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 inter.Container)
Set the service container
func (*Application) Singleton ¶
func (a *Application) Singleton(abstract interface{}, concrete interface{})
Register a shared binding in the 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) BindStruct ¶
func (c *Container) BindStruct(concrete interface{}) interface{}
Register an existing instance as shared in the container without an abstract
func (*Container) Extend ¶
func (c *Container) Extend(abstract interface{}, function func(service interface{}) interface{})
"Extend" an abstract type in the container.
func (*Container) Instance ¶
func (c *Container) Instance(abstract interface{}, concrete interface{}) interface{}
Register an existing instance as shared in the container.
Click to show internal directories.
Click to hide internal directories.