MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / DefaultCatalogue

Method DefaultCatalogue

module/catalogue/iml.go:81–97  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

79}
80
81func (i *imlCatalogueModule) DefaultCatalogue(ctx context.Context) (*catalogue_dto.Catalogue, error) {
82 catalogues, err := i.catalogueService.List(ctx)
83 if err != nil {
84 return nil, err
85 }
86 for _, v := range catalogues {
87 if v.Parent == "" {
88 return &catalogue_dto.Catalogue{
89 Id: v.Id,
90 Name: v.Name,
91 Parent: v.Parent,
92 Sort: v.Sort,
93 }, nil
94 }
95 }
96 return nil, errors.New("no default catalogue")
97}
98
99func (i *imlCatalogueModule) onlineSubscriber(ctx context.Context, clusterId string, sub *gateway.SubscribeRelease) error {
100 client, err := i.clusterService.GatewayClient(ctx, clusterId)

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected