fusenapi/server/data-transfer/internal/svc/servicecontext.go
laodaming 53a3490837 fix
2023-06-12 14:05:35 +08:00

21 lines
340 B
Go

package svc
import (
"fusenapi/initalize"
"fusenapi/server/data-transfer/internal/config"
"gorm.io/gorm"
)
type ServiceContext struct {
Config config.Config
MysqlConn *gorm.DB
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
MysqlConn: initalize.InitMysql(c.SourceMysql),
}
}