MCPcopy Index your code
hub / github.com/cloudfoundry/cli / CreateSharedDomain

Method CreateSharedDomain

cf/api/domains.go:139–154  ·  view source on GitHub ↗
(domainName string, routerGroupGUID string)

Source from the content-addressed store, hash-verified

137}
138
139func (repo CloudControllerDomainRepository) CreateSharedDomain(domainName string, routerGroupGUID string) error {
140 data, err := json.Marshal(resources.DomainEntity{
141 Name: domainName,
142 RouterGroupGUID: routerGroupGUID,
143 Wildcard: true,
144 })
145 if err != nil {
146 return err
147 }
148
149 return repo.gateway.CreateResource(
150 repo.config.APIEndpoint(),
151 "/v2/shared_domains",
152 bytes.NewReader(data),
153 )
154}
155
156func (repo CloudControllerDomainRepository) Delete(domainGUID string) error {
157 path := fmt.Sprintf("/v2/private_domains/%s?recursive=true", domainGUID)

Callers

nothing calls this directly

Calls 2

CreateResourceMethod · 0.80
APIEndpointMethod · 0.65

Tested by

no test coverage detected