Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth

This commit is contained in:
eson
2023-08-08 14:18:45 +08:00
115 changed files with 3189 additions and 504 deletions

6
server/inventory/Dockerfile Executable file
View File

@@ -0,0 +1,6 @@
FROM alpine
WORKDIR /www/fusenapi/
COPY ./bin/api-inventory-srv /www/fusenapi/
COPY ./etc /www/fusenapi/etc
CMD ["/www/fusenapi/api-inventory-srv"]

View File

@@ -1,7 +1,6 @@
Name: inventory
Host: localhost
Port: 9905
ReplicaId: 30
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth:
AccessSecret: fusen2023

View File

@@ -18,7 +18,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Handler: TakeHandler(serverCtx),
},
{
Method: http.MethodGet,
Method: http.MethodPost,
Path: "/api/inventory/list",
Handler: GetCloudListHandler(serverCtx),
},

View File

@@ -16,9 +16,9 @@ type TakeForm struct {
}
type GetCloudListReq struct {
Page int `form:"page"`
PageSize int `form:"page_size"`
Size int64 `form:"size"`
Page int `json:"page"`
PageSize int `json:"page_size"`
Size int64 `json:"size"`
}
type GetCloudListRsp struct {

View File

@@ -0,0 +1,12 @@
package main
import (
"testing"
)
// var configFile = flag.String("f", "etc/home-user-auth.yaml", "the config file")
func TestMain(t *testing.T) {
// log.Println(model.RawFieldNames[FsCanteenType]())
main()
}