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