Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { // SetService new service definition SetService(id string, fact Factory, singleton bool) // SetSingleton adds new singleton service SetSingleton(id string, fact Factory) // SetFactory adds new non sigleton service factory SetFactory(id string, fact Factory) // SetValue adds non-service value SetValue(id string, val interface{}) // Get return service Get(id string) (interface{}, bool) // Service returns service, or panics if not defined Service(id string) interface{} // Raw returns raw service factory Raw(id string) (func(c Container) interface{}, bool) // Has returns if container has service definition Has(id string) bool // Del deletes service from the container Del(id string) }
Container is main DIC interface
Click to show internal directories.
Click to hide internal directories.