MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Simple

Method Simple

module/service/iml.go:512–531  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

510}
511
512func (i *imlServiceModule) Simple(ctx context.Context) ([]*service_dto.SimpleServiceItem, error) {
513 w := make(map[string]interface{})
514 w["as_server"] = true
515
516 services, err := i.serviceService.Search(ctx, "", w)
517 if err != nil {
518 return nil, err
519 }
520
521 items := make([]*service_dto.SimpleServiceItem, 0, len(services))
522 for _, p := range services {
523 items = append(items, &service_dto.SimpleServiceItem{
524 Id: p.Id,
525 Name: p.Name,
526 Description: p.Description,
527 Team: auto.UUID(p.Team),
528 })
529 }
530 return items, nil
531}
532
533func (i *imlServiceModule) MySimple(ctx context.Context) ([]*service_dto.SimpleServiceItem, error) {
534 services, err := i.searchMyServices(ctx, "", "")

Callers

nothing calls this directly

Calls 1

SearchMethod · 0.65

Tested by

no test coverage detected