Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth
This commit is contained in:
@@ -21,7 +21,10 @@ type Config struct {
|
||||
}
|
||||
}
|
||||
}
|
||||
PythonApi struct {
|
||||
CombineImageUrl string //合图url
|
||||
BLMService struct {
|
||||
Url string
|
||||
LogoCombine struct {
|
||||
Url string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ type ServiceContext struct {
|
||||
AllModels *gmodel.AllModelsGen
|
||||
RabbitMq *initalize.RabbitMqHandle
|
||||
AwsSession *session.Session
|
||||
|
||||
Repositories *initalize.Repositories
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
@@ -41,6 +43,11 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
RabbitMq: initalize.InitRabbitMq(c.SourceRabbitMq, nil),
|
||||
AwsSession: session.Must(session.NewSession(&config)),
|
||||
Repositories: initalize.NewAllRepositories(&initalize.NewAllRepositorieData{
|
||||
GormDB: initalize.InitMysql(c.SourceMysql),
|
||||
BLMServiceUrl: &c.BLMService.Url,
|
||||
AwsSession: session.Must(session.NewSession(&config)),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user