mcir

package
v0.0.0-...-8f225d0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Package mcir is to handle REST API for mcir

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestCheckResource

func RestCheckResource(c echo.Context) error

RestCheckResource godoc @Summary Check resources' existence @Description Check resources' existence @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param resourceType path string true "Resource Type" @Param resourceId path string true "Resource ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /{nsId}/checkResource/{resourceType}/{resourceId} [get]

func RestDelAllCustomcustomImage

func RestDelAllCustomcustomImage(c echo.Context) error

RestDelAllCustomImage godoc @Summary Delete all customImages @Description Delete all customImages @Tags [Infra resource] Snapshot and Custom Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/customImage [delete]

func RestDelAllDataDisk

func RestDelAllDataDisk(c echo.Context) error

RestDelAllDataDisk godoc @Summary Delete all Data Disks @Description Delete all Data Disks @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/dataDisk [delete]

func RestDelAllDefaultResources

func RestDelAllDefaultResources(c echo.Context) error

RestDelAllDefaultResources godoc @Summary Delete all Default Resource Objects in the given namespace @Description Delete all Default Resource Objects in the given namespace @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/defaultResources [delete]

func RestDelAllImage

func RestDelAllImage(c echo.Context) error

RestDelAllImage godoc @Summary Delete all images @Description Delete all images @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image [delete]

func RestDelAllResources

func RestDelAllResources(c echo.Context) error

RestDelAllResources is a common function to handle 'DelAllResources' REST API requests. Dummy functions for Swagger exist in [mcir/*.go]

func RestDelAllSecurityGroup

func RestDelAllSecurityGroup(c echo.Context) error

RestDelAllSecurityGroup godoc @Summary Delete all Security Groups @Description Delete all Security Groups @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup [delete]

func RestDelAllSpec

func RestDelAllSpec(c echo.Context) error

RestDelAllSpec godoc @Summary Delete all specs @Description Delete all specs @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/spec [delete]

func RestDelAllSshKey

func RestDelAllSshKey(c echo.Context) error

RestDelAllSshKey godoc @Summary Delete all SSH Keys @Description Delete all SSH Keys @Tags [Infra resource] MCIR Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/sshKey [delete]

func RestDelAllVNet

func RestDelAllVNet(c echo.Context) error

RestDelAllVNet godoc @Summary Delete all VNets @Description Delete all VNets @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet [delete]

func RestDelChildResource

func RestDelChildResource(c echo.Context) error

RestDelChildResource is a common function to handle 'DelChildResource' REST API requests. Dummy functions for Swagger exist in [mcir/*.go]

func RestDelCustomImage

func RestDelCustomImage(c echo.Context) error

RestDelCustomImage godoc @Summary Delete customImage @Description Delete customImage @Tags [Infra resource] Snapshot and Custom Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param customImageId path string true "customImage ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/customImage/{customImageId} [delete]

func RestDelDataDisk

func RestDelDataDisk(c echo.Context) error

RestDelDataDisk godoc @Summary Delete Data Disk @Description Delete Data Disk @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param dataDiskId path string true "Data Disk ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/dataDisk/{dataDiskId} [delete]

func RestDelFirewallRules

func RestDelFirewallRules(c echo.Context) error

RestDelFirewallRules godoc @Summary Delete FirewallRules @Description Delete FirewallRules @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param firewallRuleReq body TbFirewallRulesWrapper true "FirewallRules to delete" @Success 200 {object} mcir.TbSecurityGroupInfo @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup/{securityGroupId}/rules [delete]

func RestDelImage

func RestDelImage(c echo.Context) error

RestDelImage godoc @Summary Delete image @Description Delete image @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param imageId path string true "Image ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image/{imageId} [delete]

func RestDelResource

func RestDelResource(c echo.Context) error

RestDelResource is a common function to handle 'DelResource' REST API requests. Dummy functions for Swagger exist in [mcir/*.go]

func RestDelSecurityGroup

func RestDelSecurityGroup(c echo.Context) error

RestDelSecurityGroup godoc @Summary Delete Security Group @Description Delete Security Group @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param securityGroupId path string true "Security Group ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup/{securityGroupId} [delete]

func RestDelSpec

func RestDelSpec(c echo.Context) error

RestDelSpec godoc @Summary Delete spec @Description Delete spec @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specId path string true "Spec ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/spec/{specId} [delete]

func RestDelSshKey

func RestDelSshKey(c echo.Context) error

RestDelSshKey godoc @Summary Delete SSH Key @Description Delete SSH Key @Tags [Infra resource] MCIR Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param sshKeyId path string true "SSH Key ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/sshKey/{sshKeyId} [delete]

func RestDelSubnet

func RestDelSubnet(c echo.Context) error

RestDelSubnet godoc @Summary Delete Subnet @Description Delete Subnet @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param subnetId path string true "Subnet ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId}/subnet/{subnetId} [delete]

func RestDelVNet

func RestDelVNet(c echo.Context) error

RestDelVNet godoc @Summary Delete VNet @Description Delete VNet @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param vNetId path string true "VNet ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId} [delete]

func RestFetchImages

func RestFetchImages(c echo.Context) error

RestFetchImages godoc @Summary Fetch images @Description Fetch images @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/fetchImages [post]

func RestFetchSpecs

func RestFetchSpecs(c echo.Context) error

RestFetchSpecs godoc @Summary Fetch specs @Description Fetch specs @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/fetchSpecs [post]

func RestFilterSpecs

func RestFilterSpecs(c echo.Context) error

RestFilterSpecs godoc @Summary Filter specs @Description Filter specs @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specFilter body mcir.TbSpecInfo false "Filter for filtering specs" @Success 200 {object} RestFilterSpecsResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/filterSpecs [post]

func RestFilterSpecsByRange

func RestFilterSpecsByRange(c echo.Context) error

RestFilterSpecsByRange godoc @Summary Filter specs by range @Description Filter specs by range @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specRangeFilter body mcir.FilterSpecsByRangeRequest false "Filter for range-filtering specs" @Success 200 {object} RestFilterSpecsResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/filterSpecsByRange [post]

func RestGetAllCustomImage

func RestGetAllCustomImage(c echo.Context) error

RestGetAllCustomImage godoc @Summary List all customImages or customImages' ID @Description List all customImages or customImages' ID @Tags [Infra resource] Snapshot and Custom Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex:guestOS)" @Param filterVal query string false "Field value for filtering (ex: Ubuntu18.04)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllCustomImageResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/customImage [get]

func RestGetAllDataDisk

func RestGetAllDataDisk(c echo.Context) error

RestGetAllDataDisk godoc @Summary List all Data Disks or Data Disks' ID @Description List all Data Disks or Data Disks' ID @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: systemLabel)" @Param filterVal query string false "Field value for filtering (ex: Registered from CSP resource)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllDataDiskResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/dataDisk [get]

func RestGetAllImage

func RestGetAllImage(c echo.Context) error

RestGetAllImage godoc @Summary List all images or images' ID @Description List all images or images' ID @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex:guestOS)" @Param filterVal query string false "Field value for filtering (ex: Ubuntu18.04)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllImageResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image [get]

func RestGetAllResources

func RestGetAllResources(c echo.Context) error

RestGetAllResources is a common function to handle 'GetAllResources' REST API requests. Dummy functions for Swagger exist in [mcir/*.go]

func RestGetAllSecurityGroup

func RestGetAllSecurityGroup(c echo.Context) error

RestGetAllSecurityGroup godoc @Summary List all Security Groups or Security Groups' ID @Description List all Security Groups or Security Groups' ID @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: systemLabel)" @Param filterVal query string false "Field value for filtering (ex: Registered from CSP resource)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllSecurityGroupResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup [get]

func RestGetAllSpec

func RestGetAllSpec(c echo.Context) error

RestGetAllSpec godoc @Summary List all specs or specs' ID @Description List all specs or specs' ID @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: providerName)" @Param filterVal query string false "Field value for filtering (ex: aws)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllSpecResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/spec [get]

func RestGetAllSshKey

func RestGetAllSshKey(c echo.Context) error

RestGetAllSshKey godoc @Summary List all SSH Keys or SSH Keys' ID @Description List all SSH Keys or SSH Keys' ID @Tags [Infra resource] MCIR Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: systemLabel)" @Param filterVal query string false "Field value for filtering (ex: Registered from CSP resource)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllSshKeyResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/sshKey [get]

func RestGetAllVNet

func RestGetAllVNet(c echo.Context) error

RestGetAllVNet godoc @Summary List all VNets or VNets' ID @Description List all VNets or VNets' ID @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: cspVNetName)" @Param filterVal query string false "Field value for filtering (ex: ns01-alibaba-ap-northeast-1-vpc)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllVNetResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet [get]

func RestGetCustomImage

func RestGetCustomImage(c echo.Context) error

RestGetCustomImage godoc @Summary Get customImage @Description Get customImage @Tags [Infra resource] Snapshot and Custom Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param customImageId path string true "customImage ID" @Success 200 {object} mcir.TbCustomImageInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/customImage/{customImageId} [get]

func RestGetDataDisk

func RestGetDataDisk(c echo.Context) error

RestGetDataDisk godoc @Summary Get Data Disk @Description Get Data Disk @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param dataDiskId path string true "Data Disk ID" @Success 200 {object} mcir.TbDataDiskInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/dataDisk/{dataDiskId} [get]

func RestGetImage

func RestGetImage(c echo.Context) error

RestGetImage godoc @Summary Get image @Description Get image @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param imageId path string true "Image ID" @Success 200 {object} mcir.TbImageInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image/{imageId} [get]

func RestGetResource

func RestGetResource(c echo.Context) error

RestGetResource is a common function to handle 'GetResource' REST API requests. Dummy functions for Swagger exist in [mcir/*.go]

func RestGetSecurityGroup

func RestGetSecurityGroup(c echo.Context) error

RestGetSecurityGroup godoc @Summary Get Security Group @Description Get Security Group @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param securityGroupId path string true "Security Group ID" @Success 200 {object} mcir.TbSecurityGroupInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup/{securityGroupId} [get]

func RestGetSpec

func RestGetSpec(c echo.Context) error

RestGetSpec godoc @Summary Get spec @Description Get spec @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specId path string true "Spec ID" @Success 200 {object} mcir.TbSpecInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/spec/{specId} [get]

func RestGetSshKey

func RestGetSshKey(c echo.Context) error

RestGetSshKey godoc @Summary Get SSH Key @Description Get SSH Key @Tags [Infra resource] MCIR Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param sshKeyId path string true "SSH Key ID" @Success 200 {object} mcir.TbSshKeyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/sshKey/{sshKeyId} [get]

func RestGetVNet

func RestGetVNet(c echo.Context) error

RestGetVNet godoc @Summary Get VNet @Description Get VNet @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param vNetId path string true "VNet ID" @Success 200 {object} mcir.TbVNetInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId} [get]

func RestGetVmDataDisk

func RestGetVmDataDisk(c echo.Context) error

RestGetVmDataDisk godoc @Summary Get available dataDisks for a VM @Description Get available dataDisks for a VM @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param mcisId path string true "MCIS ID" default(mcis01) @Param vmId path string true "VM ID" default(g1-1) @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllDataDiskResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId}/vm/{vmId}/dataDisk [get]

func RestLoadCommonResource

func RestLoadCommonResource(c echo.Context) error

RestLoadCommonResource godoc @Summary Load Common Resources from internal asset files @Description Load Common Resources from internal asset files (Spec, Image) @Tags [Admin] Multi-Cloud environment configuration @Accept json @Produce json @Success 200 {object} common.IdList @Failure 404 {object} common.SimpleMsg @Router /loadCommonResource [get]

func RestLoadDefaultResource

func RestLoadDefaultResource(c echo.Context) error

RestLoadDefaultResource godoc @Summary Load Default Resource from internal asset file @Description Load Default Resource from internal asset file @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string true "Option" Enums(all,vnet,sg,sshkey) @Param connectionName query string false "connectionName of cloud for designated resource" default() @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/loadDefaultResource [get]

func RestLookupImage

func RestLookupImage(c echo.Context) error

RestLookupImage godoc @Summary Lookup image @Description Lookup image @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param lookupImageReq body RestLookupImageRequest true "Specify connectionName & cspImageId" @Success 200 {object} mcir.SpiderImageInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /lookupImage [post]

func RestLookupImageList

func RestLookupImageList(c echo.Context) error

RestLookupImageList godoc @Summary Lookup image list @Description Lookup image list @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param lookupImagesReq body common.TbConnectionName true "Specify connectionName" @Success 200 {object} mcir.SpiderImageList @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /lookupImages [post]

func RestLookupSpec

func RestLookupSpec(c echo.Context) error

RestLookupSpec godoc @Summary Lookup spec @Description Lookup spec @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param lookupSpecReq body RestLookupSpecRequest true "Specify connectionName & cspSpecName" @Success 200 {object} mcir.SpiderSpecInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /lookupSpec [post]

func RestLookupSpecList

func RestLookupSpecList(c echo.Context) error

RestLookupSpecList godoc @Summary Lookup spec list @Description Lookup spec list @Tags [Infra resource] MCIR Common @Accept json @Produce json @Param lookupSpecsReq body common.TbConnectionName true "Specify connectionName" @Success 200 {object} mcir.SpiderSpecList @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /lookupSpecs [post]

func RestPostCustomImage

func RestPostCustomImage(c echo.Context) error

RestPostCustomImage godoc @Summary Register existing Custom Image in a CSP @Description Register existing Custom Image in a CSP (option=register) @Tags [Infra resource] Snapshot and Custom Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string true "Option: " Enums(register) @Param customImageRegisterReq body mcir.TbCustomImageReq true "Request to Register existing Custom Image in a CSP" @Success 200 {object} mcir.TbCustomImageInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/customImage [post]

func RestPostDataDisk

func RestPostDataDisk(c echo.Context) error

RestPostDataDisk godoc @Summary Create Data Disk @Description Create Data Disk @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option: " Enums(register) @Param dataDiskInfo body mcir.TbDataDiskReq true "Details for an Data Disk object" @Success 200 {object} mcir.TbDataDiskInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/dataDisk [post]

func RestPostFirewallRules

func RestPostFirewallRules(c echo.Context) error

RestPostFirewallRules godoc @Summary Create FirewallRules @Description Create FirewallRules @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param firewallRuleReq body TbFirewallRulesWrapper true "FirewallRules to create" @Success 200 {object} mcir.TbSecurityGroupInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup/{securityGroupId}/rules [post]

func RestPostImage

func RestPostImage(c echo.Context) error

RestPostImage godoc @Summary Register image @Description Register image @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param action query string true "registeringMethod (registerWithInfo or registerWithId)" @Param nsId path string true "Namespace ID" default(ns01) @Param imageInfo body mcir.TbImageInfo false "Details for an image object" @Param imageId body mcir.TbImageReq false "name, connectionName and cspImageId" @Success 200 {object} mcir.TbImageInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image [post]

func RestPostSecurityGroup

func RestPostSecurityGroup(c echo.Context) error

RestPostSecurityGroup godoc @Summary Create Security Group @Description Create Security Group @Tags [Infra resource] MCIR Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option: [required params for register] connectionName, name, vNetId, cspSecurityGroupId" Enums(register) @Param securityGroupReq body mcir.TbSecurityGroupReq true "Details for an securityGroup object" @Success 200 {object} mcir.TbSecurityGroupInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/securityGroup [post]

func RestPostSpec

func RestPostSpec(c echo.Context) error

RestPostSpec godoc @Summary Register spec @Description Register spec @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param registeringMethod query string true "registerWithInfo or else" @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specInfo body mcir.TbSpecInfo false "Details for an spec object" @Param specName body mcir.TbSpecReq false "name, connectionName and cspSpecName" @Success 200 {object} mcir.TbSpecInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/spec [post]

func RestPostSshKey

func RestPostSshKey(c echo.Context) error

RestPostSshKey godoc @Summary Create SSH Key @Description Create SSH Key @Tags [Infra resource] MCIR Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option: [required params for register] connectionName, name, cspSshKeyId, fingerprint, username, publicKey, privateKey" Enums(register) @Param sshKeyInfo body mcir.TbSshKeyReq true "Details for an SSH Key object" @Success 200 {object} mcir.TbSshKeyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/sshKey [post]

func RestPostSubnet

func RestPostSubnet(c echo.Context) error

RestPostSubnet godoc @Summary Create Subnet @Description Create Subnet @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param subnetReq body mcir.TbSubnetReq true "Details for an Subnet object" @Success 200 {object} mcir.TbSubnetInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId}/subnet [post]

func RestPostVNet

func RestPostVNet(c echo.Context) error

RestPostVNet godoc @Summary Create VNet @Description Create VNet @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option: [required params for register] connectionName, name, cspVNetId" Enums(register) @Param vNetReq body mcir.TbVNetReq true "Details for an VNet object" @Success 200 {object} mcir.TbVNetInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet [post]

func RestPutDataDisk

func RestPutDataDisk(c echo.Context) error

RestPutDataDisk godoc @Summary Upsize Data Disk @Description Upsize Data Disk @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param dataDiskUpsizeReq body mcir.TbDataDiskUpsizeReq true "Request body to upsize the dataDisk" @Param nsId path string true "Namespace ID" default(ns01) @Param dataDiskId path string true "DataDisk ID" @Success 200 {object} mcir.TbDataDiskInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/dataDisk/{dataDiskId} [put]

func RestPutImage

func RestPutImage(c echo.Context) error

RestPutImage godoc @Summary Update image @Description Update image @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param imageInfo body mcir.TbImageInfo true "Details for an image object" @Param nsId path string true "Namespace ID" default(ns01) @Param imageId path string true "Image ID" @Success 200 {object} mcir.TbImageInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image/{imageId} [put]

func RestPutSecurityGroup

func RestPutSecurityGroup(c echo.Context) error
function RestPutSecurityGroup not yet implemented

// RestPutSecurityGroup godoc // @Summary Update Security Group // @Description Update Security Group // @Tags [Infra resource] MCIR Security group management // @Accept json // @Produce json // @Param securityGroupInfo body mcir.TbSecurityGroupInfo true "Details for an securityGroup object" // @Success 200 {object} mcir.TbSecurityGroupInfo // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId}/resources/securityGroup/{securityGroupId} [put]

func RestPutSpec

func RestPutSpec(c echo.Context) error

RestPutSpec godoc @Summary Update spec @Description Update spec @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param specInfo body mcir.TbSpecInfo true "Details for an spec object" @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specId path string true "Spec ID" @Success 200 {object} mcir.TbSpecInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/spec/{specId} [put]

func RestPutSshKey

func RestPutSshKey(c echo.Context) error

RestPutSshKey godoc @Summary Update SSH Key @Description Update SSH Key @Tags [Infra resource] MCIR Access key management @Accept json @Produce json @Param sshKeyInfo body mcir.TbSshKeyInfo true "Details for an SSH Key object" @Param nsId path string true "Namespace ID" default(ns01) @Param sshKeyId path string true "SshKey ID" @Success 200 {object} mcir.TbSshKeyInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/sshKey/{sshKeyId} [put]

func RestPutVNet

func RestPutVNet(c echo.Context) error
function RestPutVNet not yet implemented

// RestPutVNet godoc // @Summary Update VNet // @Description Update VNet // @Tags [Infra resource] MCIR Network management // @Accept json // @Produce json // @Param vNetInfo body mcir.TbVNetInfo true "Details for an VNet object" // @Success 200 {object} mcir.TbVNetInfo // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId}/resources/vNet/{vNetId} [put]

func RestPutVmDataDisk

func RestPutVmDataDisk(c echo.Context) error

RestPutVmDataDisk godoc @Summary Attach/Detach available dataDisk @Description Attach/Detach available dataDisk @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param attachDetachDataDiskReq body mcir.TbAttachDetachDataDiskReq false "Request body to attach/detach dataDisk" @Param nsId path string true "Namespace ID" default(ns01) @Param mcisId path string true "MCIS ID" default(mcis01) @Param vmId path string true "VM ID" default(g1-1) @Param option query string true "Option for MCIS" Enums(attach, detach) @Success 200 {object} mcis.TbVmInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId}/vm/{vmId}/dataDisk [put]

func RestSearchImage

func RestSearchImage(c echo.Context) error

RestSearchImage godoc @Summary Search image @Description Search image @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param keywords body RestSearchImageRequest true "Keywords" @Success 200 {object} RestGetAllImageResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/searchImage [post]

func RestTestAddObjectAssociation

func RestTestAddObjectAssociation(c echo.Context) error

RestTestAddObjectAssociation is a REST API call handling function to test "mcir.UpdateAssociatedObjectList" function with "add" argument.

func RestTestDeleteObjectAssociation

func RestTestDeleteObjectAssociation(c echo.Context) error

RestTestDeleteObjectAssociation is a REST API call handling function to test "mcir.UpdateAssociatedObjectList" function with "delete" argument.

func RestTestGetAssociatedObjectCount

func RestTestGetAssociatedObjectCount(c echo.Context) error

RestTestGetAssociatedObjectCount is a REST API call handling function to test "mcir.GetAssociatedObjectCount" function.

func RestTestSortSpecs

func RestTestSortSpecs(c echo.Context) error

Types

type JSONResult

type JSONResult struct {
}

JSONResult is a dummy struct for Swagger annotations.

type RestFilterSpecsResponse

type RestFilterSpecsResponse struct {
	Spec []mcir.TbSpecInfo `json:"spec"`
}

RestFilterSpecsResponse is Response structure for RestFilterSpecs

type RestGetAllCustomImageResponse

type RestGetAllCustomImageResponse struct {
	CustomImage []mcir.TbCustomImageInfo `json:"customImage"`
}

Response structure for RestGetAllCustomImage

type RestGetAllDataDiskResponse

type RestGetAllDataDiskResponse struct {
	DataDisk []mcir.TbDataDiskInfo `json:"dataDisk"`
}

Response struct for RestGetAllDataDisk

type RestGetAllImageResponse

type RestGetAllImageResponse struct {
	Image []mcir.TbImageInfo `json:"image"`
}

Response structure for RestGetAllImage

type RestGetAllSecurityGroupResponse

type RestGetAllSecurityGroupResponse struct {
	SecurityGroup []mcir.TbSecurityGroupInfo `json:"securityGroup"`
}

Response structure for RestGetAllSecurityGroup

type RestGetAllSpecResponse

type RestGetAllSpecResponse struct {
	Spec []mcir.TbSpecInfo `json:"spec"`
}

Response structure for RestGetAllSpec

type RestGetAllSshKeyResponse

type RestGetAllSshKeyResponse struct {
	SshKey []mcir.TbSshKeyInfo `json:"sshKey"`
}

Response struct for RestGetAllSshKey

type RestGetAllVNetResponse

type RestGetAllVNetResponse struct {
	VNet []mcir.TbVNetInfo `json:"vNet"`
}

Response structure for RestGetAllVNet

type RestLookupImageRequest

type RestLookupImageRequest struct {
	ConnectionName string `json:"connectionName"`
	CspImageId     string `json:"cspImageId"`
}

Request structure for RestLookupImage

type RestLookupSpecRequest

type RestLookupSpecRequest struct {
	ConnectionName string `json:"connectionName"`
	CspSpecName    string `json:"cspSpecName"`
}

Request structure for RestLookupSpec

type RestSearchImageRequest

type RestSearchImageRequest struct {
	Keywords []string `json:"keywords"`
}

Response structure for RestSearchImage

type TbFirewallRulesWrapper

type TbFirewallRulesWrapper struct {
	FirewallRules []mcir.TbFirewallRuleInfo `json:"firewallRules"` // validate:"required"`
}

Jump to

Keyboard shortcuts

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