services

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2015 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package services provides information and interaction with the services API resource for the OpenStack Identity service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List enumerates the services available to a specific user.

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, serviceType string) CreateResult

Create adds a new service of the requested type to the catalog.

func (CreateResult) Extract

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

Extract interprets a GetResult, CreateResult or UpdateResult as a concrete Service. 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, serviceID string) DeleteResult

Delete removes an existing service. It either deletes all associated endpoints, or fails until all endpoints are deleted.

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult is the deferred result of a Get call.

func Get

func Get(client *gophercloud.ServiceClient, serviceID string) GetResult

Get returns additional information about a service, given its ID.

func (GetResult) Extract

func (r GetResult) Extract() (*Service, error)

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

type ListOpts

type ListOpts struct {
	ServiceType string `q:"type"`
	PerPage     int    `q:"perPage"`
	Page        int    `q:"page"`
}

ListOpts allows you to query the List method.

type Service

type Service struct {
	Description *string `json:"description,omitempty"`
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Type        string  `json:"type"`
}

Service is the result of a list or information query.

func ExtractServices

func ExtractServices(page pagination.Page) ([]Service, error)

ExtractServices extracts a slice of Services from a Collection acquired from List.

type ServicePage

type ServicePage struct {
	pagination.LinkedPageBase
}

ServicePage is a single page of Service results.

func (ServicePage) IsEmpty

func (p ServicePage) IsEmpty() (bool, error)

IsEmpty returns true if the page contains no results.

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, serviceID string, serviceType string) UpdateResult

Update changes the service type of an existing service.

func (UpdateResult) Extract

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

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

Jump to

Keyboard shortcuts

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