Documentation ¶
Overview ¶
Package resource is to handle REST API for resource
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource ¶
Package resource is to handle REST API for resource
Index ¶
- func RestCheckNodeGroupsOnK8sCreation(c echo.Context) error
- func RestCheckResource(c echo.Context) error
- func RestCreateSharedResource(c echo.Context) error
- func RestDelAllCustomImage(c echo.Context) error
- func RestDelAllDataDisk(c echo.Context) error
- func RestDelAllImage(c echo.Context) error
- func RestDelAllResources(c echo.Context) error
- func RestDelAllSecurityGroup(c echo.Context) error
- func RestDelAllSharedResources(c echo.Context) error
- func RestDelAllSshKey(c echo.Context) error
- func RestDelAllVNet(c echo.Context) error
- func RestDelCustomImage(c echo.Context) error
- func RestDelDataDisk(c echo.Context) error
- func RestDelFirewallRules(c echo.Context) error
- func RestDelImage(c echo.Context) error
- func RestDelResource(c echo.Context) error
- func RestDelSecurityGroup(c echo.Context) error
- func RestDelSpec(c echo.Context) error
- func RestDelSshKey(c echo.Context) error
- func RestDelSubnet(c echo.Context) error
- func RestDelVNet(c echo.Context) error
- func RestDeleteAllK8sCluster(c echo.Context) error
- func RestDeleteDeregisterSubnet(c echo.Context) error
- func RestDeleteDeregisterVNet(c echo.Context) error
- func RestDeleteK8sCluster(c echo.Context) error
- func RestDeleteK8sNodeGroup(c echo.Context) error
- func RestFetchImages(c echo.Context) error
- func RestFetchSpecs(c echo.Context) error
- func RestFilterSpecsByRange(c echo.Context) error
- func RestGetAllCustomImage(c echo.Context) error
- func RestGetAllDataDisk(c echo.Context) error
- func RestGetAllImage(c echo.Context) error
- func RestGetAllK8sCluster(c echo.Context) error
- func RestGetAllResources(c echo.Context) error
- func RestGetAllSecurityGroup(c echo.Context) error
- func RestGetAllSshKey(c echo.Context) error
- func RestGetAllVNet(c echo.Context) error
- func RestGetAvailableK8sClusterNodeImage(c echo.Context) error
- func RestGetAvailableK8sClusterVersion(c echo.Context) error
- func RestGetCustomImage(c echo.Context) error
- func RestGetDataDisk(c echo.Context) error
- func RestGetImage(c echo.Context) error
- func RestGetK8sCluster(c echo.Context) error
- func RestGetListSubnet(c echo.Context) error
- func RestGetResource(c echo.Context) error
- func RestGetSecurityGroup(c echo.Context) error
- func RestGetSpec(c echo.Context) error
- func RestGetSshKey(c echo.Context) error
- func RestGetSubnet(c echo.Context) error
- func RestGetVNet(c echo.Context) error
- func RestGetVmDataDisk(c echo.Context) error
- func RestLoadAssets(c echo.Context) error
- func RestLookupImage(c echo.Context) error
- func RestLookupImageList(c echo.Context) error
- func RestLookupSpec(c echo.Context) error
- func RestLookupSpecList(c echo.Context) error
- func RestPostCustomImage(c echo.Context) error
- func RestPostDataDisk(c echo.Context) error
- func RestPostFirewallRules(c echo.Context) error
- func RestPostImage(c echo.Context) error
- func RestPostK8sCluster(c echo.Context) error
- func RestPostK8sNodeGroup(c echo.Context) error
- func RestPostRegisterSubnet(c echo.Context) error
- func RestPostRegisterVNet(c echo.Context) error
- func RestPostSecurityGroup(c echo.Context) error
- func RestPostSpec(c echo.Context) error
- func RestPostSshKey(c echo.Context) error
- func RestPostSubnet(c echo.Context) error
- func RestPostVNet(c echo.Context) error
- func RestPostVmDataDisk(c echo.Context) error
- func RestPutChangeK8sNodeGroupAutoscaleSize(c echo.Context) error
- func RestPutDataDisk(c echo.Context) error
- func RestPutImage(c echo.Context) error
- func RestPutK8sCluster(c echo.Context) error
- func RestPutSecurityGroup(c echo.Context) error
- func RestPutSetK8sNodeGroupAutoscaling(c echo.Context) error
- func RestPutSpec(c echo.Context) error
- func RestPutSshKey(c echo.Context) error
- func RestPutUpgradeK8sCluster(c echo.Context) error
- func RestPutVmDataDisk(c echo.Context) error
- func RestSearchImage(c echo.Context) error
- func RestTestAddObjectAssociation(c echo.Context) error
- func RestTestDeleteObjectAssociation(c echo.Context) error
- func RestTestGetAssociatedObjectCount(c echo.Context) error
- type JSONResult
- type RestFilterSpecsResponse
- type RestGetAllCustomImageResponse
- type RestGetAllDataDiskResponse
- type RestGetAllImageResponse
- type RestGetAllK8sClusterResponse
- type RestGetAllSecurityGroupResponse
- type RestGetAllSshKeyResponse
- type RestGetAllSubnetResponse
- type RestGetAllVNetResponse
- type RestLookupImageRequest
- type RestLookupSpecRequest
- type RestSearchImageRequest
- type TbFirewallRulesWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestCheckNodeGroupsOnK8sCreation ¶
func RestCheckNodeGroupsOnK8sCreation(c echo.Context) error
RestCheckNodeGroupsOnK8sCreation func is a rest api wrapper for CheckNodeGroupsOnK8sCreation. RestCheckNodeGroupsOnK8sCreation godoc @ID CheckNodeGroupsOnK8sCreation @Summary Check whether nodegroups are required during the k8scluster creation @Description Check whether nodegroups are required during the k8scluster creation @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param providerName query string true "Name of the CSP to retrieve" @Success 200 {object} model.K8sClusterNodeGroupsOnCreation @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /checkNodeGroupsOnK8sCreation [get]
func RestCheckResource ¶
func RestCheckResource(c echo.Context) error
RestCheckResource godoc @ID CheckResource @Summary Check resources' existence @Description Check resources' existence @Tags [Infra Resource] Common Utility @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param resourceType path string true "Resource Type" @Param resourceId path string true "Resource ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/checkResource/{resourceType}/{resourceId} [get]
func RestCreateSharedResource ¶ added in v0.9.10
func RestCreateSharedResource(c echo.Context) error
RestCreateSharedResource godoc @ID CreateSharedResource @Summary Create shared resources for MC-Infra @Description Create shared resources for MC-Infra @Tags [Infra Resource] Common Utility @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @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} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/sharedResource [post]
func RestDelAllCustomImage ¶
func RestDelAllCustomImage(c echo.Context) error
RestDelAllCustomImage godoc @ID DelAllCustomImage @Summary Delete all customImages @Description Delete all customImages @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/customImage [delete]
func RestDelAllDataDisk ¶
func RestDelAllDataDisk(c echo.Context) error
RestDelAllDataDisk godoc @ID DelAllDataDisk @Summary Delete all Data Disks @Description Delete all Data Disks @Tags [Infra Resource] Data Disk Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/dataDisk [delete]
func RestDelAllImage ¶
func RestDelAllImage(c echo.Context) error
RestDelAllImage godoc @ID DelAllImage @Summary Delete all images @Description Delete all images @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.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 [resource/*.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] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/securityGroup [delete]
func RestDelAllSharedResources ¶
func RestDelAllSharedResources(c echo.Context) error
RestDelAllSharedResources godoc @ID DelAllSharedResources @Summary Delete all Default Resource Objects in the given namespace @Description Delete all Default Resource Objects in the given namespace @Tags [Infra Resource] Common Utility @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/sharedResources [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] Access Key Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.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] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet [delete]
func RestDelCustomImage ¶
func RestDelCustomImage(c echo.Context) error
RestDelCustomImage godoc @ID DelCustomImage @Summary Delete customImage @Description Delete customImage @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param customImageId path string true "customImage ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/customImage/{customImageId} [delete]
func RestDelDataDisk ¶
func RestDelDataDisk(c echo.Context) error
RestDelDataDisk godoc @ID DelDataDisk @Summary Delete Data Disk @Description Delete Data Disk @Tags [Infra Resource] Data Disk Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param dataDiskId path string true "Data Disk ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/dataDisk/{dataDiskId} [delete]
func RestDelFirewallRules ¶
func RestDelFirewallRules(c echo.Context) error
RestDelFirewallRules godoc @ID DelFirewallRules @Summary Delete FirewallRules @Description Delete FirewallRules @Tags [Infra Resource] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param securityGroupId path string true "Security Group ID" @Param firewallRuleReq body TbFirewallRulesWrapper true "FirewallRules to delete" @Success 200 {object} model.TbSecurityGroupInfo @Failure 404 {object} model.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] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param imageId path string true "Image ID ({providerName}+{regionName}+{cspImageName})" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.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 [resource/*.go]
func RestDelSecurityGroup ¶
func RestDelSecurityGroup(c echo.Context) error
RestDelSecurityGroup godoc @ID DelSecurityGroup @Summary Delete Security Group @Description Delete Security Group @Tags [Infra Resource] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param securityGroupId path string true "Security Group ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.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] Spec Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param specId path string true "Spec ID ({providerName}+{regionName}+{cspSpecName})" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.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] Access Key Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param sshKeyId path string true "SSH Key ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/sshKey/{sshKeyId} [delete]
func RestDelSubnet ¶
func RestDelSubnet(c echo.Context) error
RestDelSubnet godoc @ID DelSubnet @Summary Delete Subnet (supporting actions: refine, force) @Description Delete Subnet @Description - refine: delete information of subnet if there's no info/resource in Spider/CSP @Description - force: delete subnet regardless of the status of info/resource in Spider/CSP @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param subnetId path string true "Subnet ID" @Param action query string false "Action" Enums(refine, force) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.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 (supporting actions: withsubnet, refine, force) @Description Delete VNet @Description - withsubnets: delete VNet and its subnets @Description - refine: delete information of VNet and its subnets if there's no info/resource in Spider/CSP @Description - force: delete VNet and its subnets regardless of the status of info/resource in Spider/CSP @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param action query string false "Action" Enums(withsubnets,refine,force) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId} [delete]
func RestDeleteAllK8sCluster ¶
func RestDeleteAllK8sCluster(c echo.Context) error
RestDeleteAllK8sCluster godoc @ID DeleteAllK8sCluster @Summary Delete all K8sClusters @Description Delete all K8sClusters @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param match query string false "Delete resources containing matched ID-substring only" default() @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster [delete]
func RestDeleteDeregisterSubnet ¶ added in v0.9.9
func RestDeleteDeregisterSubnet(c echo.Context) error
RestDeleteDeregisterSubnet godoc @ID DeleteDeregisterSubnet @Summary Deregister Subnet (created in CSP) @Description Deregister Subnet, which was created in CSP @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param subnetId path string true "Subnet ID" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/deregisterCspResource/vNet/{vNetId}/subnet/{subnetId} [delete]
func RestDeleteDeregisterVNet ¶ added in v0.9.9
func RestDeleteDeregisterVNet(c echo.Context) error
RestDeleteDeregisterVNet godoc @ID DeleteDeregisterVNet @Summary Deregister VNet (created in CSP) @Description Deregister the VNet, which was created in CSP @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param withSubnets query string false "Delete subnets as well" Enums(true,false) @Success 201 {object} model.TbVNetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/deregisterCspResource/vNet/{vNetId} [delete]
func RestDeleteK8sCluster ¶
func RestDeleteK8sCluster(c echo.Context) error
RestDeleteK8sCluster func is a rest api wrapper for DeleteK8sCluster. RestDeleteK8sCluster godoc @ID DeleteK8sCluster @Summary Delete K8sCluster @Description Delete K8sCluster @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId} [delete]
func RestDeleteK8sNodeGroup ¶
func RestDeleteK8sNodeGroup(c echo.Context) error
RestDeleteK8sNodeGroup func is a rest api wrapper for RemoveK8sNodeGroup. RestDeleteK8sNodeGroup godoc @ID DeleteK8sNodeGroup @Summary Remove a K8sNodeGroup @Description Remove a K8sNodeGroup @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Param k8sNodeGroupName path string true "K8sNodeGroup Name" default(ng-01) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId}/k8snodegroup/{k8sNodeGroupName} [delete]
func RestFetchImages ¶
func RestFetchImages(c echo.Context) error
RestFetchImages godoc @ID FetchImages @Summary Fetch images @Description Fetch images @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Spec Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/fetchSpecs [post]
func RestFilterSpecsByRange ¶
func RestFilterSpecsByRange(c echo.Context) error
RestFilterSpecsByRange godoc @ID FilterSpecsByRange @Summary Filter specs by range @Description Filter specs by range @Tags [Infra Resource] Spec Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param specRangeFilter body model.FilterSpecsByRangeRequest false "Filter for range-filtering specs" @Success 200 {object} RestFilterSpecsResponse @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/filterSpecsByRange [post]
func RestGetAllCustomImage ¶
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] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @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]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/customImage [get]
func RestGetAllDataDisk ¶
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] Data Disk Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @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]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @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]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/image [get]
func RestGetAllK8sCluster ¶
func RestGetAllK8sCluster(c echo.Context) error
RestGetAllK8sCluster godoc @ID GetAllK8sCluster @Summary List all K8sClusters or K8sClusters' ID @Description List all K8sClusters or K8sClusters' ID @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: cspResourceName)" @Param filterVal query string false "Field value for filtering (ex: default-alibaba-ap-northeast-2-vpc)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllK8sClusterResponse,[ID]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster [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 [resource/*.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] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @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]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/securityGroup [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] Access Key Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @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]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option" Enums(id) @Param filterKey query string false "Field key for filtering (ex: cspResourceName)" @Param filterVal query string false "Field value for filtering (ex: default-alibaba-ap-northeast-1-vpc)" @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllVNetResponse,[ID]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet [get]
func RestGetAvailableK8sClusterNodeImage ¶
func RestGetAvailableK8sClusterNodeImage(c echo.Context) error
RestGetAvailableK8sClusterNodeImage func is a rest api wrapper for GetAvailableK8sClusterNodeImage. RestGetAvailableK8sClusterNodeImage godoc @ID GetAvailableK8sClusterNodeImage @Summary (UNDER DEVELOPMENT!!!) Get available kubernetes cluster node image @Description (UNDER DEVELOPMENT!!!) Get available kubernetes cluster node image @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param providerName query string true "Name of the CSP to retrieve" @Param regionName query string true "Name of region to retrieve" @Success 200 {object} model.K8sClusterNodeImageDetailAvailable @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /availableK8sClusterNodeImage [get]
func RestGetAvailableK8sClusterVersion ¶
func RestGetAvailableK8sClusterVersion(c echo.Context) error
RestGetAvailableK8sClusterVersion func is a rest api wrapper for GetAvailableK8sClusterVersion. RestGetAvailableK8sClusterVersion godoc @ID GetAvailableK8sClusterVersion @Summary Get available kubernetes cluster version @Description Get available kubernetes cluster version @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param providerName query string true "Name of the CSP to retrieve" @Param regionName query string true "Name of region to retrieve" @Success 200 {object} model.K8sClusterVersionDetailAvailable @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /availableK8sClusterVersion [get]
func RestGetCustomImage ¶
func RestGetCustomImage(c echo.Context) error
RestGetCustomImage godoc @ID GetCustomImage @Summary Get customImage @Description Get customImage @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param customImageId path string true "customImage ID" @Success 200 {object} model.TbCustomImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/customImage/{customImageId} [get]
func RestGetDataDisk ¶
func RestGetDataDisk(c echo.Context) error
RestGetDataDisk godoc @ID GetDataDisk @Summary Get Data Disk @Description Get Data Disk @Tags [Infra Resource] Data Disk Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param dataDiskId path string true "Data Disk ID" @Success 200 {object} model.TbDataDiskInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/dataDisk/{dataDiskId} [get]
func RestGetImage ¶
func RestGetImage(c echo.Context) error
RestGetImage godoc @ID GetImage @Summary Get image @Description GetImage returns an image object if there are matched images for the given namespace and imageKey(Id, CspResourceName, GuestOS,...) @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param imageId path string true "(Note: imageId param will be refined in next release, enabled for temporal support) This param accepts vaious input types as Image Key: [1. registerd ID: ({providerName}+{regionName}+{GuestOS}). 2. cspImageName. 3. GuestOS)]" @Success 200 {object} model.TbImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/image/{imageId} [get]
func RestGetK8sCluster ¶
func RestGetK8sCluster(c echo.Context) error
RestGetK8sCluster func is a rest api wrapper for GetK8sCluster. RestGetK8sCluster godoc @ID GetK8sCluster @Summary Get K8sCluster @Description Get K8sCluster @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Success 200 {object} model.TbK8sClusterInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId} [get]
func RestGetListSubnet ¶ added in v0.9.9
func RestGetListSubnet(c echo.Context) error
RestGetListSubnet godoc @ID GetAllSubnet @Summary List all subnets @Description List all subnets @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Success 200 {object} RestGetAllSubnetResponse @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId}/subnet [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 [resource/*.go]
func RestGetSecurityGroup ¶
func RestGetSecurityGroup(c echo.Context) error
RestGetSecurityGroup godoc @ID GetSecurityGroup @Summary Get Security Group @Description Get Security Group @Tags [Infra Resource] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param securityGroupId path string true "Security Group ID" @Success 200 {object} model.TbSecurityGroupInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Spec Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param specId path string true "Spec ID ({providerName}+{regionName}+{cspSpecName})" @Success 200 {object} model.TbSpecInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Access Key Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param sshKeyId path string true "SSH Key ID" @Success 200 {object} model.TbSshKeyInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/sshKey/{sshKeyId} [get]
func RestGetSubnet ¶ added in v0.9.9
func RestGetSubnet(c echo.Context) error
RestGetSubnet godoc @ID GetSubnet @Summary Get Subnet @Description Get Subnet @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param subnetId path string true "Subnet ID" @Success 200 {object} model.TbSubnetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId}/subnet/{subnetId} [get]
func RestGetVNet ¶
func RestGetVNet(c echo.Context) error
RestGetVNet godoc @ID GetVNet @Summary Get VNet @Description Get VNet @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Success 200 {object} model.TbVNetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet/{vNetId} [get]
func RestGetVmDataDisk ¶
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] Data Disk Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllDataDiskResponse,[ID]=model.IdList} "Different return structures by the given option param" @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{vmId}/dataDisk [get]
func RestLoadAssets ¶ added in v0.9.10
func RestLoadAssets(c echo.Context) error
RestLoadAssets godoc @ID LoadAssets @Summary Load Common Resources from internal asset files @Description Load Common Resources from internal asset files (Spec, Image) @Tags [Admin] System Configuration @Accept json @Produce json @Success 200 {object} model.IdList @Failure 404 {object} model.SimpleMsg @Router /loadAssets [get]
func RestLookupImage ¶
func RestLookupImage(c echo.Context) error
RestLookupImage godoc @ID LookupImage @Summary Lookup image @Description Lookup image @Tags [Infra Resource] Image Management @Accept json @Produce json @Param lookupImageReq body RestLookupImageRequest true "Specify connectionName, cspImageName" @Success 200 {object} model.SpiderImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Image Management @Accept json @Produce json @Param lookupImagesReq body common.TbConnectionName true "Specify connectionName" @Success 200 {object} model.SpiderImageList @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Spec Management @Accept json @Produce json @Param lookupSpecReq body RestLookupSpecRequest true "Specify connectionName & cspSpecNameS" @Success 200 {object} model.SpiderSpecInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Spec Management @Accept json @Produce json @Param lookupSpecsReq body common.TbConnectionName true "Specify connectionName" @Success 200 {object} model.SpiderSpecList @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /lookupSpecs [post]
func RestPostCustomImage ¶
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] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string true "Option: " Enums(register) @Param customImageRegisterReq body model.TbCustomImageReq true "Request to Register existing Custom Image in a CSP" @Success 200 {object} model.TbCustomImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/customImage [post]
func RestPostDataDisk ¶
func RestPostDataDisk(c echo.Context) error
RestPostDataDisk godoc @ID PostDataDisk @Summary Create Data Disk @Description Create Data Disk @Tags [Infra Resource] Data Disk Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option: " Enums(register) @Param dataDiskInfo body model.TbDataDiskReq true "Details for an Data Disk object" @Success 200 {object} model.TbDataDiskInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/dataDisk [post]
func RestPostFirewallRules ¶
func RestPostFirewallRules(c echo.Context) error
RestPostFirewallRules godoc @ID PostFirewallRules @Summary Create FirewallRules @Description Create FirewallRules @Tags [Infra Resource] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param securityGroupId path string true "Security Group ID" @Param firewallRuleReq body TbFirewallRulesWrapper true "FirewallRules to create" @Success 200 {object} model.TbSecurityGroupInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Image Management @Accept json @Produce json @Param action query string true "registeringMethod" Enums(registerWithInfo, registerWithId) @Param nsId path string true "Namespace ID" default(system) @Param imageInfo body model.TbImageInfo false "Specify details of a image object (cspResourceName, guestOS, description, ...) manually" @Param imageReq body model.TbImageReq false "Specify (name, connectionName, cspImageName) to register an image object automatically" @Param update query boolean false "Force update to existing image object" default(false) @Success 200 {object} model.TbImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/image [post]
func RestPostK8sCluster ¶
func RestPostK8sCluster(c echo.Context) error
RestPostK8sCluster func is a rest api wrapper for CreateK8sCluster. RestPostK8sCluster godoc @ID PostK8sCluster @Summary Create K8sCluster @Description Create K8sCluster<br>Find details from https://github.com/cloud-barista/cb-tumblebug/discussions/1614 @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option: [required params for register] connectionName, name, cspResourceId" Enums(register) @Param k8sClusterReq body model.TbK8sClusterReq true "Details of the K8sCluster object" @Success 200 {object} model.TbK8sClusterInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster [post]
func RestPostK8sNodeGroup ¶
func RestPostK8sNodeGroup(c echo.Context) error
RestPostK8sNodeGroup func is a rest api wrapper for AddK8sNodeGroup. RestPostK8sNodeGroup godoc @ID PostK8sNodeGroup @Summary Add a K8sNodeGroup @Description Add a K8sNodeGroup @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Param k8sNodeGroupReq body model.TbK8sNodeGroupReq true "Details of the K8sNodeGroup object" default(ng-01) @Success 200 {object} model.TbK8sClusterInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId}/k8snodegroup [post]
func RestPostRegisterSubnet ¶ added in v0.9.9
func RestPostRegisterSubnet(c echo.Context) error
RestPostRegisterSubnet godoc @ID PostRegisterSubnet @Summary Register Subnet (created in CSP) @Description Register Subnet, which was created in CSP @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param subnetReq body model.TbRegisterSubnetReq true "Details for an Subnet object" @Success 200 {object} model.TbSubnetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/registerCspResource/vNet/{vNetId}/subnet [post]
func RestPostRegisterVNet ¶ added in v0.9.9
func RestPostRegisterVNet(c echo.Context) error
RestPostRegisterVNet godoc @ID PostRegisterVNet @Summary Register VNet (created in CSP) @Description Register the VNet, which was created in CSP @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetRegisterReq body model.TbRegisterVNetReq true "Inforamation required to register the VNet created externally" @Success 201 {object} model.TbVNetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/registerCspResource/vNet [post]
func RestPostSecurityGroup ¶
func RestPostSecurityGroup(c echo.Context) error
RestPostSecurityGroup godoc @ID PostSecurityGroup @Summary Create Security Group @Description Create Security Group @Tags [Infra Resource] Security Group Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option: [required params for register] connectionName, name, vNetId, cspResourceId" Enums(register) @Param securityGroupReq body model.TbSecurityGroupReq true "Details for an securityGroup object" @Success 200 {object} model.TbSecurityGroupInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Spec Management @Accept json @Produce json @Param action query string true "registeringMethod" Enums(registerWithInfo, registerWithCspResourceId) @Param nsId path string true "Namespace ID" default(system) @Param specInfo body model.TbSpecInfo false "Specify details of a spec object (vCPU, memoryGiB, ...) manually" @Param specReq body model.TbSpecReq false "Specify n(ame, connectionName, cspSpecName) to register a spec object automatically" @Param update query boolean false "Force update to existing spec object" default(false) @Success 200 {object} model.TbSpecInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Access Key Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param option query string false "Option: [required params for register] connectionName, name, cspResourceId, fingerprint, username, publicKey, privateKey" Enums(register) @Param sshKeyInfo body model.TbSshKeyReq true "Details for an SSH Key object" @Success 200 {object} model.TbSshKeyInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/sshKey [post]
func RestPostSubnet ¶
func RestPostSubnet(c echo.Context) error
RestPostSubnet godoc @ID PostSubnet @Summary Create Subnet @Description Create Subnet @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetId path string true "VNet ID" @Param subnetReq body model.TbSubnetReq true "Details for an Subnet object" @Success 200 {object} model.TbSubnetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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 a new VNet @Tags [Infra Resource] Network Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param vNetReq body model.TbVNetReq false "Details for an VNet object" @Success 201 {object} model.TbVNetInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/vNet [post]
func RestPostVmDataDisk ¶
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] Data Disk Management @Accept json @Produce json @Param dataDiskInfo body model.TbDataDiskVmReq true "Details for an Data Disk object" @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Success 200 {object} model.TbVmInfo @Failure 404 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{vmId}/dataDisk [post]
func RestPutChangeK8sNodeGroupAutoscaleSize ¶
func RestPutChangeK8sNodeGroupAutoscaleSize(c echo.Context) error
RestPutChangeK8sNodeGroupAutoscaleSize func is a rest api wrapper for ChangeK8sNodeGroupAutoscaleSize. RestPutChangeK8sNodeGroupAutoscaleSize godoc @ID PutChangeK8sNodeGroupAutoscaleSize @Summary Change a K8sNodeGroup's Autoscale Size @Description Change a K8sNodeGroup's Autoscale Size @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Param k8sNodeGroupName path string true "K8sNodeGroup Name" default(ng-01) @Param changeK8sNodeGroupAutoscaleSizeReq body model.TbChangeK8sNodeGroupAutoscaleSizeReq true "Details of the TbChangeK8sNodeGroupAutoscaleSizeReq object" @Success 200 {object} model.TbChangeK8sNodeGroupAutoscaleSizeRes @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId}/k8snodegroup/{k8sNodeGroupName}/autoscalesize [put]
func RestPutDataDisk ¶
func RestPutDataDisk(c echo.Context) error
RestPutDataDisk godoc @ID PutDataDisk @Summary Upsize Data Disk @Description Upsize Data Disk @Tags [Infra Resource] Data Disk Management @Accept json @Produce json @Param dataDiskUpsizeReq body model.TbDataDiskUpsizeReq true "Request body to upsize the dataDisk" @Param nsId path string true "Namespace ID" default(default) @Param dataDiskId path string true "DataDisk ID" @Success 200 {object} model.TbDataDiskInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Image Management @Accept json @Produce json @Param imageInfo body model.TbImageInfo true "Details for an image object" @Param nsId path string true "Namespace ID" default(system) @Param imageId path string true "Image ID ({providerName}+{regionName}+{cspImageName})" @Success 200 {object} model.TbImageInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/image/{imageId} [put]
func RestPutK8sCluster ¶
func RestPutK8sCluster(c echo.Context) error
function RestPutK8sCluster not yet implemented
// RestPutK8sCluster godoc // @ID PutK8sCluster // @Summary Update K8sCluster // @Description Update K8sCluster // @Tags [Kubernetes] Cluster Management // @Accept json // @Produce json // @Param nsId path string true "Namespace ID" default(default) // @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) // @Param k8sClusterInfo body model.TbK8sClusterInfo true "Details of the K8sCluster object" // @Success 200 {object} model.TbK8sClusterInfo // @Failure 404 {object} model.SimpleMsg // @Failure 500 {object} model.SimpleMsg // @Router /ns/{nsId}/k8scluster/{k8sClusterId} [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] Security Group Management // @Accept json // @Produce json // @Param securityGroupInfo body model.TbSecurityGroupInfo true "Details for an securityGroup object" // @Success 200 {object} model.TbSecurityGroupInfo // @Failure 404 {object} model.SimpleMsg // @Failure 500 {object} model.SimpleMsg // @Router /ns/{nsId}/resources/securityGroup/{securityGroupId} [put]
func RestPutSetK8sNodeGroupAutoscaling ¶
func RestPutSetK8sNodeGroupAutoscaling(c echo.Context) error
RestPutSetK8sNodeGroupAutoscaling func is a rest api wrapper for SetK8sNodeGroupAutoscaling. RestPutSetK8sNodeGroupAutoscaling godoc @ID PutSetK8sNodeGroupAutoscaling @Summary Set a K8sNodeGroup's Autoscaling On/Off @Description Set a K8sNodeGroup's Autoscaling On/Off @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Param k8sNodeGroupName path string true "K8sNodeGroup Name" default(ng-01) @Param setK8sNodeGroupAutoscalingReq body model.TbSetK8sNodeGroupAutoscalingReq true "Details of the TbSetK8sNodeGroupAutoscalingReq object" @Success 200 {object} model.TbSetK8sNodeGroupAutoscalingRes @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId}/k8snodegroup/{k8sNodeGroupName}/onautoscaling [put]
func RestPutSpec ¶
func RestPutSpec(c echo.Context) error
RestPutSpec godoc @ID PutSpec @Summary Update spec @Description Update spec @Tags [Infra Resource] Spec Management @Accept json @Produce json @Param specInfo body model.TbSpecInfo true "Details for an spec object" @Param nsId path string true "Namespace ID" default(system) @Param specId path string true "Spec ID ({providerName}+{regionName}+{cspSpecName})" @Success 200 {object} model.TbSpecInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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] Access Key Management @Accept json @Produce json @Param sshKeyInfo body model.TbSshKeyInfo true "Details for an SSH Key object" @Param nsId path string true "Namespace ID" default(default) @Param sshKeyId path string true "SshKey ID" @Success 200 {object} model.TbSshKeyInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/resources/sshKey/{sshKeyId} [put]
func RestPutUpgradeK8sCluster ¶
func RestPutUpgradeK8sCluster(c echo.Context) error
RestPutUpgradeK8sCluster func is a rest api wrapper for UpgradeK8sCluster. RestPutUpgradeK8sCluster godoc @ID PutUpgradeK8sCluster @Summary Upgrade a K8sCluster's version @Description Upgrade a K8sCluster's version @Tags [Kubernetes] Cluster Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(default) @Param k8sClusterId path string true "K8sCluster ID" default(k8scluster-01) @Param upgradeK8sClusterReq body model.TbUpgradeK8sClusterReq true "Details of the TbUpgradeK8sClusterReq object" @Success 200 {object} model.SimpleMsg @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/k8scluster/{k8sClusterId}/upgrade [put]
func RestPutVmDataDisk ¶
func RestPutVmDataDisk(c echo.Context) error
RestPutVmDataDisk godoc @ID PutVmDataDisk @Summary Attach/Detach available dataDisk @Description Attach/Detach available dataDisk @Tags [Infra Resource] Data Disk Management @Accept json @Produce json @Param attachDetachDataDiskReq body model.TbAttachDetachDataDiskReq false "Request body to attach/detach dataDisk" @Param nsId path string true "Namespace ID" default(default) @Param mciId path string true "MCI ID" default(mci01) @Param vmId path string true "VM ID" default(g1-1) @Param option query string true "Option for MCI" 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} model.TbVmInfo @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.SimpleMsg @Router /ns/{nsId}/mci/{mciId}/vm/{vmId}/dataDisk [put]
func RestSearchImage ¶
func RestSearchImage(c echo.Context) error
RestSearchImage godoc @ID SearchImage @Summary Search image @Description Search image @Tags [Infra Resource] Image Management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(system) @Param keywords body RestSearchImageRequest true "Keywords" @Success 200 {object} RestGetAllImageResponse @Failure 404 {object} model.SimpleMsg @Failure 500 {object} model.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 "model.UpdateAssociatedObjectList" function with "add" argument.
func RestTestDeleteObjectAssociation ¶
func RestTestDeleteObjectAssociation(c echo.Context) error
RestTestDeleteObjectAssociation is a REST API call handling function to test "model.UpdateAssociatedObjectList" function with "delete" argument.
func RestTestGetAssociatedObjectCount ¶
func RestTestGetAssociatedObjectCount(c echo.Context) error
RestTestGetAssociatedObjectCount is a REST API call handling function to test "model.GetAssociatedObjectCount" function.
Types ¶
type RestFilterSpecsResponse ¶
type RestFilterSpecsResponse struct {
Spec []model.TbSpecInfo `json:"spec"`
}
RestFilterSpecsResponse is Response structure for RestFilterSpecs
type RestGetAllCustomImageResponse ¶
type RestGetAllCustomImageResponse struct {
CustomImage []model.TbCustomImageInfo `json:"customImage"`
}
Response structure for RestGetAllCustomImage
type RestGetAllDataDiskResponse ¶
type RestGetAllDataDiskResponse struct {
DataDisk []model.TbDataDiskInfo `json:"dataDisk"`
}
Response struct for RestGetAllDataDisk
type RestGetAllImageResponse ¶
type RestGetAllImageResponse struct {
Image []model.TbImageInfo `json:"image"`
}
Response structure for RestGetAllImage
type RestGetAllK8sClusterResponse ¶
type RestGetAllK8sClusterResponse struct {
K8sCluster []model.TbK8sClusterInfo `json:"cluster"`
}
Response structure for RestGetAllK8sCluster
type RestGetAllSecurityGroupResponse ¶
type RestGetAllSecurityGroupResponse struct {
SecurityGroup []model.TbSecurityGroupInfo `json:"securityGroup"`
}
Response structure for RestGetAllSecurityGroup
type RestGetAllSshKeyResponse ¶
type RestGetAllSshKeyResponse struct {
SshKey []model.TbSshKeyInfo `json:"sshKey"`
}
Response struct for RestGetAllSshKey
type RestGetAllSubnetResponse ¶ added in v0.9.9
type RestGetAllSubnetResponse struct {
SubnetInfoList []model.TbSubnetInfo `json:"subnetInfoList"`
}
Response structure for RestGetAllSubnet
type RestGetAllVNetResponse ¶
type RestGetAllVNetResponse struct {
VNet []model.TbVNetInfo `json:"vNet"`
}
Response structure for RestGetAllVNet
type RestLookupImageRequest ¶
type RestLookupImageRequest struct { ConnectionName string `json:"connectionName"` CspImageName string `json:"cspImageName"` }
Request structure for RestLookupImage
type RestLookupSpecRequest ¶
type RestLookupSpecRequest struct { ConnectionName string `json:"connectionName"` CspResourceId string `json:"cspResourceId"` }
Request structure for RestLookupSpec
type RestSearchImageRequest ¶
type RestSearchImageRequest struct {
Keywords []string `json:"keywords"`
}
Response structure for RestSearchImage
type TbFirewallRulesWrapper ¶
type TbFirewallRulesWrapper struct {
FirewallRules []model.TbFirewallRuleInfo `json:"firewallRules"` // validate:"required"`
}