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

Method AllByDriver

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

Source from the content-addressed store, hash-verified

54}
55
56func (i *imlStrategyService) AllByDriver(ctx context.Context, driver string, scope int, target string) ([]*Strategy, error) {
57 w := make(map[string]interface{})
58 w["scope"] = scope
59 if target != "" {
60 w["target"] = target
61 }
62 w["driver"] = driver
63 list, err := i.store.List(ctx, w)
64 if err != nil {
65 return nil, err
66 }
67 return utils.SliceToSlice(list, FromEntity), nil
68}
69
70func (i *imlStrategyService) CommitStrategy(ctx context.Context, scope string, target string, strategyId string, data *Strategy) error {
71 key := scope

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected