@@ -8,47 +8,64 @@ import (
88)
99
1010func InitRouter () {
11- store := server .Group ("/store" )
12- store .Post ("/" , StoreController .Add )
11+ {
12+ manage := server .Group ("/manage" )
13+ store := manage .Group ("/store" )
14+ store .Post ("/" , StoreController .Add )
15+ store .Put ("/" , StoreController .Update )
16+ store .Get ("/list" , StoreController .List )
17+
18+ space := manage .Group ("/space" )
19+ space .Post ("/" , SpaceController .Add )
20+ space .Put ("/" , SpaceController .Update )
21+ space .Get ("/list" , SpaceController .List )
22+
23+ scene := manage .Group ("/scene" )
24+ scene .Post ("/" , SceneController .Add )
25+ scene .Put ("/" , SceneController .Update )
26+ scene .Get ("/list" , SceneController .List )
27+
28+ data := manage .Group ("/data" )
29+ data .Post ("/" , DataController .Add )
30+ data .Put ("/" , DataController .Update )
31+ data .Get ("/list" , DataController .List )
32+
33+ layer := manage .Group ("/layer" )
34+ layer .Post ("/" , LayerController .Add )
35+ layer .Put ("/" , LayerController .Update )
36+ layer .Get ("/list" , LayerController .List )
37+ }
1338
1439 space := server .Group ("/space" )
1540 space .Get ("/:spaceName" , SpaceController .SpaceInfo )
16- space .Post ("/" , SpaceController .Add )
1741
1842 scene := server .Group ("/scene" )
1943 scene .Get ("/:sceneId.json" , SceneController .SceneInfo )
2044 scene .Get ("/:sceneId/layers.json" , SceneController .SceneLayers )
2145 scene .Get ("/:sceneId" , SceneController .SceneInfo ).Name ("scene.info" )
22- scene .Post ("/" , SceneController .Add )
2346 scene .Get ("/:sceneId/layers/:layerName/extendxml.xml" , LayerController .GetLayerExtendXml )
2447
25- data := server .Group ("/data" )
26- data .Post ("/" , DataController .Add )
27-
28- layer := server .Group ("/layer" )
29- layer .Post ("/" , LayerController .Add )
30-
3148 // iserver适配
32- server .Get ("/giservices/:spaceName/rest/realspace/scenes.json" , SpaceController .SpaceInfo )
33- server .Get ("/giservices/:spaceName/rest/realspace/datas/:dataName/config" , LayerController .LayerConfig )
34- server .Get ("/giservices/:spaceName/rest/realspace/datas/:dataName/data/path/:fold/:file" ,
35- //etag.New(),
36- LayerController .TileFile )
37-
38- server .Get ("/giservices/:spaceName/rest/realspace/login.json" , func (ctx * fiber.Ctx ) error {
39- return ctx .JSON (fiber.Map {
40- "random" : util .SnowflakeIdString (),
41- "jsessionID" : util .SnowflakeIdString (),
49+ {
50+ server .Get ("/giservices/:spaceName/rest/realspace/scenes.json" , SpaceController .SpaceInfo )
51+ server .Get ("/giservices/:spaceName/rest/realspace/datas/:dataName/config" , LayerController .LayerConfig )
52+ server .Get ("/giservices/:spaceName/rest/realspace/datas/:dataName/data/path/:fold/:file" , LayerController .TileFile )
53+
54+ server .Get ("/giservices/:spaceName/rest/realspace/login.json" , func (ctx * fiber.Ctx ) error {
55+ return ctx .JSON (fiber.Map {
56+ "random" : util .SnowflakeIdString (),
57+ "jsessionID" : util .SnowflakeIdString (),
58+ })
59+ })
60+ server .Post ("/giservices/:spaceName/rest/realspace/login.json" , func (ctx * fiber.Ctx ) error {
61+ return ctx .JSON (fiber.Map {
62+ "postResultType" : "CreateChild" ,
63+ "succeed" : true ,
64+ })
4265 })
43- })
44- server .Post ("/giservices/:spaceName/rest/realspace/login.json" , func (ctx * fiber.Ctx ) error {
45- return ctx .JSON (fiber.Map {
46- "postResultType" : "CreateChild" ,
47- "succeed" : true ,
66+ server .Get ("/giservices/:spaceName/rest/realspace/_setup.json" , func (ctx * fiber.Ctx ) error {
67+ ctx .Response ().Header .SetContentType (fiber .MIMEApplicationJSONCharsetUTF8 )
68+ return ctx .SendString (`{"isCloudLicenseLogin":false,"serviceLanguage":"chinese","isUGODllError":false,"licenseMode":"DefaultLicense","iserverFeaturesPackageType":"ALL","isEduLicense":false,"isLicenseFinished":true,"isServiceNode":false,"isExpress":false,"cloudLicenseSetting":null,"computerName":"iZ25gt8gjcwZ","cloudLicenseValid":false,"isLicenseError":false,"licErrorMsg":"","iserverLicenseInfo":{"cloudLicenseSetting":null,"isCloudLicenseLogin":false,"entryInfos":[{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21002","licenseID":21002,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21007","licenseID":21007,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21004","licenseID":21004,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21006","licenseID":21006,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21003","licenseID":21003,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21005","licenseID":21005,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21010","licenseID":21010,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21009","licenseID":21009,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21011","licenseID":21011,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21014","licenseID":21014,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21012","licenseID":21012,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21013","licenseID":21013,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21015","licenseID":21015,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0}],"productVersion":null,"iserverVersion":"SuperMap iServer高级版","summaryInfo":null,"companyName":"SuperMap","isEduLicense":false,"masterServerAddress":null,"user":"SuperMap","licenseServer":null,"isSuperMapStaff":false},"isSuperMapStaff":false,"serviceLanguages":[],"eduLicenseSetting":null,"isExtendModule":false,"javaActualVersion":"1.8.0_332","iserverUGOVersion":"11.0.1.21420","webLicenseValid":true,"eduLicenseValid":true,"isSupportHardwareLicMode":true,"isPortal":false,"stepParam":null,"systemUGOVersion":"11.0.1.21420","isAdminExist":true,"coreLicExtendExist":false,"isAix":false,"isJDKVersionError":false,"isUGOVersionError":false,"javaExpectedVersion":"1.8","coreLicExistButUnavailable":false}` )
4869 })
49- })
50- server .Get ("/giservices/:spaceName/rest/realspace/_setup.json" , func (ctx * fiber.Ctx ) error {
51- ctx .Response ().Header .SetContentType (fiber .MIMEApplicationJSONCharsetUTF8 )
52- return ctx .SendString (`{"isCloudLicenseLogin":false,"serviceLanguage":"chinese","isUGODllError":false,"licenseMode":"DefaultLicense","iserverFeaturesPackageType":"ALL","isEduLicense":false,"isLicenseFinished":true,"isServiceNode":false,"isExpress":false,"cloudLicenseSetting":null,"computerName":"iZ25gt8gjcwZ","cloudLicenseValid":false,"isLicenseError":false,"licErrorMsg":"","iserverLicenseInfo":{"cloudLicenseSetting":null,"isCloudLicenseLogin":false,"entryInfos":[{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21002","licenseID":21002,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21007","licenseID":21007,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21004","licenseID":21004,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21006","licenseID":21006,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21003","licenseID":21003,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21005","licenseID":21005,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21010","licenseID":21010,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21009","licenseID":21009,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21011","licenseID":21011,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21014","licenseID":21014,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21012","licenseID":21012,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21013","licenseID":21013,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0},{"expireDateTime":"2026-11-12","useWith":-1,"licenseStatus":true,"licenseModel":null,"expireDate":{"date":12,"hours":23,"seconds":59,"month":10,"year":126,"minutes":59,"time":1794499199704},"hardwareKeyType":null,"licenseName":"21015","licenseID":21015,"isTrial":false,"userTrademark":"SuperMap","watermarkMode":0}],"productVersion":null,"iserverVersion":"SuperMap iServer高级版","summaryInfo":null,"companyName":"SuperMap","isEduLicense":false,"masterServerAddress":null,"user":"SuperMap","licenseServer":null,"isSuperMapStaff":false},"isSuperMapStaff":false,"serviceLanguages":[],"eduLicenseSetting":null,"isExtendModule":false,"javaActualVersion":"1.8.0_332","iserverUGOVersion":"11.0.1.21420","webLicenseValid":true,"eduLicenseValid":true,"isSupportHardwareLicMode":true,"isPortal":false,"stepParam":null,"systemUGOVersion":"11.0.1.21420","isAdminExist":true,"coreLicExtendExist":false,"isAix":false,"isJDKVersionError":false,"isUGOVersionError":false,"javaExpectedVersion":"1.8","coreLicExistButUnavailable":false}` )
53- })
70+ }
5471}
0 commit comments