Versions in this module Expand all Collapse all v1 v1.0.0 Oct 25, 2015 Changes in this version + func IsParameter(p string) bool + func IsParameterOrTypeReference(p string) bool + func IsTypeReference(p string) bool + func IsValid(t TypeFactory) bool + type Container struct + Config map[string]interface{} + Resolver *ParameterResolver + func NewContainer(registry TypeRegistry, config map[string]interface{}) *Container + func (c *Container) Get(typeID string) (interface{}, error) + func (c *Container) MustGet(typeID string) interface{} + type ParameterResolver struct + Container *Container + func NewParameterResolver(container *Container) *ParameterResolver + func (r *ParameterResolver) Resolve(parameter reflect.Value, expectedType reflect.Type) (reflect.Value, error) + type TypeConfigurator struct + ConfiguratorTypeID string + MethodName string + func NewTypeConfigurator(configuratorTypeID, methodName string) *TypeConfigurator + func (c *TypeConfigurator) Configure(thing interface{}, container *Container) error + type TypeFactory interface + Arguments func() []interface{} + Generate func(parameterResolver *ParameterResolver) (interface{}, error) + func NewAliasType(typeID string) TypeFactory + func NewConfiguredType(embeddedType TypeFactory, configuratorTypeID, configuratorMethod string) TypeFactory + func NewFuncReferenceType(typeID, functionName string) TypeFactory + func NewFuncType(function interface{}) TypeFactory + func NewInstanceType(instance interface{}) TypeFactory + func NewProxyType(typeID, functionName string, args ...interface{}) TypeFactory + func NewStructType(structT interface{}, structParameters ...interface{}) TypeFactory + func NewType(factoryFunction interface{}, factoryParameters ...interface{}) TypeFactory + type TypeID struct + FuncReferenceMethod string + ID string + IsFuncReference bool + IsOptional bool + Raw string + func NewTypeID(s string) *TypeID + func (t *TypeID) String() string + type TypeReferenceError struct + TypeID string + TypeInstance interface{} + type TypeRegistry map[string]TypeFactory + func NewTypeRegistry() TypeRegistry + func (r TypeRegistry) InjectInstance(typeID string, instance interface{}) + func (r TypeRegistry) Register(typeID string, typeDef TypeFactory) + func (r TypeRegistry) RegisterAll(factories map[string]TypeFactory) + func (r TypeRegistry) RegisterType(typeID string, factory interface{}, arguments ...interface{}) + type UnknownTypeReferenceError struct + TypeID string