MCPcopy Create free account
hub / github.com/anchordotdev/cli / GetService

Method GetService

api/api.go:337–346  ·  view source on GitHub ↗
(ctx context.Context, orgSlug, serviceSlug string)

Source from the content-addressed store, hash-verified

335}
336
337func (s *Session) GetService(ctx context.Context, orgSlug, serviceSlug string) (*Service, error) {
338 var svc Service
339 if err := s.get(ctx, getServicePath(orgSlug, serviceSlug), &svc); err != nil {
340 if errors.Is(err, NotFoundErr) {
341 return nil, nil
342 }
343 return nil, err
344 }
345 return &svc, nil
346}
347
348func (s *Session) get(ctx context.Context, uri string, out any) error {
349 req, err := http.NewRequestWithContext(ctx, "GET", uri, nil)

Callers 5

initialSetupMethod · 0.80
TestSetupFunction · 0.80
TestLclFunction · 0.80
PerformMethod · 0.80

Calls 2

getMethod · 0.95
getServicePathFunction · 0.85

Tested by 2

TestSetupFunction · 0.64
TestLclFunction · 0.64