handler

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckInfracodeOfGcpAwsVpn

func CheckInfracodeOfGcpAwsVpn(c echo.Context) error

CheckInfracodeOfGcpAwsVpn godoc @Summary Check and show changes by the current infracode to configure GCP to AWS VPN tunnels @Description Check and show changes by the current infracode to configure GCP to AWS VPN tunnels @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws/plan [post]

func CheckInfracodeOfGcpAzureVpn

func CheckInfracodeOfGcpAzureVpn(c echo.Context) error

CheckInfracodeOfGcpAzureVpn godoc @Summary Check and show changes by the current infracode to configure GCP to Azure VPN tunnels @Description Check and show changes by the current infracode to configure GCP to Azure VPN tunnels @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure/plan [post]

func CheckInfracodeOfTestEnv

func CheckInfracodeOfTestEnv(c echo.Context) error

CheckInfracodeOfTestEnv godoc @Summary Check the infracode and show changes of test environment @Description Check the infracode and show changes of test environment @Tags [Test env] Test environment management @Accept json @Produce json @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env/plan [post]

func ClearGcpAwsVpn

func ClearGcpAwsVpn(c echo.Context) error

ClearGcpAwsVpn godoc @Summary Clear the entire directory and configuration files @Description Clear the entire directory and configuration files @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws/env [delete]

func ClearGcpAzureVpn

func ClearGcpAzureVpn(c echo.Context) error

ClearGcpAzureVpn godoc @Summary Clear the entire directory and configuration files @Description Clear the entire directory and configuration files @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure/env [delete]

func ClearTestEnv

func ClearTestEnv(c echo.Context) error

ClearTestEnv godoc @Summary Clear the entire directory and configuration files @Description Clear the entire directory and configuration files @Tags [Test env] Test environment management @Accept json @Produce json @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env/env [delete]

func CreateGcpAwsVpn

func CreateGcpAwsVpn(c echo.Context) error

CreateGcpAwsVpn godoc @Summary Create network resources for VPN tunnel in GCP and AWS @Description Create network resources for VPN tunnel in GCP and AWS @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws [post]

func CreateGcpAzureVpn

func CreateGcpAzureVpn(c echo.Context) error

CreateGcpAzureVpn godoc @Summary Create network resources for VPN tunnel in GCP and Azure @Description Create network resources for VPN tunnel in GCP and Azure @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure [post]

func CreateInfracodeOfGcpAwsVpn

func CreateInfracodeOfGcpAwsVpn(c echo.Context) error

CreateInfracodeOfGcpAwsVpn godoc @Summary Create the infracode to configure GCP to AWS VPN tunnels @Description Create the infracode to configure GCP to AWS VPN tunnels @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param ParamsForInfracode body model.CreateInfracodeOfGcpAwsVpnRequest true "Parameters requied to create the infracode to configure GCP to AWS VPN tunnels" @Param x-request-id header string false "Custom request ID" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws/infracode [post]

func CreateInfracodeOfGcpAzureVpn

func CreateInfracodeOfGcpAzureVpn(c echo.Context) error

CreateInfracodeOfGcpAzureVpn godoc @Summary Create the infracode to configure GCP to Azure VPN tunnels @Description Create the infracode to configure GCP to Azure VPN tunnels @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param ParamsForInfracode body model.CreateInfracodeOfGcpAzureVpnRequest true "Parameters requied to create the infracode to configure GCP to Azure VPN tunnels" @Param x-request-id header string false "Custom request ID" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure/infracode [post]

func CreateInfracodeOfTestEnv

func CreateInfracodeOfTestEnv(c echo.Context) error

CreateInfrcodeOfGcpAzureVpn godoc @Summary Create the infracode to configure test environment @Description Create the infracode to configure test environment @Tags [Test env] Test environment management @Accept json @Produce json @Param ParamsForInfracode body model.CreateInfracodeOfTestEnvRequest true "Parameters requied to create the infracode to configure test environment" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env/infracode [post]

func CreateTestEnv

