Documentation ¶
Overview ¶
Package endpoints provides information and interaction with the service endpoints API resource in the OpenStack Identity service.
For more information, see: http://developer.openstack.org/api-ref-identity-v3.html#endpoints-v3
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAvailabilityRequired is reported if an Endpoint is created without an Availability. ErrAvailabilityRequired = requiredAttribute("an availability") // ErrNameRequired is reported if an Endpoint is created without a Name. ErrNameRequired = requiredAttribute("a name") // ErrURLRequired is reported if an Endpoint is created without a URL. ErrURLRequired = requiredAttribute("a URL") // ErrServiceIDRequired is reported if an Endpoint is created without a ServiceID. ErrServiceIDRequired = requiredAttribute("a serviceID") )
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOpts) pagination.Pager
List enumerates endpoints in a paginated collection, optionally filtered by ListOpts criteria.
Types ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the deferred result of a Create call.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts EndpointOpts) CreateResult
Create inserts a new Endpoint into the service catalog. Within EndpointOpts, Region may be omitted by being left as "", but all other fields are required.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult is the deferred result of an Delete call.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, endpointID string) DeleteResult
Delete removes an endpoint from the service catalog.
type Endpoint ¶
type Endpoint struct { ID string `mapstructure:"id" json:"id"` Availability gophercloud.Availability `mapstructure:"interface" json:"interface"` Name string `mapstructure:"name" json:"name"` Region string `mapstructure:"region" json:"region"` ServiceID string `mapstructure:"service_id" json:"service_id"` URL string `mapstructure:"url" json:"url"` }
Endpoint describes the entry point for another service's API.
func ExtractEndpoints ¶
func ExtractEndpoints(page pagination.Page) ([]Endpoint, error)
ExtractEndpoints extracts an Endpoint slice from a Page.
type EndpointOpts ¶
type EndpointOpts struct { Availability gophercloud.Availability Name string Region string URL string ServiceID string }
EndpointOpts contains the subset of Endpoint attributes that should be used to create or update an Endpoint.
type EndpointPage ¶
type EndpointPage struct {
pagination.LinkedPageBase
}
EndpointPage is a single page of Endpoint results.
func (EndpointPage) IsEmpty ¶
func (p EndpointPage) IsEmpty() (bool, error)
IsEmpty returns true if no Endpoints were returned.
type ListOpts ¶
type ListOpts struct { Availability gophercloud.Availability `q:"interface"` ServiceID string `q:"service_id"` Page int `q:"page"` PerPage int `q:"per_page"` }
ListOpts allows finer control over the endpoints returned by a List call. All fields are optional.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult is the deferred result of an Update call.
func Update ¶
func Update(client *gophercloud.ServiceClient, endpointID string, opts EndpointOpts) UpdateResult
Update changes an existing endpoint with new data. All fields are optional in the provided EndpointOpts.