正在显示
3 个修改的文件
包含
35 行增加
和
3 行删除
@@ -116,6 +116,12 @@ spec: | @@ -116,6 +116,12 @@ spec: | ||
116 | value: "https://suplus-business-admin-prd.fjmaimaimai.com" | 116 | value: "https://suplus-business-admin-prd.fjmaimaimai.com" |
117 | - name: MMM_OPEN_API_SERVICE_HOST | 117 | - name: MMM_OPEN_API_SERVICE_HOST |
118 | value: "https://public-interface.fjmaimaimai.com/openapi" | 118 | value: "https://public-interface.fjmaimaimai.com/openapi" |
119 | + - name: PUSH_DATA_HOST | ||
120 | + value: "http://character-library-metadata-bastion-test.fjmaimaimai.com" | ||
121 | + - name: PUSH_DATA_APPKEY | ||
122 | + value: "7q9Kd8ktoB" | ||
123 | + - name: PUSH_DATA_APPSECRET | ||
124 | + value: "pQSoBj44Wk" | ||
119 | volumes: | 125 | volumes: |
120 | - name: accesslogs | 126 | - name: accesslogs |
121 | emptyDir: {} | 127 | emptyDir: {} |
pkg/constant/push_data.go
0 → 100644
1 | +package constant | ||
2 | + | ||
3 | +import "os" | ||
4 | + | ||
5 | +//推送数据到字库 | ||
6 | + | ||
7 | +var PUSH_DATA_HOST string = "http://character-library-metadata-bastion-test.fjmaimaimai.com" | ||
8 | + | ||
9 | +var PUSH_DATA_APPKEY string = "GnAmG4jybB" | ||
10 | + | ||
11 | +var PUSH_DATA_APPSECRET string = "3Oo4dG64X0" | ||
12 | + | ||
13 | +func init() { | ||
14 | + if os.Getenv("PUSH_DATA_HOST") != "" { | ||
15 | + PUSH_DATA_HOST = os.Getenv("PUSH_DATA_HOST") | ||
16 | + } | ||
17 | + if os.Getenv("PUSH_DATA_APPKEY") != "" { | ||
18 | + PUSH_DATA_APPKEY = os.Getenv("PUSH_DATA_APPKEY") | ||
19 | + } | ||
20 | + if os.Getenv("PUSH_DATA_APPSECRET") != "" { | ||
21 | + PUSH_DATA_APPSECRET = os.Getenv("PUSH_DATA_APPSECRET") | ||
22 | + } | ||
23 | +} |
@@ -8,6 +8,7 @@ import ( | @@ -8,6 +8,7 @@ import ( | ||
8 | "time" | 8 | "time" |
9 | 9 | ||
10 | "github.com/dgrijalva/jwt-go" | 10 | "github.com/dgrijalva/jwt-go" |
11 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/constant" | ||
11 | ) | 12 | ) |
12 | 13 | ||
13 | type FieldName struct { | 14 | type FieldName struct { |
@@ -31,9 +32,9 @@ type Client struct { | @@ -31,9 +32,9 @@ type Client struct { | ||
31 | 32 | ||
32 | func NewClient() *Client { | 33 | func NewClient() *Client { |
33 | return &Client{ | 34 | return &Client{ |
34 | - Host: "http://character-library-metadata-bastion-test.fjmaimaimai.com", | ||
35 | - AppSecret: "3Oo4dG64X0", | ||
36 | - AppKey: "GnAmG4jybB", | 35 | + Host: constant.PUSH_DATA_HOST, |
36 | + AppSecret: constant.PUSH_DATA_APPSECRET, | ||
37 | + AppKey: constant.PUSH_DATA_APPKEY, | ||
37 | } | 38 | } |
38 | } | 39 | } |
39 | 40 | ||
@@ -94,6 +95,7 @@ type ReqSearchTable struct { | @@ -94,6 +95,7 @@ type ReqSearchTable struct { | ||
94 | // SearchTable 查询应用数据表 | 95 | // SearchTable 查询应用数据表 |
95 | func (c *Client) SearchTable(name string) { | 96 | func (c *Client) SearchTable(name string) { |
96 | apiUrl := `/api/app-table-file/list` | 97 | apiUrl := `/api/app-table-file/list` |
98 | + //TODO | ||
97 | _ = apiUrl | 99 | _ = apiUrl |
98 | } | 100 | } |
99 | 101 | ||
@@ -106,5 +108,6 @@ type ReqCreateTable struct { | @@ -106,5 +108,6 @@ type ReqCreateTable struct { | ||
106 | // CreateTable 创建应用表 | 108 | // CreateTable 创建应用表 |
107 | func (c *Client) CreateTable() { | 109 | func (c *Client) CreateTable() { |
108 | apiUrl := `/api/app-table-file/create` | 110 | apiUrl := `/api/app-table-file/create` |
111 | + //TODO | ||
109 | _ = apiUrl | 112 | _ = apiUrl |
110 | } | 113 | } |
-
请 注册 或 登录 后发表评论