| 41 | } |
| 42 | |
| 43 | func (i *imlStrategyService) SearchAllByDriver(ctx context.Context, keyword string, driver string, scope int, target string) ([]*Strategy, error) { |
| 44 | w := make(map[string]interface{}) |
| 45 | w["scope"] = scope |
| 46 | if target != "" { |
| 47 | w["target"] = target |
| 48 | } |
| 49 | list, err := i.store.Search(ctx, keyword, w, "update_at") |
| 50 | if err != nil { |
| 51 | return nil, err |
| 52 | } |
| 53 | return utils.SliceToSlice(list, FromEntity), nil |
| 54 | } |
| 55 | |
| 56 | func (i *imlStrategyService) AllByDriver(ctx context.Context, driver string, scope int, target string) ([]*Strategy, error) { |
| 57 | w := make(map[string]interface{}) |