Documentation ¶
Index ¶
- Constants
- func CheckFolderAndCreate(folderPath string) error
- func ConvertJsonString(v interface{}) (string, error)
- func DeleteModel(modelIID IID) (bool, error)
- func InitLog()
- type Application
- type CSP
- type DataDisk
- type Database
- type EnvironmentDetails
- type FirewallRule
- type HealthCheck
- type HealthChecker
- type IID
- type IngressRule
- type JSON_Model
- func GetModel(modelIID IID) (JSON_Model, error)
- func ListModel() ([]*JSON_Model, error)
- func UpdateModel(modelIId IID, rsInfo JSON_Model) (JSON_Model, error)
- func UpdateSubnetInfoList(modelIId IID, newSubnetInfoList []SubnetInfo) (JSON_Model, error)
- func WriteModel(modelName string, rsInfo JSON_Model) (JSON_Model, error)
- type KeyPair
- type KeyValue
- type LbListener
- type Listener
- type LoadBalancer
- type MCIS
- type MigrationModel
- type NLB
- type Namespace
- type Replica_RS
- type Replication
- type Resource
- type SG
- type SecurityGroup
- type Subnet
- type SubnetInfo
- type TargetEnvironment
- type TargetGroup
- type VM
- type VMImage
- type VMInstance
- type VNet
- type VPCInstance
- type WebServer
Constants ¶
View Source
const (
ReplicationModelDir string = "/.replication_model"
)
Variables ¶
This section is empty.
Functions ¶
func CheckFolderAndCreate ¶
Check if the Folder Exists. If Not, Create it
func ConvertJsonString ¶
Cloud Object를 JSON String 타입으로 변환
func DeleteModel ¶
Types ¶
type Application ¶
type EnvironmentDetails ¶
type FirewallRule ¶
type HealthCheck ¶
type HealthChecker ¶
type IngressRule ¶
type JSON_Model ¶
type JSON_Model struct {
MigrationModel MigrationModel `json:"migrationModel"`
}
func GetModel ¶
func GetModel(modelIID IID) (JSON_Model, error)
func ListModel ¶
func ListModel() ([]*JSON_Model, error)
func UpdateModel ¶
func UpdateModel(modelIId IID, rsInfo JSON_Model) (JSON_Model, error)
func UpdateSubnetInfoList ¶
func UpdateSubnetInfoList(modelIId IID, newSubnetInfoList []SubnetInfo) (JSON_Model, error)
Function to update SubnetInfoList in the first vNet resource
func WriteModel ¶
func WriteModel(modelName string, rsInfo JSON_Model) (JSON_Model, error)
type KeyPair ¶
type KeyPair struct { ConnectionName string `json:"connectionName"` CspSshKeyId string `json:"cspSshKeyId"` Description string `json:"description"` Fingerprint string `json:"fingerprint"` Name string `json:"name"` PrivateKey string `json:"privateKey"` PublicKey string `json:"publicKey"` Username string `json:"username"` VerifiedUsername string `json:"verifiedUsername"` }
type LbListener ¶
type LoadBalancer ¶
type LoadBalancer struct { Name string `yaml:"Name"` Listeners []Listener `yaml:"Listeners"` HealthCheck HealthCheck `yaml:"HealthCheck"` VMInstances []VMInstance `yaml:"VMInstances"` }
type MigrationModel ¶
type NLB ¶
type NLB struct { CspNLBId string `json:"cspNLBId"` Description string `json:"description"` HealthChecker HealthChecker `json:"healthChecker"` Listener Listener `json:"listener"` Scope string `json:"scope"` TargetGroup TargetGroup `json:"targetGroup"` Type string `json:"type"` }
type Replica_RS ¶
type Replica_RS struct { VMInstance VMInstance `yaml:"VMInstance"` LoadBalancer LoadBalancer `yaml:"LoadBalancer"` }
type Replication ¶
type Replication struct { TemplateFormatVersion string `yaml:"TemplateFormatVersion"` Description string `yaml:"Description"` CSP CSP `yaml:"CSP"` Resources Replica_RS `yaml:"Resources"` }
func GetReplicaResources ¶
func GetReplicaResources(yamlName string) (Replication, error)
type Resource ¶
type Resource struct { Type string `json:"type"` NsSpecifications *Namespace `json:"nsSpecifications,omitempty"` VNetSpecifications *VNet `json:"vNetSpecifications,omitempty"` McisSpecifications *MCIS `json:"mcisSpecifications,omitempty"` ImgSpecifications *VMImage `json:"imgSpecifications,omitempty"` SgSpecifications *SG `json:"sgSpecifications,omitempty"` KeySpecifications *KeyPair `json:"keySpecifications,omitempty"` DbSpecifications *Database `json:"dbSpecifications,omitempty"` DiskSpecifications *DataDisk `json:"diskSpecifications,omitempty"` NlbSpecifications *NLB `json:"nlbSpecifications,omitempty"` AppSpecifications *Application `json:"appSpecifications,omitempty"` WebSvrSpecifications *WebServer `json:"webSvrSpecifications,omitempty"` }
type SG ¶
type SG struct { CspSecurityGroupId string `json:"cspSecurityGroupId"` Description string `json:"description"` FirewallRules []FirewallRule `json:"firewallRules"` Name string `json:"name"` VNetId string `json:"vNetId"` }
type SecurityGroup ¶
type SecurityGroup struct { GroupDescription string `yaml:"GroupDescription"` SecurityGroupIngress []IngressRule `yaml:"SecurityGroupIngress"` }
type SubnetInfo ¶
type SubnetInfo struct { Description string `json:"description,omitempty"` Ipv4CIDR string `json:"ipv4_CIDR,omitempty"` KeyValueList []KeyValue `json:"keyValueList,omitempty"` Name string `json:"name,omitempty"` }
Sub structs for nested objects in specifications
type TargetEnvironment ¶
type TargetEnvironment struct { Provider string `json:"provider"` Details EnvironmentDetails `json:"details"` }
type TargetGroup ¶
type VM ¶
type VM struct { DataDiskIds []string `json:"dataDiskIds,omitempty"` Description string `json:"description,omitempty"` IdByCsp string `json:"idByCsp,omitempty"` ImageId string `json:"imageId,omitempty"` Label string `json:"label,omitempty"` Name string `json:"name,omitempty"` RootDiskSize string `json:"rootDiskSize,omitempty"` RootDiskType string `json:"rootDiskType,omitempty"` SecurityGroupIds []string `json:"securityGroupIds,omitempty"` SpecId string `json:"specId,omitempty"` SshKeyId string `json:"sshKeyId,omitempty"` SubGroupSize string `json:"subGroupSize,omitempty"` VNetId string `json:"vNetId,omitempty"` SubnetId string `json:"subnetId,omitempty"` VmUserAccount string `json:"vmUserAccount,omitempty"` VmUserPassword string `json:"vmUserPassword,omitempty"` }
type VMInstance ¶
type VMInstance struct { Name string `yaml:"Name"` ImageId string `yaml:"ImageId"` VMSpecId string `yaml:"VMSpecId"` KeyPairName string `yaml:"KeyPairName"` SecurityGroups []SecurityGroup `yaml:"SecurityGroups"` VPC VPCInstance `yaml:"VPCInstance"` Subnets []Subnet `yaml:"Subnets"` }
type VNet ¶
type VNet struct { CidrBlock string `json:"cidrBlock"` CspVNetId string `json:"cspVNetId"` Description string `json:"description"` Name string `json:"name"` SubnetInfoList []SubnetInfo `json:"subnetInfoList"` }
type VPCInstance ¶
Click to show internal directories.
Click to hide internal directories.