vpcs

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vpcs manages VPCs through the VPC v1 API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, id string) error

Types

type CreateOpts

type CreateOpts struct {
	Name                string `json:"name,omitempty"`
	Description         string `json:"description,omitempty"`
	CIDR                string `json:"cidr,omitempty"`
	EnterpriseProjectID string `json:"enterprise_project_id,omitempty"`
}

type ListOpts

type ListOpts struct {
	ID                  string `q:"id,omitempty"`
	Marker              string `q:"marker,omitempty"`
	Limit               *int   `q:"limit,omitempty"`
	EnterpriseProjectID string `q:"enterprise_project_id,omitempty"`
}

type Route

type Route struct {
	NextHop         string `json:"nexthop,omitempty"`
	DestinationCIDR string `json:"destination,omitempty"`
}

type UpdateOpts

type UpdateOpts struct {
	Name             string  `json:"name,omitempty"`
	Description      *string `json:"description,omitempty"`
	CIDR             string  `json:"cidr,omitempty"`
	Routes           []Route `json:"routes,omitempty"`
	EnableSharedSnat *bool   `json:"enable_shared_snat,omitempty"`
}

type Vpc

type Vpc struct {
	ID                  string  `json:"id"`
	Name                string  `json:"name"`
	CIDR                string  `json:"cidr"`
	Description         string  `json:"description"`
	Status              string  `json:"status"`
	Routes              []Route `json:"routes"`
	EnterpriseProjectID string  `json:"enterprise_project_id"`
	EnableSharedSnat    bool    `json:"enable_shared_snat"`
	TenantId            string  `json:"tenant_id"`
	CreatedAt           string  `json:"created_at"`
	UpdatedAt           string  `json:"updated_at"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Vpc, error)

func ExtractVpcs

func ExtractVpcs(page pagination.NewPage) ([]Vpc, error)

func Get

func Get(client *golangsdk.ServiceClient, id string) (*Vpc, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Vpc, error)

func Update

func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Vpc, error)

type VpcPage

type VpcPage struct {
	pagination.NewPageResult
}

func (VpcPage) NewIsEmpty

func (p VpcPage) NewIsEmpty() (bool, error)

func (VpcPage) NewNextPageURL

func (p VpcPage) NewNextPageURL() (string, error)

Jump to

Keyboard shortcuts

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