Documentation
¶
Index ¶
- type Container
- func (c *Container) AdapterStatusDao() dao.AdapterStatusDao
- func (c *Container) AdapterStatusService() services.AdapterStatusService
- func (c *Container) Close()
- func (c *Container) GenericDao() dao.GenericDao
- func (c *Container) GenericService() services.GenericService
- func (c *Container) JWTHandler() (*auth.JWTHandler, error)
- func (c *Container) ResourceConditionDao() dao.ResourceConditionDao
- func (c *Container) ResourceDao() dao.ResourceDao
- func (c *Container) ResourceLabelDao() dao.ResourceLabelDao
- func (c *Container) ResourceService() services.ResourceService
- func (c *Container) SchemaValidator() (*validators.SchemaValidator, error)
- func (c *Container) SessionFactory() db.SessionFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container lazily constructs and caches application dependencies during sequential startup. It is not safe for concurrent initialization.
Container owns dependencies only. Assembling them into a running API server is the composition root's job - see BuildAPIServer in the servecmd package.
TODO(HYPERFLEET-1371): Once the environments/ package is removed, Container should source SessionFactory directly (e.g. from config/Viper) rather than accepting it as a constructor parameter. Close() should also close the SessionFactory at that point.
func NewContainer ¶
func NewContainer(cfg *config.ApplicationConfig, sessionFactory db.SessionFactory) *Container
func (*Container) AdapterStatusDao ¶
func (c *Container) AdapterStatusDao() dao.AdapterStatusDao
func (*Container) AdapterStatusService ¶
func (c *Container) AdapterStatusService() services.AdapterStatusService
func (*Container) GenericDao ¶
func (c *Container) GenericDao() dao.GenericDao
func (*Container) GenericService ¶
func (c *Container) GenericService() services.GenericService
func (*Container) JWTHandler ¶
func (c *Container) JWTHandler() (*auth.JWTHandler, error)
func (*Container) ResourceConditionDao ¶
func (c *Container) ResourceConditionDao() dao.ResourceConditionDao
func (*Container) ResourceDao ¶
func (c *Container) ResourceDao() dao.ResourceDao
func (*Container) ResourceLabelDao ¶
func (c *Container) ResourceLabelDao() dao.ResourceLabelDao
func (*Container) ResourceService ¶
func (c *Container) ResourceService() services.ResourceService
func (*Container) SchemaValidator ¶
func (c *Container) SchemaValidator() (*validators.SchemaValidator, error)
func (*Container) SessionFactory ¶
func (c *Container) SessionFactory() db.SessionFactory
Click to show internal directories.
Click to hide internal directories.