| 121 | } |
| 122 | |
| 123 | func (i *imlCatalogueModule) ExportAll(ctx context.Context) ([]*catalogue_dto.ExportCatalogue, error) { |
| 124 | list, err := i.catalogueService.List(ctx) |
| 125 | if err != nil { |
| 126 | return nil, err |
| 127 | } |
| 128 | |
| 129 | return utils.SliceToSlice(list, func(c *catalogue.Catalogue) *catalogue_dto.ExportCatalogue { |
| 130 | return &catalogue_dto.ExportCatalogue{ |
| 131 | Id: c.Id, |
| 132 | Name: c.Name, |
| 133 | Parent: c.Parent, |
| 134 | Sort: c.Sort, |
| 135 | } |
| 136 | }), nil |
| 137 | } |
| 138 | |
| 139 | func (i *imlCatalogueModule) getExecutor(ctx context.Context, clusterId string) (driver.IExecutor, error) { |
| 140 | info, err := i.monitorService.GetByCluster(ctx, clusterId) |