mcir

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 9 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 @ID CheckResource @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 RestDelAllCustomImage added in v0.8.13

func RestDelAllCustomImage(c echo.Context) error

RestDelAllCustomImage godoc @ID DelAllCustomImage @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 added in v0.6.4

func RestDelAllDataDisk(c echo.Context) error

RestDelAllDataDisk godoc @ID DelAllDataDisk @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 added in v0.4.13

func RestDelAllDefaultResources(c echo.Context) error

RestDelAllDefaultResources godoc @ID DelAllDefaultResources @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 @ID DelAllImage @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 @ID DelAllSecurityGroup @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 @ID DelAllSpec @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 @ID DelAllSshKey @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 @ID DelAllVNet @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 added in v0.4.10

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 added in v0.6.12

func RestDelCustomImage(c echo.Context) error

RestDelCustomImage godoc @ID DelCustomImage @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 added in v0.6.4

func RestDelDataDisk(c echo.Context) error

RestDelDataDisk godoc @ID DelDataDisk @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 added in v0.5.3

func RestDelFirewallRules(c echo.Context) error

RestDelFirewallRules godoc @ID DelFirewallRules @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 @ID DelImage @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 ({providerName}+{regionName}+{imageName})" @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 @ID DelSecurityGroup @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 @ID DelSpec @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 ({providerName}+{regionName}+{specName})" @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 @ID DelSshKey @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 added in v0.4.10

func RestDelSubnet(c echo.Context) error

RestDelSubnet godoc @ID DelSubnet @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 vNetId path string true "VNet ID" @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 @ID DelVNet @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 @ID FetchImages @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 @ID FetchSpecs @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 RestFilterSpecsByRange added in v0.2.8

func RestFilterSpecsByRange(c echo.Context) error

RestFilterSpecsByRange godoc @ID FilterSpecsByRange @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 added in v0.6.12

func RestGetAllCustomImage(c echo.Context) error

RestGetAllCustomImage godoc @ID GetAllCustomImage @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 added in v0.6.4

func RestGetAllDataDisk(c echo.Context) error

RestGetAllDataDisk godoc @ID GetAllDataDisk @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 @ID GetAllImage @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 @ID GetAllSecurityGroup @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 @ID GetAllSpec @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 @ID GetAllSshKey @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 @ID GetAllVNet @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 added in v0.6.12

func RestGetCustomImage(c echo.Context) error

RestGetCustomImage godoc @ID GetCustomImage @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 added in v0.6.4

func RestGetDataDisk(c echo.Context) error

RestGetDataDisk godoc @ID GetDataDisk @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 @ID GetImage @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 ({providerName}+{regionName}+{imageName})" @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 @ID GetSecurityGroup @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 @ID GetSpec @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 ({providerName}+{regionName}+{specName})" @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 @ID GetSshKey @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 @ID GetVNet @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 added in v0.6.12

func RestGetVmDataDisk(c echo.Context) error

RestGetVmDataDisk godoc @ID GetVmDataDisk @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 added in v0.4.9

func RestLoadCommonResource(c echo.Context) error

RestLoadCommonResource godoc @ID LoadCommonResource @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 added in v0.4.13

func RestLoadDefaultResource(c echo.Context) error

RestLoadDefaultResource godoc @ID LoadDefaultResource @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 @ID LookupImage @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 @ID LookupImageList @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 @ID LookupSpec @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 @ID LookupSpecList @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 added in v0.6.7

func RestPostCustomImage(c echo.Context) error

RestPostCustomImage godoc @ID PostCustomImage @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 added in v0.6.4

func RestPostDataDisk(c echo.Context) error

RestPostDataDisk godoc @ID PostDataDisk @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 added in v0.5.3

func RestPostFirewallRules(c echo.Context) error

RestPostFirewallRules godoc @ID PostFirewallRules @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 @ID PostImage @Summary Register image @Description Register image @Tags [Infra resource] MCIR Image management @Accept json @Produce json @Param action query string true "registeringMethod" Enums(registerWithInfo, registerWithId) @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param imageInfo body mcir.TbImageInfo false "Specify details of a image object (cspImageName, guestOS, description, ...) manually" @Param imageId body mcir.TbImageReq false "Specify name, connectionName and cspImageId to register an image object automatically" @Param update query boolean false "Force update to existing image object" default(false) @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 @ID PostSecurityGroup @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 @ID PostSpec @Summary Register spec @Description Register spec @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param action query string true "registeringMethod" Enums(registerWithInfo, registerWithCspSpecName) @Param nsId path string true "Namespace ID" default(system-purpose-common-ns) @Param specInfo body mcir.TbSpecInfo false "Specify details of a spec object (vCPU, memoryGiB, ...) manually" @Param specName body mcir.TbSpecReq false "Specify name, connectionName and cspSpecName to register a spec object automatically" @Param update query boolean false "Force update to existing spec object" default(false) @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 @ID PostSshKey @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 added in v0.4.10

func RestPostSubnet(c echo.Context) error

RestPostSubnet godoc @ID PostSubnet @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 vNetId path string true "VNet ID" @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 @ID PostVNet @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 RestPostVmDataDisk added in v0.8.1

func RestPostVmDataDisk(c echo.Context) error

RestPostVmDataDisk godoc @ID PostVmDataDisk @Summary Provisioning (Create and attach) dataDisk @Description Provisioning (Create and attach) dataDisk @Tags [Infra resource] MCIR Data Disk management @Accept json @Produce json @Param dataDiskInfo body mcir.TbDataDiskVmReq true "Details for an Data Disk object" @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} mcis.TbVmInfo @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/mcis/{mcisId}/vm/{vmId}/dataDisk [post]

func RestPutDataDisk added in v0.6.4

func RestPutDataDisk(c echo.Context) error

RestPutDataDisk godoc @ID PutDataDisk @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 @ID PutImage @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 ({providerName}+{regionName}+{imageName})" @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 // @ID PutSecurityGroup // @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 @ID PutSpec @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 ({providerName}+{regionName}+{specName})" @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 @ID PutSshKey @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 // @ID PutVNet // @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 added in v0.6.10

func RestPutVmDataDisk(c echo.Context) error

RestPutVmDataDisk godoc @ID PutVmDataDisk @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) @Param force query string false "Force to attach/detach even if VM info is not matched" Enums(true, false) @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 added in v0.2.8

func RestSearchImage(c echo.Context) error

RestSearchImage godoc @ID SearchImage @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 added in v0.3.1

func RestTestAddObjectAssociation(c echo.Context) error

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

func RestTestDeleteObjectAssociation added in v0.3.1

func RestTestDeleteObjectAssociation(c echo.Context) error

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

func RestTestGetAssociatedObjectCount added in v0.3.1

func RestTestGetAssociatedObjectCount(c echo.Context) error

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

Types

type JSONResult added in v0.3.10

type JSONResult struct {
}

JSONResult is a dummy struct for Swagger annotations.

type RestFilterSpecsResponse added in v0.2.8

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

RestFilterSpecsResponse is Response structure for RestFilterSpecs

type RestGetAllCustomImageResponse added in v0.6.12

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

Response structure for RestGetAllCustomImage

type RestGetAllDataDiskResponse added in v0.6.4

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 added in v0.2.8

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

Response structure for RestSearchImage

type TbFirewallRulesWrapper added in v0.5.3

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