-
Notifications
You must be signed in to change notification settings - Fork 0
/
provider.go
34 lines (27 loc) · 873 Bytes
/
provider.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
package id
import (
"github.com/go-ddh/nice/framework"
"github.com/go-ddh/nice/framework/contract"
)
type NiceIDProvider struct {
}
// Register register a new function for make a service instance
func (provider *NiceIDProvider) Register(c framework.Container) framework.NewInstance {
return NewNiceIDService
}
// Boot will called when the service instantiate
func (provider *NiceIDProvider) Boot(c framework.Container) error {
return nil
}
// IsDefer define whether the service instantiate when first make or register
func (provider *NiceIDProvider) IsDefer() bool {
return false
}
// Params define the necessary params for NewInstance
func (provider *NiceIDProvider) Params(c framework.Container) []interface{} {
return []interface{}{}
}
// Name / Name define the name for this service
func (provider *NiceIDProvider) Name() string {
return contract.IDKey
}