mcir

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 6 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestCheckResource

func RestCheckResource(c echo.Context) error

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

func RestDelAllDefaultResources added in v0.4.13

func RestDelAllDefaultResources(c echo.Context) error

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

func RestDelAllImage

func RestDelAllImage(c echo.Context) error

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

func RestDelAllResources

func RestDelAllResources(c echo.Context) error

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

func RestDelAllSecurityGroup

func RestDelAllSecurityGroup(c echo.Context) error

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

func RestDelAllSpec

func RestDelAllSpec(c echo.Context) error

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

func RestDelAllSshKey

func RestDelAllSshKey(c echo.Context) error

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

func RestDelAllVNet

func RestDelAllVNet(c echo.Context) error

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

func RestDelChildResource 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 RestDelFirewallRules added in v0.5.3

func RestDelFirewallRules(c echo.Context) error

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

func RestDelImage

func RestDelImage(c echo.Context) error

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

func RestDelResource

func RestDelResource(c echo.Context) error

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

func RestDelSecurityGroup

func RestDelSecurityGroup(c echo.Context) error

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

func RestDelSpec

func RestDelSpec(c echo.Context) error

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

func RestDelSshKey

func RestDelSshKey(c echo.Context) error

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

func RestDelSubnet added in v0.4.10

func RestDelSubnet(c echo.Context) error

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

func RestDelVNet

func RestDelVNet(c echo.Context) error

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

func RestFetchImages

func RestFetchImages(c echo.Context) error

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

func RestFetchSpecs

func RestFetchSpecs(c echo.Context) error

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

func RestFilterSpecs added in v0.2.8

func RestFilterSpecs(c echo.Context) error

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

func RestFilterSpecsByRange added in v0.2.8

func RestFilterSpecsByRange(c echo.Context) error

RestFilterSpecsByRange godoc @Summary Filter specs by range @Description Filter specs by range @Tags [Infra resource] MCIR Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @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 RestGetAllImage

func RestGetAllImage(c echo.Context) error

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

func RestGetAllResources

func RestGetAllResources(c echo.Context) error

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

func RestGetAllSecurityGroup

func RestGetAllSecurityGroup(c echo.Context) error

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

func RestGetAllSpec

func RestGetAllSpec(c echo.Context) error

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

func RestGetAllSshKey

func RestGetAllSshKey(c echo.Context) error

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

func RestGetAllVNet

func RestGetAllVNet(c echo.Context) error

RestGetAllVNet godoc @Summary List all VNets or VNets' ID @Description List all VNets or VNets' ID @Tags [Infra resource] MCIR Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Param option query string false "Option" Enums(id) @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 RestGetImage

func RestGetImage(c echo.Context) error

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

func RestGetResource

func RestGetResource(c echo.Context) error

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

func RestGetSecurityGroup

func RestGetSecurityGroup(c echo.Context) error

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

func RestGetSpec

func RestGetSpec(c echo.Context) error

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

func RestGetSshKey

func RestGetSshKey(c echo.Context) error

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

func RestGetVNet

func RestGetVNet(c echo.Context) error

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

func RestLoadCommonResource added in v0.4.9

func RestLoadCommonResource(c echo.Context) error

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

func RestLoadDefaultResource added in v0.4.13

func RestLoadDefaultResource(c echo.Context) error

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

func RestLookupImage

func RestLookupImage(c echo.Context) error

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

func RestLookupImageList

func RestLookupImageList(c echo.Context) error

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

func RestLookupSpec

func RestLookupSpec(c echo.Context) error

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

func RestLookupSpecList

func RestLookupSpecList(c echo.Context) error

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

func RestPostFirewallRules added in v0.5.3

func RestPostFirewallRules(c echo.Context) error

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

func RestPostImage

func RestPostImage(c echo.Context) error

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

func RestPostSecurityGroup

func RestPostSecurityGroup(c echo.Context) error

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

func RestPostSpec

func RestPostSpec(c echo.Context) error

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

func RestPostSshKey

func RestPostSshKey(c echo.Context) error

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

func RestPostSubnet added in v0.4.10

func RestPostSubnet(c echo.Context) error

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

func RestPostVNet

func RestPostVNet(c echo.Context) error

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

func RestPutImage

func RestPutImage(c echo.Context) error

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

func RestPutSecurityGroup

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

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

func RestPutSpec

func RestPutSpec(c echo.Context) error

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

func RestPutSshKey

func RestPutSshKey(c echo.Context) error

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

func RestPutVNet

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

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

func RestSearchImage added in v0.2.8

func RestSearchImage(c echo.Context) error

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

func RestTestAddObjectAssociation 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.

func RestTestSortSpecs added in v0.2.8

func RestTestSortSpecs(c echo.Context) error

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 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