regioninfomanager

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const KEY_COLUMN_NAME = "region_name"

====================================================================

View Source
const PROVIDER_NAME_COLUMN = "provider_name"

Variables

This section is empty.

Functions

func UnRegisterRegion

func UnRegisterRegion(regionName string) (bool, error)

Types

type RegionInfo

type RegionInfo struct {
	RegionName        string           `json:"RegionName" gorm:"primaryKey" validate:"required" example:"region01"` // The name of the region, used as a unique identifier.
	ProviderName      string           `json:"ProviderName" validate:"required" example:"GCP"`                      // The name of the cloud provider (e.g., AWS, Azure, GCP).
	KeyValueInfoList  infostore.KVList `json:"KeyValueInfoList" gorm:"type:text" validate:"required"`               // Key-value pairs representing region details.
	AvailableZoneList infostore.AZList `json:"AvailableZoneList" gorm:"type:text" validate:"required"`              // A list of available zones within the region.
}

RegionInfo represents the information of a cloud region. @Description Information about a specific cloud region and its associated zones.

func GetRegion

func GetRegion(regionName string) (*RegionInfo, error)

1. check params 2. get RegionIfno from info-store

func ListRegion

func ListRegion() ([]*RegionInfo, error)

func ListRegionByProvider added in v0.9.1

func ListRegionByProvider(providerName string) ([]*RegionInfo, error)

func RegisterRegion

func RegisterRegion(regionName string, providerName string, keyValueInfoList []icdrs.KeyValue, AZList []string) (*RegionInfo, error)

func RegisterRegionInfo

func RegisterRegionInfo(rgnInfo RegionInfo) (*RegionInfo, error)

1. check params 2. insert them into info-store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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