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

Method All

service/strategy/iml.go:25–36  ·  view source on GitHub ↗
(ctx context.Context, scope int, target string)

Source from the content-addressed store, hash-verified

23}
24
25func (i *imlStrategyService) All(ctx context.Context, scope int, target string) ([]*Strategy, error) {
26 w := make(map[string]interface{})
27 w["scope"] = scope
28 if target != "" {
29 w["target"] = target
30 }
31 list, err := i.store.List(ctx, w)
32 if err != nil {
33 return nil, err
34 }
35 return utils.SliceToSlice(list, FromEntity), nil
36}
37
38func (i *imlStrategyService) Restore(ctx context.Context, id string) error {
39 _, err := i.store.UpdateWhere(ctx, map[string]interface{}{"uuid": id}, map[string]interface{}{"is_delete": false})

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected