| 106 | } |
| 107 | |
| 108 | func (i *imlAPIService) ListInfoForService(ctx context.Context, serviceId string) ([]*Info, error) { |
| 109 | apis, err := i.store.List(ctx, map[string]interface{}{ |
| 110 | "service": serviceId, |
| 111 | }) |
| 112 | aids := utils.SliceToSlice(apis, func(a *api.API) int64 { |
| 113 | return a.Id |
| 114 | }) |
| 115 | list, err := i.apiInfoStore.List(ctx, map[string]interface{}{ |
| 116 | "service": serviceId, |
| 117 | "id": aids, |
| 118 | }) |
| 119 | if err != nil { |
| 120 | return nil, err |
| 121 | } |
| 122 | return utils.SliceToSlice(list, FromEntityInfo), nil |
| 123 | } |
| 124 | |
| 125 | func (i *imlAPIService) ListInfo(ctx context.Context, aids ...string) ([]*Info, error) { |
| 126 | w := map[string]interface{}{} |