| 61 | } |
| 62 | |
| 63 | func (i *imlServiceService) ServiceListByKind(ctx context.Context, kind Kind, serviceIds ...string) ([]*Service, error) { |
| 64 | w := make(map[string]interface{}) |
| 65 | if len(serviceIds) > 0 { |
| 66 | w["uuid"] = serviceIds |
| 67 | } |
| 68 | w["as_server"] = true |
| 69 | w["kind"] = kind.Int() |
| 70 | w["is_delete"] = false |
| 71 | list, err := i.store.List(ctx, w) |
| 72 | if err != nil { |
| 73 | return nil, err |
| 74 | } |
| 75 | return utils.SliceToSlice(list, FromEntity), nil |
| 76 | } |
| 77 | |
| 78 | func (i *imlServiceService) SearchPublicServices(ctx context.Context, keyword string) ([]*Service, error) { |
| 79 | w := map[string]interface{}{ |