28 lines
667 B
Go
28 lines
667 B
Go
|
package gin
|
||
|
|
||
|
import "git.vinchent.xyz/vinchent/go-web/framework"
|
||
|
|
||
|
// Engine handles the bind process
|
||
|
|
||
|
func (engine *Engine) Bind(provider framework.ServiceProvider) error {
|
||
|
return engine.container.Bind(provider)
|
||
|
}
|
||
|
|
||
|
func (engine *Engine) IsBound(key string) bool {
|
||
|
return engine.container.IsBound(key)
|
||
|
}
|
||
|
|
||
|
// Context handle the use process.
|
||
|
|
||
|
func (ctx *Context) Make(name string) (interface{}, error) {
|
||
|
return ctx.container.Make(name)
|
||
|
}
|
||
|
|
||
|
func (ctx *Context) MustMake(name string) interface{} {
|
||
|
return ctx.container.MustMake(name)
|
||
|
}
|
||
|
|
||
|
func (ctx *Context) MakeNew(name string, params []interface{}) (interface{}, error) {
|
||
|
return ctx.container.MakeNew(name, params)
|
||
|
}
|