projectendpoints

package
v1.1.40 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package endpoints provides information and interaction with the service OS-EP-FILTER/endpoints API resource in the OpenStack Identity service.

For more information, see: https://docs.openstack.org/api-ref/identity/v3-ext/#list-associations-by-project

Example to List Project Endpoints

projectD := "e629d6e599d9489fb3ae5d9cc12eaea3"

allPages, err := projectendpoints.List(identityClient, projectID).AllPages()
if err != nil {
	panic(err)
}

allEndpoints, err := projectendpoints.ExtractEndpoints(allPages)
if err != nil {
	panic(err)
}

for _, endpoint := range allEndpoints {
	fmt.Printf("%+v\n", endpoint)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *gophercloud.ServiceClient, projectID string) pagination.Pager

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

Types

type CreateOptsBuilder

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

type CreateResult

type CreateResult struct {
	gophercloud.ErrResult
}

CreateResult is the response from a Create operation. Call its Extract method to interpret it as an Endpoint.

func Create

func Create(client *gophercloud.ServiceClient, projectID, endpointID string) (r CreateResult)

Create inserts a new Endpoint association to a project.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult is the response from a Delete operation. Call its ExtractErr method to determine if the call succeeded or failed.

func Delete

func Delete(client *gophercloud.ServiceClient, projectID string, endpointID string) (r DeleteResult)

Delete removes an endpoint from the service catalog.

type Endpoint

type Endpoint struct {
	// ID is the unique ID of the endpoint.
	ID string `json:"id"`

	// Availability is the interface type of the Endpoint (admin, internal,
	// or public), referenced by the gophercloud.Availability type.
	Availability gophercloud.Availability `json:"interface"`

	// Region is the region the Endpoint is located in.
	Region string `json:"region"`

	// ServiceID is the ID of the service the Endpoint refers to.
	ServiceID string `json:"service_id"`

	// URL is the url of the Endpoint.
	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.

Directories

Path Synopsis
projectendpoints unit tests
projectendpoints unit tests

Jump to

Keyboard shortcuts

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