From f0a4a8d4eaf57431a113cb996de67348b987aa2b Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 6 Nov 2024 09:16:30 +0800 Subject: [PATCH 1/2] Remove deprecated storage and import API definitions --- data/bindata.go | 162 +++++++++++++------------------------ yao/apis/import.http.json | 75 ----------------- yao/apis/storage.http.json | 47 ----------- 3 files changed, 57 insertions(+), 227 deletions(-) delete mode 100644 yao/apis/import.http.json delete mode 100644 yao/apis/storage.http.json diff --git a/data/bindata.go b/data/bindata.go index 01fe8bc6f..0afc3750a 100644 --- a/data/bindata.go +++ b/data/bindata.go @@ -43,8 +43,6 @@ // .tmp/data/xgen/v1.0/index.html // .tmp/data/xgen/v1.0/layouts__index.async.js // .tmp/data/xgen/v1.0/umi.js -// .tmp/data/yao/apis/import.http.json -// .tmp/data/yao/apis/storage.http.json // .tmp/data/yao/data/icons/404.png // .tmp/data/yao/data/icons/icon.icns // .tmp/data/yao/data/icons/icon.ico @@ -237,7 +235,7 @@ func initReadmeMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/README.md", size: 2271, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/README.md", size: 2271, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -257,7 +255,7 @@ func initAigcsTranslateAiYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/aigcs/translate.ai.yml", size: 388, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/aigcs/translate.ai.yml", size: 388, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -277,7 +275,7 @@ func initApisAigcHttpYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/apis/aigc.http.yao", size: 564, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/apis/aigc.http.yao", size: 564, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -297,7 +295,7 @@ func initAppYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/app.yao", size: 603, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/app.yao", size: 603, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -317,7 +315,7 @@ func initChartsPetChartYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/charts/pet.chart.yao", size: 8250, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/charts/pet.chart.yao", size: 8250, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -337,7 +335,7 @@ func initConnectorsOpenaiGpt3_5TurboConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/gpt-3_5-turbo.conn.yao", size: 177, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/connectors/openai/gpt-3_5-turbo.conn.yao", size: 177, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -357,7 +355,7 @@ func initConnectorsOpenaiTextEmbeddingAda002ConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/text-embedding-ada-002.conn.yao", size: 189, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/connectors/openai/text-embedding-ada-002.conn.yao", size: 189, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -377,7 +375,7 @@ func initConnectorsOpenaiWhisper1ConnYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/connectors/openai/whisper-1.conn.yao", size: 163, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/connectors/openai/whisper-1.conn.yao", size: 163, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -397,7 +395,7 @@ func initDashboardsKanbanDashYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/dashboards/kanban.dash.yao", size: 2222, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/dashboards/kanban.dash.yao", size: 2222, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -417,7 +415,7 @@ func initFlowsAppMenuFlowYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/flows/app/menu.flow.yao", size: 1832, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/flows/app/menu.flow.yao", size: 1832, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -437,7 +435,7 @@ func initFlowsStatDataFlowYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/flows/stat/data.flow.yao", size: 1817, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/flows/stat/data.flow.yao", size: 1817, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -457,7 +455,7 @@ func initFormsAdminUserFormYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/forms/admin/user.form.yao", size: 97, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/forms/admin/user.form.yao", size: 97, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -477,7 +475,7 @@ func initFormsDemoPetFormYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/forms/demo/pet.form.yao", size: 6755, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/forms/demo/pet.form.yao", size: 6755, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -497,7 +495,7 @@ func initIconsAppIcns() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/icons/app.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -517,7 +515,7 @@ func initIconsAppIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/icons/app.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -537,7 +535,7 @@ func initIconsAppPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/icons/app.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/icons/app.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -557,7 +555,7 @@ func initLangsZhCnGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/langs/zh-cn/global.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/langs/zh-cn/global.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -577,7 +575,7 @@ func initLangsZhHkGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/langs/zh-hk/global.yml", size: 88, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/langs/zh-hk/global.yml", size: 88, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -597,7 +595,7 @@ func initLoginsAdminLoginYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/logins/admin.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/logins/admin.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -617,7 +615,7 @@ func initLoginsUserLoginYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/logins/user.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/logins/user.login.yao", size: 278, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -637,7 +635,7 @@ func initModelsAdminUserModYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/models/admin/user.mod.yao", size: 8052, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/models/admin/user.mod.yao", size: 8052, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -657,7 +655,7 @@ func initModelsPetModYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/models/pet.mod.yao", size: 1700, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/models/pet.mod.yao", size: 1700, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -677,7 +675,7 @@ func initNeoNeoYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/neo/neo.yml", size: 545, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/neo/neo.yml", size: 545, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -697,7 +695,7 @@ func initPublicDemoPetHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/public/demo/pet.html", size: 1376, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/public/demo/pet.html", size: 1376, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -717,7 +715,7 @@ func initPublicIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/public/index.html", size: 1404, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/public/index.html", size: 1404, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -737,7 +735,7 @@ func initScriptsDashJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/dash.js", size: 127, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/scripts/dash.js", size: 127, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -757,7 +755,7 @@ func initScriptsGuardJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/guard.js", size: 373, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/scripts/guard.js", size: 373, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -777,7 +775,7 @@ func initScriptsSetupJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/setup.js", size: 888, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/scripts/setup.js", size: 888, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -797,7 +795,7 @@ func initScriptsStatJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/scripts/stat.js", size: 1305, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/scripts/stat.js", size: 1305, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -817,7 +815,7 @@ func initServicesFooJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/services/foo.js", size: 122, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/services/foo.js", size: 122, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -837,7 +835,7 @@ func initStudioHelloJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/studio/hello.js", size: 101, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/studio/hello.js", size: 101, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -857,7 +855,7 @@ func initTablesAdminUserTabYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/tables/admin/user.tab.yao", size: 119, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/tables/admin/user.tab.yao", size: 119, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -877,7 +875,7 @@ func initTablesDemoPetTabYao() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "init/tables/demo/pet.tab.yao", size: 7111, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "init/tables/demo/pet.tab.yao", size: 7111, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -897,7 +895,7 @@ func libsuiIndexTs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libsui/index.ts", size: 12261, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "libsui/index.ts", size: 12261, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -917,7 +915,7 @@ func libsuiUtilsTs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libsui/utils.ts", size: 5959, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "libsui/utils.ts", size: 5959, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -937,7 +935,7 @@ func libsuiYaoTs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libsui/yao.ts", size: 4338, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "libsui/yao.ts", size: 4338, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -957,7 +955,7 @@ func publicIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "public/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "public/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -977,7 +975,7 @@ func uiIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "ui/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "ui/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -997,7 +995,7 @@ func xgenSetupIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/setup/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "xgen/setup/index.html", size: 11, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1017,7 +1015,7 @@ func xgenV09IndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v0.9/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "xgen/v0.9/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1037,7 +1035,7 @@ func xgenV10IndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/index.html", size: 50, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "xgen/v1.0/index.html", size: 50, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1057,7 +1055,7 @@ func xgenV10Layouts__indexAsyncJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/layouts__index.async.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "xgen/v1.0/layouts__index.async.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1077,47 +1075,7 @@ func xgenV10UmiJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "xgen/v1.0/umi.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _yaoApisImportHttpJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x94\x31\x4f\xe3\x30\x14\xc7\xf7\x7c\x0a\xcb\xba\xe1\x2e\xca\x25\xb9\x1b\xb3\x9d\x74\xa7\xd3\x0d\x27\x2a\xca\x56\x75\x30\x8d\x49\x5d\x35\xb1\xb1\x1d\xa0\x54\x1d\xa9\x58\x0a\x2c\x0c\x2c\x2c\x50\xb1\x41\x25\x46\xf8\x3a\x09\xe2\x5b\x20\x27\x6e\x43\xaa\x80\xaa\x56\xa2\x2c\x89\xf2\xfe\xef\xef\xe7\xdf\x7b\x4f\xe9\x1b\x00\xc0\x08\x85\x18\x7a\x00\xa6\xe7\x93\x74\x74\x9b\xdc\x3d\x26\x47\xe3\xf4\x64\x9c\x9c\x5e\x41\x4b\xe9\x7b\x98\x0b\x42\x23\x95\xf2\xc3\x76\x6d\x37\x8f\xfa\x58\xb4\x38\x61\x52\x2b\xda\x7c\x3c\x4c\x2f\xcf\x72\xf3\xaf\xda\xbf\xaf\xa6\x69\x26\xa3\xfb\x64\x32\x7c\xba\x79\x78\xbe\xb8\x36\x4d\xf3\x5b\xee\x0e\x38\x8d\x99\xf2\x1d\x10\x14\x05\x0e\x09\x19\xe5\x52\x4b\x31\xe2\xbe\x92\xb6\x31\xe2\x98\x7f\xef\xec\x6b\x81\x21\xd9\x16\xd0\x03\x0d\x03\x00\x00\xfa\xd9\x53\x87\x55\xba\xe3\x65\x20\xd6\x34\x1e\x62\xd9\xa6\xd9\x41\xb5\x8d\xfa\x56\x11\x67\x9c\xb6\xb0\x10\xb3\xe2\x76\x5e\xdc\xde\x8c\xa3\x22\x89\x28\xa8\x06\xfc\xc2\x10\x47\xa1\x9d\x1f\x0c\xd4\x67\xaf\x4b\x91\x6f\xef\x90\x6e\x39\x10\x22\xc6\x48\x14\xc0\xe6\xec\x04\x1a\x4b\xe8\xcd\x6e\x09\x00\x14\x12\xc9\x58\x95\xfd\xe9\xba\x56\x11\x96\x3d\x96\x75\x1f\x31\xd6\x25\x2d\xa4\xfa\xe9\x74\x04\x8d\xa0\x4e\x19\x64\xef\x81\xf5\x1e\xb4\x23\xb0\x94\xaa\x7c\x05\xfc\xdf\x3f\x0b\xb0\xd7\xe7\xfd\x15\xfc\x6b\x42\xf3\x91\x44\xcb\x0f\xf5\x77\xc9\x9d\x53\x15\x17\x2c\x8d\xb7\x14\x7e\x3d\xe6\x0a\x81\xa1\xa0\x5a\x10\xe4\xb0\x5a\x98\x2e\x88\x96\xd6\xd8\xcc\x95\x97\x45\xf5\xf4\x13\x2f\xcc\xb4\xd3\xcb\xe2\xfd\x9f\xf7\xbf\xf1\x2f\xd8\x8d\x31\xef\xe5\x2b\xb2\x5e\xd2\x95\x07\xaa\x89\x17\x99\xe9\x47\x81\x1b\x00\x34\x8d\x81\xf1\x12\x00\x00\xff\xff\xaa\x5f\x25\xcf\xa0\x06\x00\x00") - -func yaoApisImportHttpJsonBytes() ([]byte, error) { - return bindataRead( - _yaoApisImportHttpJson, - "yao/apis/import.http.json", - ) -} - -func yaoApisImportHttpJson() (*asset, error) { - bytes, err := yaoApisImportHttpJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "yao/apis/import.http.json", size: 1696, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _yaoApisStorageHttpJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x92\xbd\x4e\xe3\x40\x10\xc7\x7b\x3f\xc5\x6a\x75\xc5\x9d\xe5\xd8\xbe\x2b\xd3\x5d\x01\x11\x12\x12\x51\x48\xaa\x28\xc5\x62\x4f\x1c\x07\xc7\xbb\xec\x07\x10\x45\x69\x28\xe8\x80\x16\x6a\x40\xd0\x20\x21\x51\xf2\x3c\x06\xf1\x16\x68\xd7\x8e\xf3\x41\x20\x08\x09\xd1\xac\xb5\xf3\x9f\xff\x8c\x7f\x33\x3b\xb2\x10\xc2\x29\x19\x00\xae\x22\x9c\xdd\x9d\x67\x47\xb7\x4f\xa7\xd7\xd9\xd9\x25\x76\xb4\xb2\x0f\x5c\xc4\x34\xd5\xe2\x5f\xd7\x77\xfd\x3c\x1a\x82\x08\x78\xcc\x64\xa1\xcc\xda\xfe\xd7\x37\x7e\xdb\xb6\x9d\x9d\x3c\x64\xf7\xc7\xcf\x37\x8f\x2f\x17\x57\xb6\x6d\xff\xc9\x7d\x11\xa7\x8a\x69\xc7\x61\x4c\xd2\xc8\x13\x92\x72\x12\x41\xa1\x29\xc2\x43\xad\xed\x00\xe1\xc0\x2b\xfd\x03\x99\x0b\x8c\xc8\x9e\xc0\x55\xd4\xb6\x10\x42\x68\x64\xce\x22\xac\xd3\x3d\xc5\x12\x4a\x42\x93\x6b\x84\x01\xc8\x1e\x35\x95\xea\x5b\xdb\xcd\x69\x9c\x71\x1a\x80\x10\x65\x7b\xb7\x2b\xdc\xd6\x82\x37\xd6\x3c\x6d\xfc\xab\x1b\x27\xe0\xea\x03\x77\x4a\x8d\x2a\x89\xab\x65\x7f\x84\xb0\x90\x44\x2a\x5d\xef\x9f\xef\x3b\xd3\xb0\x1c\x32\x33\x4c\xc2\x58\x12\x07\x44\x0f\xc9\xeb\x0b\x9a\xe2\x22\x65\x6c\xbe\x63\xe7\x1d\x1c\x0e\x24\x34\x9d\x97\x00\xd5\xd6\x56\xf0\x34\x80\x84\xeb\x73\xe6\x09\xd1\x9e\x02\x3e\x74\xcd\xa2\x1d\x34\xb9\x42\x1a\xd0\xf0\x07\x18\x15\x4f\x56\xe2\x95\xef\xa1\xf2\x31\x72\x0d\x64\xab\xb1\xf9\x49\x60\xf3\xdf\x33\x57\xba\x0b\xe9\x5b\xfc\x05\xec\x29\x6e\x3c\x20\x11\x78\x2c\x8d\xf0\x2a\xc2\xbc\xf2\x57\x56\x58\x03\xd9\x9c\x37\x2f\x21\xfa\xb6\x8d\x59\x08\x75\xac\xb1\xf5\x1a\x00\x00\xff\xff\x12\x8c\x8c\xa5\x16\x04\x00\x00") - -func yaoApisStorageHttpJsonBytes() ([]byte, error) { - return bindataRead( - _yaoApisStorageHttpJson, - "yao/apis/storage.http.json", - ) -} - -func yaoApisStorageHttpJson() (*asset, error) { - bytes, err := yaoApisStorageHttpJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "yao/apis/storage.http.json", size: 1046, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "xgen/v1.0/umi.js", size: 71, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1137,7 +1095,7 @@ func yaoDataIcons404Png() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/404.png", size: 9342, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/data/icons/404.png", size: 9342, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1157,7 +1115,7 @@ func yaoDataIconsIconIcns() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.icns", size: 67465, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1177,7 +1135,7 @@ func yaoDataIconsIconIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.ico", size: 54993, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1197,7 +1155,7 @@ func yaoDataIconsIconPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/icons/icon.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/data/icons/icon.png", size: 34558, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1217,7 +1175,7 @@ func yaoDataIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/data/index.html", size: 282, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/data/index.html", size: 282, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1237,7 +1195,7 @@ func yaoFieldsModelTransJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/fields/model.trans.json", size: 14938, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/fields/model.trans.json", size: 14938, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1257,7 +1215,7 @@ func yaoLangsEnUsJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/en-US.json", size: 66, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/en-US.json", size: 66, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1277,7 +1235,7 @@ func yaoLangsZhCnGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1297,7 +1255,7 @@ func yaoLangsZhCnLoginsAdminLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1317,7 +1275,7 @@ func yaoLangsZhCnLoginsUserLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-cn/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/zh-cn/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1337,7 +1295,7 @@ func yaoLangsZhHkGlobalYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/global.yml", size: 1762, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1357,7 +1315,7 @@ func yaoLangsZhHkLoginsAdminLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/logins/admin.login.yml", size: 94, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1377,7 +1335,7 @@ func yaoLangsZhHkLoginsUserLoginYml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/langs/zh-hk/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/langs/zh-hk/logins/user.login.yml", size: 90, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1397,7 +1355,7 @@ func yaoReleaseAppYaz() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "yao/release/app.yaz", size: 181682, mode: os.FileMode(420), modTime: time.Unix(1728444349, 0)} + info := bindataFileInfo{name: "yao/release/app.yaz", size: 181682, mode: os.FileMode(420), modTime: time.Unix(1730855738, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1497,8 +1455,6 @@ var _bindata = map[string]func() (*asset, error){ "xgen/v1.0/index.html": xgenV10IndexHtml, "xgen/v1.0/layouts__index.async.js": xgenV10Layouts__indexAsyncJs, "xgen/v1.0/umi.js": xgenV10UmiJs, - "yao/apis/import.http.json": yaoApisImportHttpJson, - "yao/apis/storage.http.json": yaoApisStorageHttpJson, "yao/data/icons/404.png": yaoDataIcons404Png, "yao/data/icons/icon.icns": yaoDataIconsIconIcns, "yao/data/icons/icon.ico": yaoDataIconsIconIco, @@ -1674,10 +1630,6 @@ var _bintree = &bintree{nil, map[string]*bintree{ }}, }}, "yao": {nil, map[string]*bintree{ - "apis": {nil, map[string]*bintree{ - "import.http.json": {yaoApisImportHttpJson, map[string]*bintree{}}, - "storage.http.json": {yaoApisStorageHttpJson, map[string]*bintree{}}, - }}, "data": {nil, map[string]*bintree{ "icons": {nil, map[string]*bintree{ "404.png": {yaoDataIcons404Png, map[string]*bintree{}}, diff --git a/yao/apis/import.http.json b/yao/apis/import.http.json deleted file mode 100644 index e9174294a..000000000 --- a/yao/apis/import.http.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "数据导入接口", - "version": "1.0.0", - "description": "数据分析接口API(***即将移除***)", - "group": "xiang/import", - "guard": "bearer-jwt", - "paths": [ - { - "path": "/:name", - "method": "POST", - "process": "xiang.import.Run", - "in": ["$param.name", "$payload.file", "$payload.mapping"], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/:name/setting", - "method": "GET", - "process": "xiang.import.Setting", - "in": ["$param.name"], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/:name/data", - "method": "POST", - "process": "xiang.import.Data", - "in": [ - "$param.name", - "$payload.file", - "$payload.page", - "$payload.size", - "$payload.mapping" - ], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/:name/data/setting", - "method": "GET", - "process": "xiang.import.DataSetting", - "in": ["$param.name"], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/:name/mapping", - "method": "GET", - "process": "xiang.import.Mapping", - "in": ["$param.name", "$query.file"], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/:name/mapping/setting", - "method": "GET", - "process": "xiang.import.MappingSetting", - "in": ["$param.name", "$query.file"], - "out": { - "status": 200, - "type": "application/json" - } - } - ] -} diff --git a/yao/apis/storage.http.json b/yao/apis/storage.http.json deleted file mode 100644 index 1aac7d5bf..000000000 --- a/yao/apis/storage.http.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "存储接口", - "version": "1.0.0", - "description": "存储接口API(***即将移除***)", - "group": "xiang/storage", - "guard": "bearer-jwt", - "paths": [ - { - "path": "/upload", - "method": "POST", - "process": "xiang.fs.Upload", - "in": ["$file.file"], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/readfile", - "method": "GET", - "process": "xiang.fs.ReadFile", - "in": ["$query.name", "$query.encode"], - "out": { - "status": 200, - "type": "application/json" - } - }, - { - "path": "/url", - "method": "GET", - "guard": "-", - "process": "xiang.fs.GetURL", - "in": ["$query.name", "$query.type", "$query.token"], - "out": { "status": 200, "type": "image/png" } - }, - { - "path": "/token", - "method": "GET", - "process": "xiang.fs.GetToken", - "in": ["$query.name"], - "out": { - "status": 200, - "type": "application/json" - } - } - ] -} From c5a5a8432f583105ecb31d660a06470dc0daff9e Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 6 Nov 2024 09:25:29 +0800 Subject: [PATCH 2/2] Remove deprecated import and storage API loading from the codebase --- api/api.go | 19 ------------------- api/api_test.go | 4 ++-- engine/load.go | 6 ------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/api/api.go b/api/api.go index b51a813c5..99297e995 100644 --- a/api/api.go +++ b/api/api.go @@ -2,13 +2,11 @@ package api import ( "fmt" - "path/filepath" "strings" "github.com/yaoapp/gou/api" "github.com/yaoapp/gou/application" "github.com/yaoapp/yao/config" - "github.com/yaoapp/yao/data" "github.com/yaoapp/yao/share" ) @@ -28,23 +26,6 @@ func Load(cfg config.Config) error { return err }, exts...) - // Load APIs from bindata (**will be removed in the future**) - names := []string{"import", "storage"} - for _, name := range names { - file := filepath.Join("yao", "apis", fmt.Sprintf("%s.http.json", name)) - id := fmt.Sprintf("xiang.%s", name) - - source, err := data.Read(file) - if err != nil { - messages = append(messages, err.Error()) - } - - _, err = api.LoadSource(file, source, id) - if err != nil { - messages = append(messages, err.Error()) - } - } - if len(messages) > 0 { return fmt.Errorf(strings.Join(messages, ";\n")) } diff --git a/api/api_test.go b/api/api_test.go index 1e40fa12f..59b449841 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -25,8 +25,8 @@ func check(t *testing.T) { assert.True(t, ids["user"]) assert.True(t, ids["user.pet"]) - assert.True(t, ids["xiang.import"]) // will be removed in the future - assert.True(t, ids["xiang.storage"]) // will be removed in the future + // assert.True(t, ids["xiang.import"]) // will be removed in the future + // assert.True(t, ids["xiang.storage"]) // will be removed in the future // wskeys := []string{} // for key := range websocket.Upgraders { diff --git a/engine/load.go b/engine/load.go index 3d34f8178..3f785289e 100644 --- a/engine/load.go +++ b/engine/load.go @@ -385,12 +385,6 @@ func Reload(cfg config.Config, options LoadOption) (err error) { printErr(cfg.Mode, "Widgets", err) } - // Load Importers - err = importer.Load(cfg) - if err != nil { - printErr(cfg.Mode, "Plugin", err) - } - // Load Apis err = api.Load(cfg) // 加载业务接口 API if err != nil {