Documentation
¶
Index ¶
- Constants
- func UnRegisterRegion(regionName string) (bool, error)
- type RegionInfo
- func GetRegion(regionName string) (*RegionInfo, error)
- func ListRegion() ([]*RegionInfo, error)
- func ListRegionByProvider(providerName string) ([]*RegionInfo, error)
- func RegisterRegion(regionName string, providerName string, keyValueInfoList []icdrs.KeyValue, ...) (*RegionInfo, error)
- func RegisterRegionInfo(rgnInfo RegionInfo) (*RegionInfo, error)
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 ¶
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 RegisterRegionInfo ¶
func RegisterRegionInfo(rgnInfo RegionInfo) (*RegionInfo, error)
1. check params 2. insert them into info-store
Click to show internal directories.
Click to hide internal directories.