(name, url, username, password, spaceGUID string)
| 74 | } |
| 75 | |
| 76 | func (repo CloudControllerServiceBrokerRepository) Create(name, url, username, password, spaceGUID string) error { |
| 77 | path := "/v2/service_brokers" |
| 78 | args := struct { |
| 79 | Name string `json:"name"` |
| 80 | URL string `json:"broker_url"` |
| 81 | Username string `json:"auth_username"` |
| 82 | Password string `json:"auth_password"` |
| 83 | SpaceGUID string `json:"space_guid,omitempty"` |
| 84 | }{ |
| 85 | name, |
| 86 | url, |
| 87 | username, |
| 88 | password, |
| 89 | spaceGUID, |
| 90 | } |
| 91 | bs, err := json.Marshal(args) |
| 92 | if err != nil { |
| 93 | return err |
| 94 | } |
| 95 | return repo.gateway.CreateResource(repo.config.APIEndpoint(), path, bytes.NewReader(bs)) |
| 96 | } |
| 97 | |
| 98 | func (repo CloudControllerServiceBrokerRepository) Update(serviceBroker models.ServiceBroker) (apiErr error) { |
| 99 | path := fmt.Sprintf("/v2/service_brokers/%s", serviceBroker.GUID) |
nothing calls this directly
no test coverage detected