zonal

package
v2.41.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrZoneNotFound = errors.New("could not detect zone. Scaleway uses regions and zones. For more information, refer to https://www.terraform.io/docs/providers/scaleway/guides/regions_and_zones.html")

ErrZoneNotFound is returned when no zone can be detected

Functions

func AllZones

func AllZones() []string

func ComputedSchema

func ComputedSchema() *schema.Schema

ComputedSchema returns a standard schema for a zone

func NewIDString

func NewIDString(zone scw.Zone, id string) string

NewIDString constructs a unique identifier based on resource zone and id

func NewNestedIDString

func NewNestedIDString(zone scw.Zone, outerID, innerID string) string

NewNestedIDString constructs a unique identifier based on resource zone, inner and outer IDs

func ParseID

func ParseID(zonedID string) (zone scw.Zone, id string, err error)

ParseID parses a zonedID and extracts the resource zone and id.

func ParseNestedID

func ParseNestedID(zonedNestedID string) (zone scw.Zone, outerID, innerID string, err error)

ParseNestedID parses a zonedNestedID and extracts the resource zone ,inner and outer ID.

func Schema

func Schema() *schema.Schema

Schema returns a standard schema for a zone

Types

type ID

type ID struct {
	ID   string
	Zone scw.Zone
}

ID represents an ID that is linked with a zone, eg fr-par-1/11111111-1111-1111-1111-111111111111

func ExpandID

func ExpandID(id interface{}) ID

func NewID

func NewID(zone scw.Zone, id string) ID

func (ID) String

func (z ID) String() string

Jump to

Keyboard shortcuts

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