Skip to content

Commit 5530fa8

Browse files
committed
2 parents 6b3fb6f + 624d587 commit 5530fa8

124 files changed

Lines changed: 18373 additions & 970 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Our Goals
1212
● To build the AI model sharing network “ModelMarket” to facilitate the effective management of the AI development cycle
1313
● To implement the hardware sharing network to streamline the AI product registration and communication
1414

15-
# WhitePaper
16-
https://github.com/Bottos-project/bottos/blob/master/Bottos%20whitepaper%20English%20final.pdf
15+
# Learn about Bottos
16+
Read our [WhitePaper](https://github.com/Bottos-project/bottos/blob/master/Bottos%20whitepaper%20English%20final.pdf)
1717

1818
# Contact us:
1919
  botadmin@bottos.org

config/base.go

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
package config
2-
1+
package config
32

43
const (
5-
BASE_URL = "http://47.98.47.148:8887/"
6-
//BASE_URL = "http://127.0.0.1:8888/"
7-
BASE_RPC = "http://47.98.47.148:8080/rpc"
4+
BASE_CHAIN_IP = "127.0.0.1"
5+
BASE_CHAIN_PORT = "8689"
6+
BASE_CHAIN_URL = "http://" + BASE_CHAIN_IP + ":" + BASE_CHAIN_PORT + "/"
7+
BASE_RPC = "http://" + BASE_CHAIN_IP + ":8080/rpc"
8+
//BASE_RPC = "http://127.0.0.1:8080/rpc"
9+
10+
BASE_MONGODB_PORT = "27017"
11+
BASE_MONGODB_ADDR = BASE_CHAIN_IP + ":" + BASE_MONGODB_PORT
12+
DB_NAME = "bottos"
13+
14+
BASE_MINIO_IP = "xx"
15+
BASE_MINIO_PORT = "9000"
16+
BASE_MINIO_ADDR = BASE_MINIO_IP + ":" + BASE_MINIO_PORT
17+
BASE_MINIO_ACCESS_KEY = ""
18+
BASE_MINIO_SECRET_KEY = ""
19+
820
BASE_LOG_CONF = "config/log.json"
9-
)
21+
1022

23+
24+
TOKEN_EXPIRE_TIME = 2 * 60 * 60
25+
)

config/log.json

