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

Method AttachService

api/api.go:112–124  ·  view source on GitHub ↗
(ctx context.Context, chainSlug string, domains []string, orgSlug, realmSlug, serviceSlug string)

Source from the content-addressed store, hash-verified

110}
111
112func (s *Session) AttachService(ctx context.Context, chainSlug string, domains []string, orgSlug, realmSlug, serviceSlug string) (*ServicesXtach200, error) {
113 attachInput := AttachOrgServiceJSONRequestBody{
114 Domains: domains,
115 }
116 attachInput.Relationships.Chain.Slug = chainSlug
117 attachInput.Relationships.Realm.Slug = realmSlug
118
119 var attachOutput ServicesXtach200
120 if err := s.post(ctx, attachServicePath(orgSlug, serviceSlug), attachInput, &attachOutput); err != nil {
121 return nil, err
122 }
123 return &attachOutput, nil
124}
125
126func getServiceAttachmentsPath(orgAPID, serviceAPID string) string {
127 return fmt.Sprintf("/orgs/%s/services/%s/attachments", url.QueryEscape(orgAPID), url.QueryEscape(serviceAPID))

Callers 2

initialSetupMethod · 0.80
diagnosticServerMethod · 0.80

Calls 2

postMethod · 0.95
attachServicePathFunction · 0.85

Tested by

no test coverage detected