Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
56a3c05eae
|
@ -1,7 +1,7 @@
|
|||
Name: {{.serviceName}}
|
||||
Host: {{.host}}
|
||||
Port: {{.port}}
|
||||
SourceMysql: ""
|
||||
DataSource: ""
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
AccessExpire: 604800
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fusenapi/server/home-user-auth/internal/config"
|
||||
"fusenapi/server/home-user-auth/internal/handler"
|
||||
"fusenapi/server/home-user-auth/internal/svc"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/requests"
|
||||
|
@ -17,6 +18,7 @@ var cnf config.Config
|
|||
var gserver *rest.Server
|
||||
|
||||
func init() {
|
||||
log.SetFlags(log.Llongfile)
|
||||
gserver = GetTestServer()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Name: product
|
||||
Host: 0.0.0.0
|
||||
Port: 8889
|
||||
DataSource: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
AccessExpire: 60
|
||||
|
|
|
@ -5,9 +5,10 @@ import (
|
|||
"fmt"
|
||||
"fusenapi/initalize"
|
||||
"fusenapi/server/product/internal/config"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"gorm.io/gorm"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Name: shopping-cart-confirmation
|
||||
Host: 0.0.0.0
|
||||
Port: 8892
|
||||
DataSource: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
AccessExpire: 604800
|
||||
|
|
|
@ -2,11 +2,12 @@ package config
|
|||
|
||||
import (
|
||||
"fusenapi/server/shopping-cart-confirmation/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rest.RestConf
|
||||
DataSource string
|
||||
Auth types.Auth
|
||||
SourceMysql string
|
||||
Auth types.Auth
|
||||
}
|
||||
|
|
|
@ -5,9 +5,10 @@ import (
|
|||
"fmt"
|
||||
"fusenapi/initalize"
|
||||
"fusenapi/server/shopping-cart-confirmation/internal/config"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"gorm.io/gorm"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
|
@ -20,7 +21,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.DataSource),
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user