interconnections

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractInterconnectionssInto

func ExtractInterconnectionssInto(r pagination.Page, v any) error

func List

List makes a request against the API to list interconnections accessible to you.

Types

type CreateOpts

type CreateOpts struct {
	Name                    string `json:"name,omitempty"`
	ProjectID               string `json:"project_id,omitempty"`
	Type                    string `json:"type,omitempty"`
	LocalResourceID         string `json:"local_resource_id"`
	RemoteResourceID        string `json:"remote_resource_id"`
	RemoteRegion            string `json:"remote_region"`
	RemoteInterconnectionID string `json:"remote_interconnection_id,omitempty"`
}

CreateOpts represents options used to create an interconnection.

func (CreateOpts) ToInterconnectionCreateMap

func (opts CreateOpts) ToInterconnectionCreateMap() (map[string]any, error)

ToInterconnectionCreateMap formats a CreateOpts into a map.

type CreateOptsBuilder

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

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

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

CreateResult represents the result of a create operation.

func Create

Create creates a new interconnection.

func (CreateResult) Extract

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

Extract will extract a response object from a result.

func (CreateResult) ExtractInto

func (r CreateResult) ExtractInto(v any) error

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func Delete

func Delete(c *gophercloud.ServiceClient, id string) (r DeleteResult)

Delete deletes an interconnection.

type GetResult

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

GetResult represents the result of a get operation.

func Get

func Get(c *gophercloud.ServiceClient, id string) (r GetResult)

Get retrieves a specific interconnection based on its ID.

func (GetResult) Extract

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

Extract will extract a response object from a result.

func (GetResult) ExtractInto

func (r GetResult) ExtractInto(v any) error

type Interconnection

type Interconnection struct {
	ID                      string     `json:"id"`
	Name                    string     `json:"name"`
	ProjectID               string     `json:"project_id"`
	TenantID                string     `json:"tenant_id"`
	Type                    string     `json:"type"`
	State                   string     `json:"state"`
	LocalResourceID         string     `json:"local_resource_id"`
	RemoteResourceID        string     `json:"remote_resource_id"`
	RemoteRegion            string     `json:"remote_region"`
	RemoteInterconnectionID string     `json:"remote_interconnection_id"`
	LocalParameters         Parameters `json:"local_parameters"`
	RemoteParameters        Parameters `json:"remote_parameters"`
}

Interconnection represents the structure of an interconnection object.

func ExtractInterconnections

func ExtractInterconnections(r pagination.Page) ([]Interconnection, error)

ExtractInterconnections accepts a Page struct, specifically a InterconnectionPage struct, and extracts the elements into a slice of Interconnection structs. In other words, a generic collection is mapped into a relevant slice.

type InterconnectionPage

type InterconnectionPage struct {
	pagination.MarkerPageBase
}

InterconnectionPage

func (InterconnectionPage) IsEmpty

func (r InterconnectionPage) IsEmpty() (bool, error)

IsEmpty checks whether a Interconnection struct is empty.

func (InterconnectionPage) LastMarker

func (r InterconnectionPage) LastMarker() (string, error)

LastMarker returns the last offset in a ListResult.

func (InterconnectionPage) NextPageURL

func (r InterconnectionPage) NextPageURL() (string, error)

NextPageURL is invoked when a paginated collection of interconnections has reached the end of a page and the pager seeks to traverse to the next page.

type ListOpts

type ListOpts struct {
	ID                      []string `q:"id"`
	State                   []string `q:"state"`
	ProjectID               []string `q:"project_id"`
	Name                    []string `q:"name"`
	Type                    []string `q:"type"`
	LocalResourceID         []string `q:"local_resource_id"`
	RemoteResourceID        []string `q:"remote_resource_id"`
	RemoteRegion            []string `q:"remote_region"`
	RemoteInterconnectionID []string `q:"remote_interconnection_id"`
	Fields                  []string `q:"fields"`
	Limit                   int      `q:"limit"`
	Marker                  string   `q:"marker"`
}

ListOpts allows the filtering and sorting of paginated collections through the API.

func (ListOpts) ToInterconnectionListQuery

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

ToInterconnectionListQuery formats a ListOpts into a query string.

type ListOptsBuilder

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

ListOptsBuilder allows extensions to add additional parameters to the List request.

type Parameters

type Parameters struct {
	ProjectID []string `json:"project_id"`
}

Parameter represents the structure of a parameter object.

type UpdateOpts

type UpdateOpts struct {
	Name                    *string `json:"name,omitempty"`
	State                   *string `json:"state,omitempty"`
	RemoteInterconnectionID *string `json:"remote_interconnection_id,omitempty"`
}

UpdateOpts represents options used to update an interconnection.

func (UpdateOpts) ToInterconnectionUpdateMap

func (opts UpdateOpts) ToInterconnectionUpdateMap() (map[string]any, error)

ToInterconnectionUpdateMap formats an UpdateOpts into a map.

type UpdateOptsBuilder

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

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

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

UpdateResult represents the result of an update operation.

func Update

Update allows interconnections to be updated.

func (UpdateResult) Extract

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

Extract will extract a response object from a result.

func (UpdateResult) ExtractInto

func (r UpdateResult) ExtractInto(v any) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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