fusenapi/data-transfer/internal/svc/servicecontext.go
laodaming cef191a6e4 fix
2023-06-07 19:47:45 +08:00

20 lines
342 B
Go

package svc
import (
"fusenapi/data-transfer/internal/config"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
type ServiceContext struct {
Config config.Config
MysqlConn sqlx.SqlConn
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
MysqlConn: sqlx.NewMysql(c.SourceMysql),
}
}