fusenapi/server/home-user-auth/internal/svc/servicecontext.go
2023-06-08 10:51:56 +08:00

21 lines
351 B
Go

package svc
import (
"fusenapi/server/home-user-auth/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),
}
}