|
|
@@ -10,16 +10,17 @@ import (
|
|
|
// curl -X GET "http://localhost:32000/gateway/api/version"
|
|
|
|
|
|
// Configuration
|
|
|
-// curl -X POST -H "Content-Type: application/json" -d '{"scope": "global", "group":"test", "value":"test-value"}' "http://localhost:32000/gateway/api/configuration/create"
|
|
|
-// curl -X GET "http://localhost:32000/gateway/api/configuration/values?scope=global&group=test&pageNo=1&pageSize=1"
|
|
|
-// curl -X POST -H "Content-Type: application/json" -d '{"scope": "global", "group":"test"}' "http://localhost:32000/gateway/api/configuration/delete"
|
|
|
+// curl -X POST -H "Content-Type: application/json" -d '{"serviceShortName": "example", "scope": "global", "group":"test", "value":"test-value"}' "http://localhost:32000/gateway/api/configuration/create"
|
|
|
+// curl -X GET "http://localhost:32000/gateway/api/configuration/values?serviceShortName=example&scope=global&group=test&pageNo=1&pageSize=1"
|
|
|
+// curl -X POST -H "Content-Type: application/json" -d '{"serviceShortName": "example", "scope": "global", "group":"test"}' "http://localhost:32000/gateway/api/configuration/delete"
|
|
|
+// curl -X GET "http://localhost:32000/gateway/api/configuration/registered/services"
|
|
|
|
|
|
// Class
|
|
|
// curl -X POST -H "Content-Type: application/json" -d '{"name":"test", "studentNum": 10}' "http://localhost:32000/gateway/api/v1/class/create"
|
|
|
-// curl -X PUT -H "Content-Type: application/json" -d '{"id":"3d94607a0df14cebae4f4aa70ef4d0c1", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/class/update"
|
|
|
+// curl -X PUT -H "Content-Type: application/json" -d '{"id":"5a1645efeff64852a41b28268b232209", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/class/update"
|
|
|
// curl -X GET "http://localhost:32000/gateway/api/v1/class/query?name=test-new&pageNo=1&pageSize=1"
|
|
|
-// curl -X GET "http://localhost:32000/gateway/api/v1/class/get?id=3d94607a0df14cebae4f4aa70ef4d0c1"
|
|
|
-// curl -X DELETE "http://localhost:32000/gateway/api/v1/class/delete?id=3d94607a0df14cebae4f4aa70ef4d0c1"
|
|
|
+// curl -X GET "http://localhost:32000/gateway/api/v1/class/get?id=5a1645efeff64852a41b28268b232209"
|
|
|
+// curl -X DELETE "http://localhost:32000/gateway/api/v1/class/delete?id=5a1645efeff64852a41b28268b232209"
|
|
|
|
|
|
// Student
|
|
|
// curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' "http://localhost:32000/gateway/api/v1/student/create"
|
|
|
@@ -78,8 +79,9 @@ import (
|
|
|
// curl -X GET "http://localhost:31000/example/api/v1/hobby/student/query?id=42b305bb292c4082a3e91a2967f11111"
|
|
|
|
|
|
// Sql Executor
|
|
|
-// curl -X POST -H 'Content-Type: application/json' -d '{"urlPrefix": "example", "sql": "SELECT * FROM test.sql_execute_logs", "executorId": "guest-00254b4a7102429db35e6edc8e", "executorName": "test"}' "http://localhost:32000/gateway/api/sql/execute"
|
|
|
-// curl -X GET "http://localhost:32000/gateway/api/sql/execute/log?urlPrefix=example&sql=SELECT&executorId=guest-00254b4a7102429db35e6edc8e&executorName=te&startExecuteTime=2024-05-30%2012:03:45"
|
|
|
+// curl -X POST -H 'Content-Type: application/json' -d '{"serviceShortName": "example", "sql": "SELECT * FROM test.sql_execute_logs", "executorId": "guest-00254b4a7102429db35e6edc8e"}' "http://localhost:32000/gateway/api/sql/execute"
|
|
|
+// curl -X GET "http://localhost:32000/gateway/api/sql/execute/log?serviceShortName=example&sql=SELECT&executorId=guest-00254b4a7102429db35e6edc8e&executorName=gue"
|
|
|
+// curl -X GET "http://localhost:32000/gateway/api/sql/execute/registered/services"
|
|
|
|
|
|
func main() {
|
|
|
api.NewGateway()
|