32 lines
538 B
Go
32 lines
538 B
Go
package user
|
|
|
|
import (
|
|
"github.com/Superdanda/hade/framework"
|
|
)
|
|
|
|
type UserProvider struct {
|
|
framework.ServiceProvider
|
|
|
|
c framework.Container
|
|
}
|
|
|
|
func (sp *UserProvider) Name() string {
|
|
return Key
|
|
}
|
|
|
|
func (sp *UserProvider) Register(c framework.Container) framework.NewInstance {
|
|
return NewUserService
|
|
}
|
|
|
|
func (sp *UserProvider) IsDefer() bool {
|
|
return false
|
|
}
|
|
|
|
func (sp *UserProvider) Params(c framework.Container) []interface{} {
|
|
return []interface{}{c}
|
|
}
|
|
|
|
func (sp *UserProvider) Boot(c framework.Container) error {
|
|
return nil
|
|
}
|