Documentation ¶
Index ¶
- func NewlessEnv(params ...interface{}) (interface{}, error)
- func NewlessTestingEnv(params ...interface{}) (interface{}, error)
- type LessEnvProvider
- func (provider *LessEnvProvider) Boot(c framework.Container) error
- func (provider *LessEnvProvider) IsDefer() bool
- func (provider *LessEnvProvider) Name() string
- func (provider *LessEnvProvider) Params(c framework.Container) []interface{}
- func (provider *LessEnvProvider) Register(c framework.Container) framework.NewInstance
- type LessTestingEnvProvider
- func (provider *LessTestingEnvProvider) Boot(c framework.Container) error
- func (provider *LessTestingEnvProvider) IsDefer() bool
- func (provider *LessTestingEnvProvider) Name() string
- func (provider *LessTestingEnvProvider) Params(c framework.Container) []interface{}
- func (provider *LessTestingEnvProvider) Register(c framework.Container) framework.NewInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewlessEnv ¶
func NewlessEnv(params ...interface{}) (interface{}, error)
NewlessEnv 有一个参数,.env文件所在的目录 example: NewlessEnv("/envfolder/") 会读取文件: /envfolder/.env .env的文件格式 FOO_ENV=BAR
func NewlessTestingEnv ¶
func NewlessTestingEnv(params ...interface{}) (interface{}, error)
NewlessEnv 有一个参数,.env文件所在的目录 example: NewlessEnv("/envfolder/") 会读取文件: /envfolder/.env .env的文件格式 FOO_ENV=BAR
Types ¶
type LessEnvProvider ¶
type LessEnvProvider struct {
Folder string
}
func (*LessEnvProvider) Boot ¶
func (provider *LessEnvProvider) Boot(c framework.Container) error
Boot will called when the service instantiate
func (*LessEnvProvider) IsDefer ¶
func (provider *LessEnvProvider) IsDefer() bool
IsDefer define whether the service instantiate when first make or register
func (*LessEnvProvider) Name ¶
func (provider *LessEnvProvider) Name() string
/ Name define the name for this service
func (*LessEnvProvider) Params ¶
func (provider *LessEnvProvider) Params(c framework.Container) []interface{}
Params define the necessary params for NewInstance
func (*LessEnvProvider) Register ¶
func (provider *LessEnvProvider) Register(c framework.Container) framework.NewInstance
Register registe a new function for make a service instance
type LessTestingEnvProvider ¶
type LessTestingEnvProvider struct {
Folder string
}
func (*LessTestingEnvProvider) Boot ¶
func (provider *LessTestingEnvProvider) Boot(c framework.Container) error
Boot will called when the service instantiate
func (*LessTestingEnvProvider) IsDefer ¶
func (provider *LessTestingEnvProvider) IsDefer() bool
IsDefer define whether the service instantiate when first make or register
func (*LessTestingEnvProvider) Name ¶
func (provider *LessTestingEnvProvider) Name() string
/ Name define the name for this service
func (*LessTestingEnvProvider) Params ¶
func (provider *LessTestingEnvProvider) Params(c framework.Container) []interface{}
Params define the necessary params for NewInstance
func (*LessTestingEnvProvider) Register ¶
func (provider *LessTestingEnvProvider) Register(c framework.Container) framework.NewInstance
Register registe a new function for make a service instance