[migration] add back module.go

This commit is contained in:
Kassian Sun 2023-05-19 09:46:20 +08:00 committed by Gitea
parent cc2fd546cf
commit 6cceb8af26
1 changed files with 37 additions and 0 deletions

View File

@ -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{})
}