func CreateTestEnv(c echo.Context) error

CreateTestEnv godoc @Summary Create test environment @Description Create test environment @Tags [Test env] Test environment management @Accept json @Produce json @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env [post]

func CreateUser

func CreateUser(c echo.Context) error

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

func DeleteUser(c echo.Context) error

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 DestroyGcpAwsVpn

func DestroyGcpAwsVpn(c echo.Context) error

DestroyGcpAwsVpn godoc @Summary Destroy network resources that were used to configure GCP as an AWS VPN tunnel @Description Destroy network resources that were used to configure GCP as an AWS VPN tunnel @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws [delete]

func DestroyGcpAzureVpn

func DestroyGcpAzureVpn(c echo.Context) error

DestroyGcpAzureVpn godoc @Summary Destroy network resources that were used to configure GCP as an Azure VPN tunnel @Description Destroy network resources that were used to configure GCP as an Azure VPN tunnel @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure [delete]

func DestroyTestEnv

func DestroyTestEnv(c echo.Context) error

DestroyTestEnv godoc @Summary Destroy test environment @Description Destroy test environment @Tags [Test env] Test environment management @Accept json @Produce json @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env [delete]

func EraseTerrarium added in v0.0.7

func EraseTerrarium(c echo.Context) error

EraseTerrarium godoc @Summary Erase the entire terrarium including directories and configuration files @Description Erase the entire terrarium including directories and configuration files @Tags [Terrarium] An environment to enrich the multi-cloud infrastructure @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId} [delete]

func GetRequestStatusOfGcpAwsVpn

func GetRequestStatusOfGcpAwsVpn(c echo.Context) error

GetRequestStatusOfGcpAwsVpn godoc @Summary Check the status of a specific request by its ID @Description Check the status of a specific request by its ID @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param requestId path string true "Request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws/request/{requestId} [get]

func GetRequestStatusOfGcpAzureVpn

func GetRequestStatusOfGcpAzureVpn(c echo.Context) error

GetRequestStatusOfGcpAzureVpn godoc @Summary Check the status of a specific request by its ID @Description Check the status of a specific request by its ID @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param requestId path string true "Request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure/request/{requestId} [get]

func GetRequestStatusOfTestEnv

func GetRequestStatusOfTestEnv(c echo.Context) error

GetRequestStatusOfTestEnv godoc @Summary Get the status of the request to configure test environment @Description Get the status of the request to configure test environment @Tags [Test env] Test environment management @Accept json @Produce json @Param requestId path string true "Request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env/request/{requestId}/status [get]

func GetResouceInfoOfTestEnv

func GetResouceInfoOfTestEnv(c echo.Context) error

GetResouceInfoOfTestEnv godoc @Summary Get all resource info of test environment @Description Get all resource info of test environment @Tags [Test env] Test environment management @Accept json @Produce json @Param detail query string false "Resource info by detail (refined, raw)" default(refined) @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env [get]

func GetResourceInfoOfGcpAwsVpn

func GetResourceInfoOfGcpAwsVpn(c echo.Context) error

GetResourceInfoOfGcpAwsVpn godoc @Summary Get resource info to configure GCP to AWS VPN tunnels @Description Get resource info to configure GCP to AWS VPN tunnels @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param detail query string false "Resource info by detail (refined, raw)" default(refined) @Param x-request-id header string false "custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws [get]

func GetResourceInfoOfGcpAzureVpn

func GetResourceInfoOfGcpAzureVpn(c echo.Context) error

GetResourceInfoOfGcpAzureVpn godoc @Summary Get resource info to configure GCP to Azure VPN tunnels @Description Get resource info to configure GCP to Azure VPN tunnels @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param detail query string false "Resource info by detail (refined, raw)" default(refined) @Param x-request-id header string false "Custom request ID" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure [get]

func GetUser

func GetUser(c echo.Context) error

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

func GetUsers(c echo.Context) error

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 HTTPVersion

func HTTPVersion(c echo.Context) error

