model

package
v0.9.21 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package mci is to handle REST API for mci

Index

Constants

This section is empty.

Variables

View Source
var ProviderNames = map[string]string{
	"AWS":   "aws",
	"Azure": "azure",
	"GCP":   "gcp",
}

Functions

This section is empty.

Types

type Response

type Response struct {
	Success bool                   `json:"success" example:"true"`
	Status  int                    `json:"status,omitempty" example:"200"`
	Message string                 `json:"message" example:"Any message"`
	Detail  string                 `json:"details,omitempty" example:"Any details"`
	Object  map[string]interface{} `json:"object,omitempty"`
	List    []interface{}          `json:"list,omitempty"`
}

type RestPostVpnGcpToAwsRequest

type RestPostVpnGcpToAwsRequest struct {
	TfVars TfVarsGcpAwsVpnTunnel `json:"tfVars"`
}

type RestPostVpnRequest added in v0.8.14

type RestPostVpnRequest struct {
	Site1 SiteDetail `json:"site1"`
	Site2 SiteDetail `json:"site2"`
}

type SiteDetail

type SiteDetail struct {
	CSP    string `json:"csp" example:"aws"`
	Region string `json:"region" example:"ap-northeast-2"`
	// Zone              string `json:"zone,omitempty" example:"ap-northeast-2a"`
	VNet              string `json:"vnet" example:"vpc-xxxxx"`
	Subnet            string `json:"subnet,omitempty" example:"subnet-xxxxx"`
	GatewaySubnetCidr string `json:"gatewaySubnetCidr,omitempty" example:"xxx.xxx.xxx.xxx/xx"`
	ResourceGroup     string `json:"resourceGroup,omitempty" example:"rg-xxxxx"`
}

SiteDetail struct represents the structure for detailed site information

type SitesInfo

type SitesInfo struct {
	NsId  string `json:"nsId" example:"ns-01"`
	MciId string `json:"mciId" example:"mci-01"`
	Count int    `json:"count" example:"3"`
	Sites sites  `json:"sites"`
}

SitesInfo struct represents the overall site information including namespace and MCI ID

func NewSiteInfo

func NewSiteInfo(nsId, mciId string) *SitesInfo

type TfVarsGcpAwsVpnTunnel

type TfVarsGcpAwsVpnTunnel struct {
	ResourceGroupId   string `json:"resource-group-id,omitempty" default:"" example:""`
	AwsRegion         string `json:"aws-region" validate:"required" default:"ap-northeast-2" example:"ap-northeast-2"`
	AwsVpcId          string `json:"aws-vpc-id" validate:"required" example:"vpc-xxxxx"`
	AwsSubnetId       string `json:"aws-subnet-id" validate:"required" example:"subnet-xxxxx"`
	GcpRegion         string `json:"gcp-region" validate:"required" default:"asia-northeast3" example:"asia-northeast3"`
	GcpVpcNetworkName string `json:"gcp-vpc-network-name" validate:"required" default:"vpc01" example:"vpc01"`
}

Jump to

Keyboard shortcuts

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