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

Method ListInfoForService

service/api/iml.go:108–123  ·  view source on GitHub ↗
(ctx context.Context, serviceId string)

Source from the content-addressed store, hash-verified

106}
107
108func (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
125func (i *imlAPIService) ListInfo(ctx context.Context, aids ...string) ([]*Info, error) {
126 w := map[string]interface{}{}

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected