Files
zmkgC/api/pilot/map/map.go
2025-07-07 20:11:59 +08:00

52 lines
1.5 KiB
Go

package _map
import (
"context"
"fmt"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
type MAP struct {
}
type Element_groupsReq struct {
g.Meta `path:"workspaces/{workspace_id}/element-groups" summary:"获取元素列表" method:"get" tags:"无人机遥控器"`
GroupId string `json:"group_id"`
IsDistributed bool `json:"is_distributed"`
}
type Element_groupsRes struct {
Id string `json:"id"`
Type int `json:"type"`
Name string `json:"name"`
IsLock bool `json:"is_lock"`
CreateTime int64 `json:"create_time"`
Elements []struct {
Id string `json:"id"`
Name string `json:"name"`
CreateTime int64 `json:"create_time"`
UpdateTime int64 `json:"update_time"`
Resource struct {
Type int `json:"type"`
UserName string `json:"user_name"`
Content struct {
Type string `json:"type"`
Properties struct {
Color string `json:"color"`
ClampToGround bool `json:"clampToGround"`
} `json:"properties"`
Geometry struct {
Type string `json:"type"`
Coordinates []interface{} `json:"coordinates"`
} `json:"geometry"`
} `json:"content"`
} `json:"resource"`
} `json:"elements"`
}
func (receiver MAP) Element_groups(ctx context.Context, req *Element_groupsReq) (res *Element_groupsRes, err error) {
workspace_id := ghttp.RequestFromCtx(ctx).Get("workspace_id")
fmt.Println("获取元素列表workspace_id", workspace_id)
return
}