endpoints

package
v0.0.0-...-d5be3fe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

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

This section is empty.

Functions

func List

List enumerates endpoints in a paginated collection, optionally filtered by ListOpts criteria.

Types

type CreateOpts

type CreateOpts struct {
	Availability gophercloud.Availability `json:"interface" required:"true"`
	Name         string                   `json:"name" required:"true"`
	Region       string                   `json:"region,omitempty"`
	URL          string                   `json:"url" required:"true"`
	ServiceID    string                   `json:"service_id" required:"true"`
}

CreateOpts contains the subset of Endpoint attributes that should be used to create an Endpoint.

func (CreateOpts) ToEndpointCreateMap

func (opts CreateOpts) ToEndpointCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToEndpointCreateMap() (map[string]interface{}, error)
}

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 CreateOptsBuilder) (r 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.

func (CreateResult) Extract

func (r CreateResult) Extract() (*Endpoint, error)

Extract interprets a GetResult, CreateResult or UpdateResult as a concrete Endpoint. An error is returned if the original call or the extraction failed.

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) (r DeleteResult)

Delete removes an endpoint from the service catalog.

type Endpoint

type Endpoint struct {
	ID           string                   `json:"id"`
	Availability gophercloud.Availability `json:"interface"`
	Name         string                   `json:"name"`
	Region       string                   `json:"region"`
	ServiceID    string                   `json:"service_id"`
	URL          string                   `json:"url"`
}

Endpoint describes the entry point for another service's API.

func ExtractEndpoints

func ExtractEndpoints(r pagination.Page) ([]Endpoint, error)

ExtractEndpoints extracts an Endpoint slice from a Page.

type EndpointPage

type EndpointPage struct {
	pagination.LinkedPageBase
}

EndpointPage is a single page of Endpoint results.

func (EndpointPage) IsEmpty

func (r 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.

func (ListOpts) ToEndpointListParams

func (opts ListOpts) ToEndpointListParams() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToEndpointListParams() (string, error)
}

type UpdateOpts

type UpdateOpts struct {
	Availability gophercloud.Availability `json:"interface,omitempty"`
	Name         string                   `json:"name,omitempty"`
	Region       string                   `json:"region,omitempty"`
	URL          string                   `json:"url,omitempty"`
	ServiceID    string                   `json:"service_id,omitempty"`
}

UpdateOpts contains the subset of Endpoint attributes that should be used to update an Endpoint.

func (UpdateOpts) ToEndpointUpdateMap

func (opts UpdateOpts) ToEndpointUpdateMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToEndpointUpdateMap() (map[string]interface{}, error)
}

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 UpdateOptsBuilder) (r UpdateResult)

Update changes an existing endpoint with new data.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*Endpoint, error)

Extract interprets a GetResult, CreateResult or UpdateResult as a concrete Endpoint. An error is returned if the original call or the extraction failed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL