Documentation
¶
Overview ¶
Package controller has handlers and their request/response bodies for migration APIs
Package common is to handle REST API for common funcitonalities
Index ¶
- func CreateUser(c echo.Context) error
- func DeleteUser(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUsers(c echo.Context) error
- func MigrateInfra(c echo.Context) error
- func MigrateInstance(c echo.Context) error
- func MigrateNetwork(c echo.Context) error
- func MigrateStorage(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 Infrastructure
- type MigrateInfraRequest
- type MigrateInfraResponse
- type MigrateInstanceRequest
- type MigrateInstanceResponse
- type MigrateNetworkRequest
- type MigrateNetworkResponse
- type MigrateStorageRequest
- type MigrateStorageResponse
- 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 @Summary Create a new user @Description Create a new user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param User body CreateUserRequest true "User information" @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 DeleteUser ¶
DeleteUser godoc @Summary Delete a user @Description Delete a user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User 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 GetUser ¶
GetUser godoc @Summary Get specific user information @Description Get information of a user with a specific ID. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User 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 @Summary Get a list of users @Description Get information of all users. @Tags [Sample] Users @Accept json @Produce json @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 @Summary Migrate an infrastructure on a cloud platform @Description It migrates an infrastructure on a cloud platform. Infrastructure includes network, storage, compute, and so on. @Tags [Migration] Infrastructure @Accept json @Produce json @Param InfrastructureInfo body MigrateInfraRequest true "Specify network, disk, compute, security group, virtual machine, etc." @Success 200 {object} MigrateInfraResponse "Successfully migrated infrastructure on a cloud platform" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /migration/infra [post]
func MigrateInstance ¶
MigrateInstance godoc @Summary (Skeleton) Migrate instance on a cloud platform @Description It migrates instance on a cloud platform. Storage includes name, spec, OS, and so on. @Tags [Migration] Infrastructure @Accept json @Produce json @Param InstanceInfo body MigrateInstanceRequest true "Specify name, spec, OS, and so on." @Success 200 {object} MigrateInstanceResponse "Successfully migrated storage on a cloud platform" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /migration/infra/instance [post]
func MigrateNetwork ¶
MigrateNetwork godoc @Summary (Skeleton) Migrate network on a cloud platform @Description It migrates network on a cloud platform. Network includes name, ID, IPv4 CIDR block, IPv6 CIDR block, and so on. @Tags [Migration] Infrastructure @Accept json @Produce json @Param NetworkInfo body MigrateNetworkRequest true "Specify name, IPv4 CIDR block, etc." @Success 200 {object} MigrateNetworkResponse "Successfully migrated network on a cloud platform" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /migration/infra/network [post]
func MigrateStorage ¶
MigrateStorage godoc @Summary (Skeleton) Migrate storage on a cloud platform @Description It migrates storage on a cloud platform. Storage includes name, ID, type, size, and so on. @Tags [Migration] Infrastructure @Accept json @Produce json @Param StorageInfo body MigrateStorageRequest true "Specify name, type, size, affiliated Network ID, and so on." @Success 200 {object} MigrateStorageResponse "Successfully migrated storage on a cloud platform" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /migration/infra/storage [post]
func PatchUser ¶
PatchUser godoc @Summary Patch a user @Description Patch a user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User ID" @Param User body PatchUserRequest true "User information to update" @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 @Summary Recommend an appropriate infrastructure for cloud migration @Description It recommends a cloud infrastructure most similar to the input. Infrastructure includes network, storage, compute, and so on. @Tags [Recommendation] Infrastructure @Accept json @Produce json @Param UserInfrastructure body RecommendInfraRequest true "Specify network, disk, compute, security group, virtual machine, etc." @Success 200 {object} RecommendInfraResponse "Successfully recommended an appropriate infrastructure for cloud migration" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /recommendation/infra [post]
func UpdateUser ¶
UpdateUser godoc @Summary Update a user @Description Update a user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User ID" @Param User body UpdateUserRequest true "User information to update" @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 Infrastructure ¶
type MigrateInfraRequest ¶
type MigrateInfraRequest struct {
model.TbMcisDynamicReq
}
type MigrateInfraResponse ¶
type MigrateInfraResponse struct {
model.TbMcisInfo
}
type MigrateInstanceRequest ¶
type MigrateInstanceRequest struct {
model.DummyInstance
}
type MigrateInstanceResponse ¶
type MigrateInstanceResponse struct {
model.DummyInstance
}
type MigrateNetworkRequest ¶
type MigrateNetworkRequest struct {
model.DummyNetwork
}
type MigrateNetworkResponse ¶
type MigrateNetworkResponse struct {
model.DummyNetwork
}
type MigrateStorageRequest ¶
type MigrateStorageRequest struct {
model.DummyStorage
}
type MigrateStorageResponse ¶
type MigrateStorageResponse struct {
model.DummyStorage
}
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 {
Infrastructure
}
type RecommendInfraResponse ¶
type RecommendInfraResponse struct {
Infrastructure
}
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