Documentation ¶
Overview ¶
Description: This package provides a factory registry for creating instances of different structs. It also provides an interface for the factory registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactoryRegistryInterface ¶
type FactoryRegistryInterface interface { RegisterStruct(objectName string, newInstanceFunc func() interface{}) Instanciate(objectName string) (interface{}, error) }
FactoryRegistry is a registry for creating instances of different structs.
func NewFactoryRegistry ¶
func NewFactoryRegistry() FactoryRegistryInterface
NewFactoryRegistry creates a new factory registry and returns it as a FactoryRegistryInterface.
Click to show internal directories.
Click to hide internal directories.