Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth
This commit is contained in:
@@ -6,6 +6,7 @@ type Config struct {
|
||||
rest.RestConf
|
||||
SourceMysql string
|
||||
Auth types.Auth
|
||||
SourceRabbitMq string
|
||||
{{.auth}}
|
||||
{{.jwtTrans}}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ type ServiceContext struct {
|
||||
SharedState *fsm.StateCluster
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
RabbitMq *initalize.RabbitMqHandle
|
||||
}
|
||||
|
||||
func NewServiceContext(c {{.config}}) *ServiceContext {
|
||||
@@ -32,6 +33,7 @@ func NewServiceContext(c {{.config}}) *ServiceContext {
|
||||
MysqlConn: conn,
|
||||
SharedState: StateServer,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
RabbitMq:initalize.InitRabbitMq(c.SourceRabbitMq, nil),
|
||||
{{.middlewareAssignment}}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,8 @@ Name: {{.serviceName}}
|
||||
Host: {{.host}}
|
||||
Port: {{.port}}
|
||||
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
SourceRabbitMq: amqp://rabbit001:rabbit001129@110.41.19.98:5672
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
AccessExpire: 2592000
|
||||
RefreshAfter: 1592000
|
||||
RefreshAfter: 1592000
|
||||
|
||||
Reference in New Issue
Block a user