Versions in this module Expand all Collapse all v4 v4.0.0 Jan 10, 2023 Changes in this version + var ErrFactoryTypeAlreadyExists = errors.New("a creator function for the type already exists") + var ErrFactoryTypeDoesNotExist = errors.New("factory type not found") + var ErrInvalidDependency = errors.New("creator function received invalid dependency") + var ErrMissingDependency = errors.New("creator function did not receive required dependency") + var ErrNilConfig = errors.New("factory config is nil") + func CallFactories(factoryCalls Calls) error + func ErrorWithContext(err error) error + func SetValue(out interface{}, value interface{}) error + func SetValueAndValidate(out interface{}, value interface{}) error + type Call struct + Config *Config + Dependencies Dependencies + Factory Factory + Out interface{} + type Calls []Call + type Config struct + Config ConfigValues + Type string + type ConfigValues map[string]interface + type Dependencies map[string]interface + func (d Dependencies) DeepCopy() (Dependencies, error) + func (d Dependencies) Get(key string, out interface{}) (err error) + func (d Dependencies) Set(key string, value interface{}) + func (d Dependencies) ToStruct(out interface{}) error + func NewDependencies() Dependencies + type Factory interface + New func(cfg *Config, dependencies Dependencies, out interface{}) error + Register func(objectType string, fn NewFunc) error + type NewFunc func(config interface{}, dependencies Dependencies, out interface{}) error