MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / List

Method List

controller/dynamic-module/iml.go:82–109  ·  view source on GitHub ↗
(ctx *gin.Context, module string, keyword string, clusterId string, page string, pageSize string)

Source from the content-addressed store, hash-verified

80}
81
82func (i *imlDynamicModuleController) List(ctx *gin.Context, module string, keyword string, clusterId string, page string, pageSize string) ([]map[string]interface{}, *dynamic_module_dto.PluginInfo, int64, error) {
83 p, err := strconv.Atoi(page)
84 if err != nil {
85 p = 1
86 }
87 ps, err := strconv.Atoi(pageSize)
88 if err != nil {
89 ps = 20
90
91 }
92 list, total, err := i.module.List(ctx, module, keyword, p, ps)
93 if err != nil {
94 return nil, nil, 0, err
95 }
96 //if clusterId == "" {
97 // clusterId = "[]"
98 //}
99 //ids := make([]string, 0)
100 //err = json.Unmarshal([]byte(clusterId), &ids)
101 //if err != nil {
102 // return nil, nil, 0, err
103 //}
104 plugin, err := i.module.PluginInfo(ctx, module)
105 if err != nil {
106 return nil, nil, 0, err
107 }
108 return list, plugin, total, nil
109}

Callers

nothing calls this directly

Calls 2

ListMethod · 0.65
PluginInfoMethod · 0.65

Tested by

no test coverage detected