(ctx context.Context, serviceId string)
| 109 | } |
| 110 | |
| 111 | func (i *imlRouterModule) SimpleList(ctx context.Context, serviceId string) ([]*router_dto.SimpleItem, error) { |
| 112 | |
| 113 | list, err := i.apiService.ListForService(ctx, serviceId) |
| 114 | apiInfos, err := i.apiService.ListInfo(ctx, utils.SliceToSlice(list, func(s *api.API) string { |
| 115 | return s.UUID |
| 116 | })...) |
| 117 | if err != nil { |
| 118 | return nil, err |
| 119 | } |
| 120 | |
| 121 | out := utils.SliceToSlice(apiInfos, func(item *api.Info) *router_dto.SimpleItem { |
| 122 | return &router_dto.SimpleItem{ |
| 123 | Id: item.UUID, |
| 124 | Path: item.Path, |
| 125 | } |
| 126 | }) |
| 127 | return out, nil |
| 128 | } |
| 129 | |
| 130 | func (i *imlRouterModule) Detail(ctx context.Context, serviceId string, apiId string) (*router_dto.Detail, error) { |
| 131 | _, err := i.serviceService.Check(ctx, serviceId, asServer) |
nothing calls this directly
no test coverage detected