[migration] add back module.go
This commit is contained in:
parent
cc2fd546cf
commit
6cceb8af26
|
@ -0,0 +1,37 @@
|
||||||
|
/* Copyright © INFINI Ltd. All rights reserved.
|
||||||
|
* Web: https://infinilabs.com
|
||||||
|
* Email: hello#infini.ltd */
|
||||||
|
|
||||||
|
package migration
|
||||||
|
|
||||||
|
import (
|
||||||
|
log "github.com/cihub/seelog"
|
||||||
|
"infini.sh/framework/core/env"
|
||||||
|
"infini.sh/framework/core/module"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (module *Module) Name() string {
|
||||||
|
return "migration"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (module *Module) Setup() {
|
||||||
|
exists, err := env.ParseConfig("migration", module)
|
||||||
|
if exists && err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
|
InitAPI()
|
||||||
|
}
|
||||||
|
func (module *Module) Start() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (module *Module) Stop() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type Module struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
module.RegisterUserPlugin(&Module{})
|
||||||
|
}
|
Loading…
Reference in New Issue