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

Method Set

gateway/apinto/plugin.go:28–41  ·  view source on GitHub ↗
(ctx context.Context, configs []*gateway.PluginConfig)

Source from the content-addressed store, hash-verified

26}
27
28func (p *PluginSettingClient) Set(ctx context.Context, configs []*gateway.PluginConfig) error {
29 globalPlugins := make([]*plugin.GlobalPlugin, 0, len(configs))
30 for _, cfg := range configs {
31 globalPlugins = append(globalPlugins, &plugin.GlobalPlugin{
32 Config: cfg.Config,
33 Id: cfg.Id,
34 Name: cfg.Name,
35 Status: cfg.Status,
36 })
37 }
38 return p.client.SSet(ctx, "plugin", map[string]interface{}{
39 "plugins": globalPlugins,
40 })
41}
42
43func NewPluginSettingClient(client admin_client.Client) *PluginSettingClient {
44 return &PluginSettingClient{client: client}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected