mcir

package
v0.0.0-...-3d28840 Latest Latest
Warning

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

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

Documentation

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 [Admin] System management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 RestDelAllImage

func RestDelAllImage(c echo.Context) error

RestDelAllImage godoc @Summary Delete all images @Description Delete all images @Tags [MCIR] Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/image [delete]

func RestDelAllResources

func RestDelAllResources(c echo.Context) error

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 [MCIR] Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @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 [MCIR] Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @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 [MCIR] Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @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 [MCIR] Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId}/resources/vNet [delete]

func RestDelImage

func RestDelImage(c echo.Context) error

RestDelImage godoc @Summary Delete image @Description Delete image @Tags [MCIR] Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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

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 [MCIR] Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 RestDelVNet

func RestDelVNet(c echo.Context) error

RestDelVNet godoc @Summary Delete VNet @Description Delete VNet @Tags [MCIR] Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId}/resources/fetchSpecs [post]

func RestFilterSpecs

func RestFilterSpecs(c echo.Context) error

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

func RestFilterSpecsByRange

func RestFilterSpecsByRange(c echo.Context) error

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

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 [MCIR] Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Image management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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

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 [MCIR] Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Spec management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 RestLookupImage

func RestLookupImage(c echo.Context) error

RestLookupImage godoc @Summary Lookup image @Description Lookup image @Tags [Admin] Cloud environment management @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 [get]

func RestLookupImageList

func RestLookupImageList(c echo.Context) error

RestLookupImageList godoc @Summary Lookup image list @Description Lookup image list @Tags [Admin] Cloud environment management @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 [get]

func RestLookupSpec

func RestLookupSpec(c echo.Context) error

RestLookupSpec godoc @Summary Lookup spec @Description Lookup spec @Tags [Admin] Cloud environment management @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 [get]

func RestLookupSpecList

func RestLookupSpecList(c echo.Context) error

RestLookupSpecList godoc @Summary Lookup spec list @Description Lookup spec list @Tags [Admin] Cloud environment management @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 [get]

func RestPostImage

func RestPostImage(c echo.Context) error

RestPostImage godoc @Summary Register image @Description Register image @Tags [MCIR] Image management @Accept json @Produce json @Param registeringMethod query string true "registerWithInfo or registerWithId" @Param nsId path string true "Namespace ID" @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 [MCIR] Security group management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 [MCIR] Spec management @Accept json @Produce json @Param registeringMethod query string true "registerWithInfo or else" @Param nsId path string true "Namespace ID" @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 [MCIR] Access key management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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 RestPostVNet

func RestPostVNet(c echo.Context) error

RestPostVNet godoc @Summary Create VNet @Description Create VNet @Tags [MCIR] Network management @Accept json @Produce json @Param nsId path string true "Namespace ID" @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
function RestPutImage not yet implemented

// RestPutImage godoc // @Summary Update image // @Description Update image // @Tags [MCIR] Image management // @Accept json // @Produce json // @Param imageInfo body mcir.TbImageInfo true "Details for an image object" // @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 [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 [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" @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
function RestPutSshKey not yet implemented

// RestPutSshKey godoc // @Summary Update SSH Key // @Description Update SSH Key // @Tags [MCIR] Access key management // @Accept json // @Produce json // @Param sshKeyInfo body mcir.TbSshKeyInfo 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/{sshKeyId} [put]

func RestPutVNet

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

// RestPutVNet godoc // @Summary Update VNet // @Description Update VNet // @Tags [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

func RestSearchImage(c echo.Context) error

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

func RestTestAddObjectAssociation

func RestTestAddObjectAssociation(c echo.Context) error

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

func RestTestDeleteObjectAssociation

func RestTestDeleteObjectAssociation(c echo.Context) error

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

func RestTestGetAssociatedObjectCount

func RestTestGetAssociatedObjectCount(c echo.Context) error

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

func RestTestSortSpecs

func RestTestSortSpecs(c echo.Context) error

Types

type JSONResult

type JSONResult struct {
}

JSONResult's data field will be overridden by the specific type

type RestFilterSpecsResponse

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

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

Response structure for RestSearchImage

Jump to

Keyboard shortcuts

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