Documentation
¶
Overview ¶
Package controller has handlers and their request/response bodies for migration APIs
Package common is to handle REST API for common funcitonalities ¶
Package common is to handle REST API for common funcitonalities
Index ¶
- func CreateUser(c echo.Context) error
- func DeleteInfra(c echo.Context) error
- func DeleteUser(c echo.Context) error
- func GetInfra(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUsers(c echo.Context) error
- func MigrateInfra(c echo.Context) error
- func PatchUser(c echo.Context) error
- func RecommendInfra(c echo.Context) error
- func UpdateUser(c echo.Context) error
- type CreateUserRequest
- type CreateUserResponse
- type GetUserResponse
- type GetUsersResponse
- type MigrateInfraRequest
- type MigrateInfraResponse
- type PatchUserRequest
- type PatchUserResponse
- type RecommendInfraRequest
- type RecommendInfraResponse
- type UpdateUserRequest
- type UpdateUserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
CreateUser godoc @ID CreateUser @Summary Create a new user @Description Create a new user with the given information. @Tags [Sample API] Users @Accept json @Produce json @Param User body CreateUserRequest true "User information" @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 201 {object} GetUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 400 {object} object "Invalid Request" @Router /sample/users [post]
func DeleteInfra ¶ added in v0.1.1
DeleteInfra godoc @ID DeleteInfra @Summary Delete the migrated mult-cloud infrastructure (MCI) @Description Delete the migrated mult-cloud infrastructure (MCI) @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciId path string true "Migrated Multi-Cloud Infrastructure (MCI) ID" default(mmci01) @Param action query string false "Action for deletion" Enums(terminate,force) default(terminate) @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} model.Response "The result of deleting the migrated multi-cloud infrastructure (MCI)" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci/{mciId} [delete]
func DeleteUser ¶
DeleteUser godoc @ID DeleteUser @Summary Delete a user @Description Delete a user with the given information. @Tags [Sample API] Users @Accept json @Produce json @Param id path int true "User ID" @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {string} string "User deletion successful" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "User Not Found" @Router /sample/users/{id} [delete]
func GetInfra ¶ added in v0.1.1
GetInfra godoc @ID GetInfra @Summary Get the migrated multi-cloud infrastructure (MCI) @Description Get the migrated multi-cloud infrastructure (MCI) @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciId path string true "Migrated Multi-Cloud Infrastructure (MCI) ID" default(mmci01) @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} MigrateInfraResponse "The migrated multi-cloud infrastructure (MCI) information" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci/{mciId} [get]
func GetUser ¶
GetUser godoc @ID GetUser @Summary Get specific user information @Description Get information of a user with a specific ID. @Tags [Sample API] Users @Accept json @Produce json @Param id path int true "User ID" @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} GetUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 404 {object} object "User Not Found" @Router /sample/users/{id} [get]
func GetUsers ¶
GetUsers godoc @ID GetUsers @Summary Get a list of users @Description Get information of all users. @Tags [Sample API] Users @Accept json @Produce json @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} GetUsersResponse "(sample) This is a sample description for success response in Swagger UI" @Failure 404 {object} object "User Not Found" @Router /sample/users [get]
func MigrateInfra ¶
MigrateInfra godoc @ID MigrateInfra @Summary Migrate an infrastructure to the multi-cloud infrastructure (MCI) @Description Migrate an infrastructure to the multi-cloud infrastructure (MCI) @Tags [Migration] Infrastructure @Accept json @Produce json @Param nsId path string true "Namespace ID" default(mig01) @Param mciInfo body MigrateInfraRequest true "Specify the information for the targeted mulci-cloud infrastructure (MCI)" @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} MigrateInfraResponse "Successfully migrated to the multi-cloud infrastructure" @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /migration/ns/{nsId}/mci [post]
func PatchUser ¶
PatchUser godoc @ID PatchUser @Summary Patch a user @Description Patch a user with the given information. @Tags [Sample API] Users @Accept json @Produce json @Param id path int true "User ID" @Param User body PatchUserRequest true "User information to update" @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} PatchUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "User Not Found" @Router /sample/users/{id} [patch]
func RecommendInfra ¶
RecommendInfra godoc @ID RecommendInfra @Summary Recommend an appropriate multi-cloud infrastructure (MCI) for cloud migration @Description Recommend an appropriate multi-cloud infrastructure (MCI) for cloud migration @Description @Description [Note] `desiredProvider` and `desiredRegion` are required. @Description - `desiredProvider` and `desiredRegion` can set on the query parameter or the request body. @Description @Description - If desiredProvider and desiredRegion are set on request body, the values in the query parameter will be ignored. @Tags [Recommendation] Infrastructure @Accept json @Produce json @Param UserInfra body RecommendInfraRequest true "Specify the your infrastructure to be migrated" @Param desiredProvider query string false "Provider (e.g., aws, azure, gcp)" Enums(aws,azure,gcp,ncp) default(aws) @Param desiredRegion query string false "Region (e.g., ap-northeast-2)" default(ap-northeast-2) @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} RecommendInfraResponse "The result of recommended infrastructure" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/mci [post]
func UpdateUser ¶
UpdateUser godoc @ID UpdateUser @Summary Update a user @Description Update a user with the given information. @Tags [Sample API] Users @Accept json @Produce json @Param id path int true "User ID" @Param User body UpdateUserRequest true "User information to update" @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 201 {object} UpdateUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 400 {object} object "Invalid Request" @Router /sample/users/{id} [put]
Types ¶
type CreateUserRequest ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type CreateUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type GetUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type GetUsersResponse ¶
type MigrateInfraRequest ¶
type MigrateInfraRequest struct {
tbmodel.TbMciDynamicReq
}
type MigrateInfraResponse ¶
type MigrateInfraResponse struct {
tbmodel.TbMciDynamicReq
}
type PatchUserRequest ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type PatchUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type RecommendInfraRequest ¶
type RecommendInfraRequest struct {
DesiredProvider string `json:"desiredProvider" example:"aws"`
DesiredRegion string `json:"desiredRegion" example:"ap-northeast-2"`
OnpremiseInfraModel onprem.OnPremInfra `json:"onpremiseInfraModel" validate:"required"`
}
type RecommendInfraResponse ¶
type RecommendInfraResponse struct {
recommendation.RecommendedInfraInfo
}
type UpdateUserRequest ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type UpdateUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser