Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
Application interface used to define the methods of a gapp application.
func NewApplication ¶
func NewApplication() Application
NewApplication used to instantiate a new application.
type Closable ¶
type Closable interface {
Close()
}
Closable is the interface used to signal the container that the element must be closed on removal.
type Container ¶
type Container interface {
Close()
Has(id string) bool
Add(id string, factory ContainerFactory, tags []string) error
Remove(id string)
Get(id string) (interface{}, error)
Tagged(tag string) ([]interface{}, error)
}
Container is an interface for an object used to lazy load and store instances of registered objects. This is achieved by the registration of factory functions that will instantiate the instances as needed.
type ContainerFactory ¶
ContainerFactory is a callback function used to instantiate an object used by the application container when a not yet instantiated object is requested.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.