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

Method DynamicModuleApis

plugins/core/dynamic-module.go:9–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7)
8
9func (p *plugin) DynamicModuleApis() []pm3.Api {
10 return []pm3.Api{
11 pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/dynamic/:name/info", []string{"context", "rest:name", "query:id"}, []string{"info"}, p.dynamicModuleController.Get),
12 pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/dynamic/:name/list", []string{"context", "rest:name", "query:keyword", "query:partitions", "query:page", "query:pageSize"}, []string{"list", "basic", "total"}, p.dynamicModuleController.List),
13 pm3.CreateApiWidthDoc(http.MethodPost, "/api/v1/dynamic/:name", []string{"context", "rest:name", "body"}, []string{"info"}, p.dynamicModuleController.Create),
14 pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/dynamic/:name/config", []string{"context", "rest:name", "query:id", "body"}, []string{"info"}, p.dynamicModuleController.Edit),
15 pm3.CreateApiWidthDoc(http.MethodDelete, "/api/v1/dynamic/:name/batch", []string{"context", "rest:name", "query:ids"}, nil, p.dynamicModuleController.Delete),
16 pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/dynamic/:name/render", []string{"context", "rest:name"}, []string{"basic", "render"}, p.dynamicModuleController.Render),
17 pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/simple/dynamics/:group", []string{"context", "rest:group"}, []string{"dynamics"}, p.dynamicModuleController.ModuleDrivers),
18 pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/dynamic/:name/online", []string{"context", "rest:name", "query:id"}, nil, p.dynamicModuleController.Online),
19 pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/dynamic/:name/offline", []string{"context", "rest:name", "query:id"}, nil, p.dynamicModuleController.Offline),
20 }
21}

Callers 1

OnCompleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected