Move deps from _workspace/ to vendor/
godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
This commit is contained in:
32
vendor/github.com/rackspace/gophercloud/service_client.go
generated
vendored
Normal file
32
vendor/github.com/rackspace/gophercloud/service_client.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package gophercloud
|
||||
|
||||
import "strings"
|
||||
|
||||
// ServiceClient stores details required to interact with a specific service API implemented by a provider.
|
||||
// Generally, you'll acquire these by calling the appropriate `New` method on a ProviderClient.
|
||||
type ServiceClient struct {
|
||||
// ProviderClient is a reference to the provider that implements this service.
|
||||
*ProviderClient
|
||||
|
||||
// Endpoint is the base URL of the service's API, acquired from a service catalog.
|
||||
// It MUST end with a /.
|
||||
Endpoint string
|
||||
|
||||
// ResourceBase is the base URL shared by the resources within a service's API. It should include
|
||||
// the API version and, like Endpoint, MUST end with a / if set. If not set, the Endpoint is used
|
||||
// as-is, instead.
|
||||
ResourceBase string
|
||||
}
|
||||
|
||||
// ResourceBaseURL returns the base URL of any resources used by this service. It MUST end with a /.
|
||||
func (client *ServiceClient) ResourceBaseURL() string {
|
||||
if client.ResourceBase != "" {
|
||||
return client.ResourceBase
|
||||
}
|
||||
return client.Endpoint
|
||||
}
|
||||
|
||||
// ServiceURL constructs a URL for a resource belonging to this provider.
|
||||
func (client *ServiceClient) ServiceURL(parts ...string) string {
|
||||
return client.ResourceBaseURL() + strings.Join(parts, "/")
|
||||
}
|
Reference in New Issue
Block a user