| 47 | } |
| 48 | |
| 49 | func (i *imlServiceService) ServiceList(ctx context.Context, serviceIds ...string) ([]*Service, error) { |
| 50 | w := make(map[string]interface{}) |
| 51 | if len(serviceIds) > 0 { |
| 52 | w["uuid"] = serviceIds |
| 53 | } |
| 54 | w["as_server"] = true |
| 55 | w["is_delete"] = false |
| 56 | list, err := i.store.List(ctx, w) |
| 57 | if err != nil { |
| 58 | return nil, err |
| 59 | } |
| 60 | return utils.SliceToSlice(list, FromEntity), nil |
| 61 | } |
| 62 | |
| 63 | func (i *imlServiceService) ServiceListByKind(ctx context.Context, kind Kind, serviceIds ...string) ([]*Service, error) { |
| 64 | w := make(map[string]interface{}) |