{"modulePath":"github.com/rackspace/gophercloud","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package openstack\n\n## Variables\n\n```go\nvar (\n\tErrNoAuthURL  = fmt.Errorf(\"Environment variable OS_AUTH_URL needs to be set.\")\n\tErrNoUsername = fmt.Errorf(\"Environment variable OS_USERNAME needs to be set.\")\n\tErrNoPassword = fmt.Errorf(\"Environment variable OS_PASSWORD needs to be set.\")\n)\n```\nErrNoAuthUrl, ErrNoUsername, and ErrNoPassword errors indicate of the required OS\\_AUTH\\_URL, OS\\_USERNAME, or OS\\_PASSWORD environment variables, respectively, remain undefined.  See the AuthOptions() function for more details.\n\n## Functions\n\n```go\nfunc AuthOptionsFromEnv() (gophercloud.AuthOptions, error)\n```\nAuthOptions fills out an identity.AuthOptions structure with the settings found on the various OpenStack OS\\_\\* environment variables.  The following variables provide sources of truth: OS\\_AUTH\\_URL, OS\\_USERNAME, OS\\_PASSWORD, OS\\_TENANT\\_ID, and OS\\_TENANT\\_NAME.  Of these, OS\\_USERNAME, OS\\_PASSWORD, and OS\\_AUTH\\_URL must have settings, or an error will result.  OS\\_TENANT\\_ID and OS\\_TENANT\\_NAME are optional.\n\n```go\nfunc Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error\n```\nAuthenticate or re-authenticate against the most recent identity service supported at the provided endpoint.\n\n```go\nfunc AuthenticateV2(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error\n```\nAuthenticateV2 explicitly authenticates against the identity v2 endpoint.\n\n```go\nfunc AuthenticateV3(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error\n```\nAuthenticateV3 explicitly authenticates against the identity v3 service.\n\n```go\nfunc AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)\n```\nAuthenticatedClient logs in to an OpenStack cloud found at the identity endpoint specified by options, acquires a token, and returns a Client instance that's ready to operate. It first queries the root identity endpoint to determine which versions of the identity service are supported, then chooses the most recent identity service available to proceed.\n\n```go\nfunc NewBlockStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBlockStorageV1 creates a ServiceClient that may be used to access the v1 block storage service.\n\n```go\nfunc NewClient(endpoint string) (*gophercloud.ProviderClient, error)\n```\nNewClient prepares an unauthenticated ProviderClient instance. Most users will probably prefer using the AuthenticatedClient function instead. This is useful if you wish to explicitly control the version of the identity service that's used for authentication explicitly, for example.\n\n```go\nfunc NewComputeV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewComputeV2 creates a ServiceClient that may be used with the v2 compute package.\n\n```go\nfunc NewIdentityV2(client *gophercloud.ProviderClient) *gophercloud.ServiceClient\n```\nNewIdentityV2 creates a ServiceClient that may be used to interact with the v2 identity service.\n\n```go\nfunc NewIdentityV3(client *gophercloud.ProviderClient) *gophercloud.ServiceClient\n```\nNewIdentityV3 creates a ServiceClient that may be used to access the v3 identity service.\n\n```go\nfunc NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewNetworkV2 creates a ServiceClient that may be used with the v2 network package.\n\n```go\nfunc NewObjectStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewObjectStorageV1 creates a ServiceClient that may be used with the v1 object storage package.\n\n```go\nfunc V2EndpointURL(catalog *tokens2.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error)\n```\nV2EndpointURL discovers the endpoint URL for a specific service from a ServiceCatalog acquired during the v2 identity service. The specified EndpointOpts are used to identify a unique, unambiguous endpoint to return. It's an error both when multiple endpoints match the provided criteria and when none do. The minimum that can be specified is a Type, but you will also often need to specify a Name and/or a Region depending on what's available on your OpenStack deployment.\n\n```go\nfunc V3EndpointURL(v3Client *gophercloud.ServiceClient, opts gophercloud.EndpointOpts) (string, error)\n```\nV3EndpointURL discovers the endpoint URL for a specific service using multiple calls against an identity v3 service endpoint. The specified EndpointOpts are used to identify a unique, unambiguous endpoint to return. It's an error both when multiple endpoints match the provided criteria and when none do. The minimum that can be specified is a Type, but you will also often need to specify a Name and/or a Region depending on what's available on your OpenStack deployment.\n\n","path":"github.com/rackspace/gophercloud/openstack","name":"openstack","synopsis":"","isRedistributable":true}
