{"modulePath":"github.com/ericlocke/gophercloud","version":"v0.0.0-20201021153103-2f2c61ebc394","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, OS_USERID, or OS_TOKEN needs to be set.\")\n\tErrNoPassword = fmt.Errorf(\"Environment variable OS_PASSWORD or OS_TOKEN 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```\nAuthOptionsFromEnv fills out an AuthOptions structure from the environment variables: OS\\_AUTH\\_URL, OS\\_USERNAME, OS\\_USERID, OS\\_PASSWORD, OS\\_TENANT\\_ID, OS\\_TENANT\\_NAME, OS\\_DOMAIN\\_ID, OS\\_DOMAIN\\_NAME, OS\\_TOKEN.  It checks that (1) OS\\_AUTH\\_URL is set, (2) OS\\_USERNAME, OS\\_USERID, or OS\\_TOKEN is set, (3) OS\\_PASSWORD or OS\\_TOKEN is set.\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 NewBlockStorageV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBlockStorageV2 creates a ServiceClient that may be used to access the v2 block storage service.\n\n```go\nfunc NewCDNV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewCDNV1 creates a ServiceClient that may be used to access the OpenStack v1 CDN 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 NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewDBV1 creates a ServiceClient that may be used to access the v1 DB service.\n\n```go\nfunc NewIdentityAdminV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\n\n```go\nfunc NewIdentityAdminV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\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 NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewImageServiceV2 creates a ServiceClient that may be used to access the v2 image 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 NewOrchestrationV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewOrchestrationV1 creates a ServiceClient that may be used to access the v1 orchestration service.\n\n```go\nfunc NewTelemetryV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewTelemetryV2 creates a ServiceClient that may be used to access the v2 telemetry service.\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(catalog *tokens3.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error)\n```\nV3EndpointURL discovers the endpoint URL for a specific service from a Catalog acquired during the v3 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","path":"github.com/ericlocke/gophercloud/openstack","name":"openstack","synopsis":"","isRedistributable":true}
