把server归到统一文件夹
This commit is contained in:
20
server/home-user-auth/internal/svc/servicecontext.go
Normal file
20
server/home-user-auth/internal/svc/servicecontext.go
Normal file
@@ -0,0 +1,20 @@
|
||||
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),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user