HTTPVersion godoc @Summary Check HTTP version of incoming request @Description Checks and logs the HTTP version of the incoming request to the server console. @Tags [System] Utility @Accept json @Produce json @Success 200 {object} model.Response @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /httpVersion [get]

func InitEnvForGcpAwsVpn added in v0.0.7

func InitEnvForGcpAwsVpn(c echo.Context) error

InitEnvForGcpAwsVpn godoc @Summary Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel @Description Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel @Tags [VPN] GCP to AWS VPN tunnel configuration @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-aws/env [post]

func InitEnvForGcpAzureVpn added in v0.0.7

func InitEnvForGcpAzureVpn(c echo.Context) error

InitEnvForGcpAzureVpn godoc @Summary Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel @Description Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel @Tags [VPN] GCP to Azure VPN tunnel configuration (under development) @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Param x-request-id header string false "Custom request ID" @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 500 {object} model.Response "Internal Server Error" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId}/vpn/gcp-azure/env [post]

func InitTerrariumForTestEnv

func InitTerrariumForTestEnv(c echo.Context) error

InitTerrariumForTestEnv godoc @Summary Initialize a multi-cloud terrarium for test environment @Description Initialize a multi-cloud terrarium for test environment @Tags [Test env] Test environment management @Accept json @Produce json @Success 201 {object} model.Response "Created" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /test-env/init [post]

func IssueTerrarium added in v0.0.7

func IssueTerrarium(c echo.Context) error

IssueTerrarium godoc @Summary Issue/create a terrarium @Description Issue/create a terrarium @Tags [Terrarium] An environment to enrich the multi-cloud infrastructure @Accept json @Produce json @Param TerrariumInfo body model.TerrariumInfo true "Information for a new terrarium" @Success 200 {object} model.Response "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr [post]

func PatchUser

func PatchUser(c echo.Context) error

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 ReadAllTerrarium added in v0.0.7

func ReadAllTerrarium(c echo.Context) error

ReadAllTerrarium godoc @Summary Read all terrarium @Description Read all terrarium @Tags [Terrarium] An environment to enrich the multi-cloud infrastructure @Accept json @Produce json @Success 200 {array} model.TerrariumInfo "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr [get]

func ReadTerrarium added in v0.0.7

func ReadTerrarium(c echo.Context) error

ReadTerrarium godoc @Summary Read a terrarium @Description Read a terrarium @Tags [Terrarium] An environment to enrich the multi-cloud infrastructure @Accept json @Produce json @Param trId path string true "Terrarium ID" default(tr01) @Success 200 {object} model.TerrariumInfo "OK" @Failure 400 {object} model.Response "Bad Request" @Failure 503 {object} model.Response "Service Unavailable" @Router /tr/{trId} [get]

func Readyz

func Readyz(c echo.Context) error

Readyz func is for checking mc-terrarium server is ready. Readyz godoc @Summary Check mc-terrarium server is ready @Description Check mc-terrarium server is ready @Tags [System] Utility @Accept json @Produce json @Success 200 {object} model.Response @Failure 503 {object} model.Response @Router /readyz [get]

func TofuVersion

func TofuVersion(c echo.Context) error

TofuVersion godoc @Summary Check Tofu version @Description Check Tofu version @Tags [System] Utility @Accept json @Produce json @Success 200 {object} model.Response @Failure 503 {object} model.Response @Router /tofuVersion [get]

func UpdateUser

func UpdateUser(c echo.Context) error

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

type CreateUserRequest struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

type CreateUserResponse

type CreateUserResponse struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

type GetUserResponse

type GetUserResponse struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

type GetUsersResponse

type GetUsersResponse struct {
	Users []model.MyUser `json:"users"`
}

type PatchUserRequest

type PatchUserRequest struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

type PatchUserResponse

type PatchUserResponse struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

type UpdateUserRequest

type UpdateUserRequest struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

type UpdateUserResponse

type UpdateUserResponse struct {
	model.MyUser
}

[Note] Struct Embedding is used to inherit the fields of MyUser

Jump to

Keyboard shortcuts

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