@@ -10,6 +10,12 @@ import (
|
||||
)
|
||||
|
||||
// listRegions 返回本地维护的完整区域表(含友好名称),不发起云端请求。
|
||||
//
|
||||
// @Summary 返回本地维护的完整区域表
|
||||
// @Tags 租户配置
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/regions [get]
|
||||
func listRegions(c *gin.Context) {
|
||||
regions, err := oci.AllRegions()
|
||||
if err != nil {
|
||||
@@ -19,6 +25,12 @@ func listRegions(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, regions)
|
||||
}
|
||||
|
||||
// @Summary 区域订阅列表
|
||||
// @Tags 租户配置
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/region-subscriptions [get]
|
||||
func (h *ociConfigHandler) regionSubscriptions(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -36,6 +48,13 @@ type subscribeRegionRequest struct {
|
||||
RegionKey string `json:"regionKey" binding:"required"`
|
||||
}
|
||||
|
||||
// @Summary 订阅新区域
|
||||
// @Tags 租户配置
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Param body body subscribeRegionRequest true "请求体"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/region-subscriptions [post]
|
||||
func (h *ociConfigHandler) subscribeRegion(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -54,6 +73,12 @@ func (h *ociConfigHandler) subscribeRegion(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, subs)
|
||||
}
|
||||
|
||||
// @Summary 服务限额查询
|
||||
// @Tags 租户配置
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/limits [get]
|
||||
func (h *ociConfigHandler) limits(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user