1package openstack
2
3import (
4	"fmt"
5
6	"github.com/gophercloud/gophercloud"
7)
8
9// ErrEndpointNotFound is the error when no suitable endpoint can be found
10// in the user's catalog
11type ErrEndpointNotFound struct{ gophercloud.BaseError }
12
13func (e ErrEndpointNotFound) Error() string {
14	return "No suitable endpoint could be found in the service catalog."
15}
16
17// ErrInvalidAvailabilityProvided is the error when an invalid endpoint
18// availability is provided
19type ErrInvalidAvailabilityProvided struct{ gophercloud.ErrInvalidInput }
20
21func (e ErrInvalidAvailabilityProvided) Error() string {
22	return fmt.Sprintf("Unexpected availability in endpoint query: %s", e.Value)
23}
24
25// ErrNoAuthURL is the error when the OS_AUTH_URL environment variable is not
26// found
27type ErrNoAuthURL struct{ gophercloud.ErrInvalidInput }
28
29func (e ErrNoAuthURL) Error() string {
30	return "Environment variable OS_AUTH_URL needs to be set."
31}
32
33// ErrNoUsername is the error when the OS_USERNAME environment variable is not
34// found
35type ErrNoUsername struct{ gophercloud.ErrInvalidInput }
36
37func (e ErrNoUsername) Error() string {
38	return "Environment variable OS_USERNAME needs to be set."
39}
40
41// ErrNoPassword is the error when the OS_PASSWORD environment variable is not
42// found
43type ErrNoPassword struct{ gophercloud.ErrInvalidInput }
44
45func (e ErrNoPassword) Error() string {
46	return "Environment variable OS_PASSWORD needs to be set."
47}
48