Lines changed: 64 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,105 @@
55
"pattern": "[%D %T] [%C] [%L] [%S]: %M"
66
},
77
"files": [{
8-
"enable": true,
8+
"enable": false,
9+
"level": "DEBUG",
10+
"filename":"./asset_api.log",
11+
"category": "asset.api",
12+
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
13+
"rotate": true,
14+
"maxsize": "20M",
15+
"maxlines": "10K",
16+
"daily": true
17+
},{
18+
"enable": false,
19+
"level": "DEBUG",
20+
"filename":"./asset_srv.log",
21+
"category": "asset.srv",
22+
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
23+
"rotate": true,
24+
"maxsize": "20M",
25+
"maxlines": "10K",
26+
"daily": true
27+
},{
28+
"enable": false,
29+
"level": "DEBUG",
30+
"filename":"./exchange_api.log",
31+
"category": "exchange.api",
32+
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
33+
"rotate": true,
34+
"maxsize": "20M",
35+
"maxlines": "10K",
36+
"daily": true
37+
},{
38+
"enable": false,
39+
"level": "DEBUG",
40+
"filename":"./exchange_srv.log",
41+
"category": "exchange.srv",
42+
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
43+
"rotate": true,
44+
"maxsize": "20M",
45+
"maxlines": "10K",
46+
"daily": true
47+
},{
48+
"enable": false,
949
"level": "DEBUG",
1050
"filename":"./requirement_api.log",
1151
"category": "requirement.api",
1252
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
13-
"rotate": false,
14-
"maxsize": "50M",
53+
"rotate": true,
54+
"maxsize": "20M",
1555
"maxlines": "10K",
16-
"daily": false
56+
"daily": true
1757
},{
18-
"enable": true,
58+
"enable": false,
1959
"level": "DEBUG",
2060
"filename":"./requirement_srv.log",
2161
"category": "requirement.srv",
2262
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
23-
"rotate": false,
24-
"maxsize": "50M",
63+
"rotate": true,
64+
"maxsize": "20M",
2565
"maxlines": "10K",
26-
"daily": false
66+
"daily": true
2767
},{
28-
"enable": true,
68+
"enable": false,
2969
"level": "DEBUG",
3070
"filename":"./dashboard_api.log",
3171
"category": "dashboard.api",
3272
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
33-
"rotate": false,
34-
"maxsize": "50M",
73+
"rotate": true,
74+
"maxsize": "20M",
3575
"maxlines": "10K",
36-
"daily": false
76+
"daily": true
3777
},{
38-
"enable": true,
78+
"enable": false,
3979
"level": "DEBUG",
4080
"filename":"./dashboard_srv.log",
4181
"category": "dashboard.srv",
4282
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
43-
"rotate": false,
44-
"maxsize": "50M",
83+
"rotate": true,
84+
"maxsize": "20M",
4585
"maxlines": "10K",
46-
"daily": false
86+
"daily": true
4787
},{
48-
"enable": true,
88+
"enable": false,
4989
"level": "DEBUG",
5090
"filename":"./user_api.log",
5191
"category": "user.api",
5292
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
53-
"rotate": false,
54-
"maxsize": "50M",
93+
"rotate": true,
94+
"maxsize": "20M",
5595
"maxlines": "10K",
56-
"daily": false
96+
"daily": true
5797
},{
58-
"enable": true,
98+
"enable": false,
5999
"level": "DEBUG",
60100
"filename":"./user_srv.log",
61101
"category": "user.srv",
62102
"pattern": "[%D %T] [%C] [%L] [%S]: %M",
63-
"rotate": false,
64-
"maxsize": "50M",
103+
"rotate": true,
104+
"maxsize": "20M",
65105
"maxlines": "10K",
66-
"daily": false
106+
"daily": true
67107
}],
68108
"sockets": [{
69109
"enable": false,

service/asset/assApi/main.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package main
22

33
import (
44
"encoding/json"
@@ -76,16 +76,16 @@ func (u *Asset) GetFileUploadStat(ctx context.Context, req *api.Request, rsp *ap
7676
func (s *Asset) RegisterFile(ctx context.Context, req *api.Request, rsp *api.Response) error {
7777
//header, _ := json.Marshal(req.Header)
7878
response, err := s.Client.RegisterFile(ctx, &asset.RegisterFileRequest{
79-
PostBody: req.Body,
79+
PostBody: req.Body,
8080
})
8181
if err != nil {
8282
return err
8383
}
8484

8585
rsp.StatusCode = 200
8686
b, _ := json.Marshal(map[string]interface{}{
87-
"code": response.Code,
88-
"msg": response.Msg,
87+
"code": response.Code,
88+
"msg": response.Msg,
8989
"data": response.Data,
9090
})
9191
rsp.Body = string(b)
@@ -166,16 +166,16 @@ func (u *Asset) GetDownLoadURL(ctx context.Context, req *api.Request, rsp *api.R
166166
func (u *Asset) Register(ctx context.Context, req *api.Request, rsp *api.Response) error {
167167
//header, _ := json.Marshal(req.Header)
168168
response, err := u.Client.Register(ctx, &asset.RegisterRequest{
169-
PostBody: req.Body,
169+
PostBody: req.Body,
170170
})
171171
if err != nil {
172172
return err
173173
}
174174

175175
rsp.StatusCode = 200
176176
b, _ := json.Marshal(map[string]interface{}{
177-
"code": response.Code,
178-
"msg": response.Msg,
177+
"code": response.Code,
178+
"msg": response.Msg,
179179
"data": response.Data,
180180
})
181181
rsp.Body = string(b)
@@ -256,16 +256,16 @@ func (u *Asset) QueryAllAsset(ctx context.Context, req *api.Request, rsp *api.Re
256256
func (u *Asset) Modify(ctx context.Context, req *api.Request, rsp *api.Response) error {
257257
//header, _ := json.Marshal(req.Header)
258258
response, err := u.Client.Modify(ctx, &asset.ModifyRequest{
259-
PostBody: req.Body,
259+
PostBody: req.Body,
260260
})
261261
if err != nil {
262262
return err
263263
}
264264

265265
rsp.StatusCode = 200
266266
b, _ := json.Marshal(map[string]interface{}{
267-
"code": response.Code,
268-
"msg": response.Msg,
267+
"code": response.Code,
268+
"msg": response.Msg,
269269
"data": response.Data,
270270
})
271271
rsp.Body = string(b)

0 commit comments

Comments
 (0)