-
Notifications
You must be signed in to change notification settings - Fork 36
/
global.go
69 lines (55 loc) · 2.02 KB
/
global.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package container
// Global is the global concrete of the Container.
var Global = New()
// Singleton calls the same method of the global concrete.
func Singleton(resolver interface{}) error {
return Global.Singleton(resolver)
}
// SingletonLazy calls the same method of the global concrete.
func SingletonLazy(resolver interface{}) error {
return Global.SingletonLazy(resolver)
}
// NamedSingleton calls the same method of the global concrete.
func NamedSingleton(name string, resolver interface{}) error {
return Global.NamedSingleton(name, resolver)
}
// NamedSingletonLazy calls the same method of the global concrete.
func NamedSingletonLazy(name string, resolver interface{}) error {
return Global.NamedSingletonLazy(name, resolver)
}
// Transient calls the same method of the global concrete.
func Transient(resolver interface{}) error {
return Global.Transient(resolver)
}
// TransientLazy calls the same method of the global concrete.
func TransientLazy(resolver interface{}) error {
return Global.TransientLazy(resolver)
}
// NamedTransient calls the same method of the global concrete.
func NamedTransient(name string, resolver interface{}) error {
return Global.NamedTransient(name, resolver)
}
// NamedTransientLazy calls the same method of the global concrete.
func NamedTransientLazy(name string, resolver interface{}) error {
return Global.NamedTransientLazy(name, resolver)
}
// Reset calls the same method of the global concrete.
func Reset() {
Global.Reset()
}
// Call calls the same method of the global concrete.
func Call(receiver interface{}) error {
return Global.Call(receiver)
}
// Resolve calls the same method of the global concrete.
func Resolve(abstraction interface{}) error {
return Global.Resolve(abstraction)
}
// NamedResolve calls the same method of the global concrete.
func NamedResolve(abstraction interface{}, name string) error {
return Global.NamedResolve(abstraction, name)
}
// Fill calls the same method of the global concrete.
func Fill(receiver interface{}) error {
return Global.Fill(receiver)
}