Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codegangsta/inject
/ functions
Functions
27 in github.com/codegangsta/inject
⨍
Functions
27
◇
Types & classes
8
↓ 26 callers
Function
expect
* Test Helpers */
inject_test.go:28
↓ 9 callers
Method
Get
Returns the Value that is mapped to the current type. Returns a zeroed Value if the Type has not been mapped.
inject.go:52
↓ 5 callers
Method
Map
Maps the interface{} value based on its immediate type from reflect.TypeOf.
inject.go:41
↓ 5 callers
Method
Set
Provides a possibility to directly insert a mapping based on type and value. This makes it possible to directly map type arguments not possible to ins
inject.go:49
↓ 4 callers
Method
MapTo
Maps the interface{} value based on the pointer of an Interface provided. This is really only useful for mapping a value as an interface, as interface
inject.go:45
↓ 2 callers
Method
Get
(t reflect.Type)
inject.go:158
↓ 2 callers
Method
Invoke
Invoke attempts to call the interface{} provided as a function, providing dependencies for function arguments based on Type. Returns a slice of reflec
inject.go:35
↓ 1 callers
Method
Apply
Maps dependencies in the Type map to each field in the struct that is tagged with 'inject'. Returns an error if the injection fails.
inject.go:26
↓ 1 callers
Function
InterfaceOf
InterfaceOf dereferences a pointer to an Interface type. It panics if value is not an pointer to an interface.
inject.go:62
↓ 1 callers
Method
SetParent
SetParent sets the parent of the injector. If the injector cannot find a dependency in its Type map it will check its parent before returning an error
inject.go:18
↓ 1 callers
Method
String
()
inject_test.go:23
↓ 1 callers
Function
refute
(t *testing.T, a interface{}, b interface{})
inject_test.go:34
Method
Apply
Maps dependencies in the Type map to each field in the struct that is tagged with 'inject'. Returns an error if the injection fails.
inject.go:108
Method
Invoke
Invoke attempts to call the interface{} provided as a function, providing dependencies for function arguments based on Type. Returns a slice of reflec
inject.go:88
Method
Map
Maps the concrete value of val to its dynamic type using reflect.TypeOf, It returns the TypeMapper registered in.
inject.go:141
Method
MapTo
(val interface{}, ifacePtr interface{})
inject.go:146
Function
New
New returns a new Injector.
inject.go:77
Method
Set
Maps the given reflect.Type to the given reflect.Value and returns the Typemapper the mapping has been registered in.
inject.go:153
Method
SetParent
(parent Injector)
inject.go:185
Function
TestInjectImplementors
(t *testing.T)
inject_test.go:153
Function
Test_InjectorApply
(t *testing.T)
inject_test.go:86
Function
Test_InjectorGet
(t *testing.T)
inject_test.go:134
Function
Test_InjectorInvoke
(t *testing.T)
inject_test.go:40
Function
Test_InjectorInvokeReturnValues
(t *testing.T)
inject_test.go:67
Function
Test_InjectorSet
(t *testing.T)
inject_test.go:115
Function
Test_InjectorSetParent
(t *testing.T)
inject_test.go:143
Function
Test_InterfaceOf
(t *testing.T)
inject_test.go:100