Documentation
¶
Index ¶
- Variables
- type Container
- func (c *Container) BeginScope(scopeID string)
- func (c *Container) Bind(abstract interface{}, concrete interface{})
- func (c *Container) EndScope(scopeID string)
- func (c *Container) Resolve(out interface{}) error
- func (c *Container) ResolveCtx(ctx context.Context, out interface{}) error
- func (c *Container) Scoped(abstract interface{}, concrete interface{})
- func (c *Container) Singleton(abstract interface{}, concrete interface{})
- type ServiceContainer
Constants ¶
This section is empty.
Variables ¶
View Source
var ScopeIDKey = struct{}{}
ScopeIDKey is the key used to store the scope ID in the context
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
func NewContainer() *Container
func (*Container) BeginScope ¶
func (*Container) ResolveCtx ¶
type ServiceContainer ¶
type ServiceContainer interface {
Bind(abstract interface{}, concrete interface{})
Singleton(abstract interface{}, concrete interface{})
Scoped(abstract interface{}, concrete interface{})
Resolve(out interface{}) error
ResolveCtx(ctx context.Context, out interface{}) error
BeginScope(scopeID string)
EndScope(scopeID string)
}
Click to show internal directories.
Click to hide internal directories.