restruntime

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

README

runtime for REST-based API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNLBVMs added in v0.5.11

func AddNLBVMs(c echo.Context) error

func AddNodeGroup added in v0.6.14

func AddNodeGroup(c echo.Context) error

func AddRules added in v0.5.4

func AddRules(c echo.Context) error

(1) get rules info from REST Call (2) call common-runtime API (3) return REST Json Format

func AddSubnet added in v0.4.9

func AddSubnet(c echo.Context) error

(1) get subnet info from REST Call (2) call common-runtime API (3) return REST Json Format

func AllClusterList added in v0.6.15

func AllClusterList(c echo.Context) error

func AnyCall added in v0.6.9

func AnyCall(c echo.Context) error

func ApiServer

func ApiServer(routes []route)

================ REST API Server: setup & start

func AttachDisk added in v0.6.7

func AttachDisk(c echo.Context) error

func ChangeDiskSize added in v0.6.7

func ChangeDiskSize(c echo.Context) error

func ChangeHealthChecker added in v0.5.11

func ChangeHealthChecker(c echo.Context) error

---------------------------------------------------// @todo To support or not will be decided later. // ---------------------------------------------------//

func ChangeListener added in v0.5.11

func ChangeListener(c echo.Context) error

---------------------------------------------------// @todo To support or not will be decided later. // ---------------------------------------------------//

func ChangeNodeGroupScaling added in v0.6.14

func ChangeNodeGroupScaling(c echo.Context) error

func ChangeVMGroup added in v0.5.11

func ChangeVMGroup(c echo.Context) error

---------------------------------------------------// @todo To support or not will be decided later. // ---------------------------------------------------//

func ControlVM added in v0.4.9

func ControlVM(c echo.Context) error

func CreateCluster added in v0.6.14

func CreateCluster(c echo.Context) error

func CreateConnectionConfig added in v0.4.9

func CreateConnectionConfig(c echo.Context) error

================ ConnectionConfig Handler

func CreateDisk added in v0.6.7

func CreateDisk(c echo.Context) error

func CreateKey added in v0.4.9

func CreateKey(c echo.Context) error

createKey godoc @Summary Create SSH Key @Description Create SSH Key @Tags [CCM] Access key management @Accept json @Produce json @Param keyPairCreateReq body JSONResult{ConnectionName=string,ReqInfo=JSONResult{Name=string}} true "Request body to create key" @Success 200 {object} resources.KeyPairInfo @Failure 404 {object} SimpleMsg @Failure 500 {object} SimpleMsg @Router /keypair [post]

func CreateNLB added in v0.5.10

func CreateNLB(c echo.Context) error

func CreateSecurity added in v0.4.9

func CreateSecurity(c echo.Context) error
// createSecurity godoc

// @Summary Create Security Group // @Description Create Security Group // @Tags [CCM] Security Group management // @Accept json // @Produce json // @Param securityGroupCreateReq body securityGroupCreateReq true "Request body to create Security Group" // @Success 200 {object} resources.SecurityInfo // @Failure 404 {object} SimpleMsg // @Failure 500 {object} SimpleMsg // @Router /securitygroup [post]

func CreateVPC added in v0.4.9

func CreateVPC(c echo.Context) error

createVPC godoc @Summary Create VPC @Description Create VPC @Tags [CCM] VPC management @Accept json @Produce json @Param vpcCreateReq body vpcCreateReq true "Request body to create VPC" @Success 200 {object} resources.VPCInfo @Failure 404 {object} SimpleMsg @Failure 500 {object} SimpleMsg @Router /vpc [post]

func DeleteCSPCluster added in v0.6.14

func DeleteCSPCluster(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCSPDisk added in v0.6.7

func DeleteCSPDisk(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCSPKey added in v0.4.9

func DeleteCSPKey(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCSPMyImage added in v0.6.10

func DeleteCSPMyImage(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCSPNLB added in v0.5.10

func DeleteCSPNLB(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCSPSecurity added in v0.4.9

func DeleteCSPSecurity(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCSPVPC added in v0.4.9

func DeleteCSPVPC(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteCluster added in v0.6.14

func DeleteCluster(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteConnectionConfig added in v0.4.9

func DeleteConnectionConfig(c echo.Context) error

func DeleteDisk added in v0.6.7

func DeleteDisk(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteKey added in v0.4.9

func DeleteKey(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteMyImage added in v0.6.10

func DeleteMyImage(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteNLB added in v0.5.10

func DeleteNLB(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteSecurity added in v0.4.9

func DeleteSecurity(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DeleteVPC added in v0.4.9

func DeleteVPC(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func DetachDisk added in v0.6.7

func DetachDisk(c echo.Context) error

func EndpointInfo added in v0.4.9

func EndpointInfo(c echo.Context) error

================ Endpoint Info

func GetAllSPLockInfo added in v0.5.7

func GetAllSPLockInfo(c echo.Context) error

func GetCSPResourceInfo added in v0.6.17

func GetCSPResourceInfo(c echo.Context) error

func GetCSPResourceName added in v0.6.6

func GetCSPResourceName(c echo.Context) error

func GetCSPVM added in v0.6.16

func GetCSPVM(c echo.Context) error

func GetCloudDriver added in v0.4.9

func GetCloudDriver(c echo.Context) error

func GetCloudOSMetaInfo added in v0.5.1

func GetCloudOSMetaInfo(c echo.Context) error

================ CloudOS Metainfo

func GetCluster added in v0.6.14

func GetCluster(c echo.Context) error

func GetClusterOwnerVPC added in v0.6.14

func GetClusterOwnerVPC(c echo.Context) error

func GetConnectionConfig added in v0.4.9

func GetConnectionConfig(c echo.Context) error

func GetCredential added in v0.4.9

func GetCredential(c echo.Context) error

func GetDisk added in v0.6.7

func GetDisk(c echo.Context) error

func GetImage added in v0.4.9

func GetImage(c echo.Context) error

func GetKey added in v0.4.9

func GetKey(c echo.Context) error

func GetMyImage added in v0.6.10

func GetMyImage(c echo.Context) error

func GetNLB added in v0.5.10

func GetNLB(c echo.Context) error

func GetNLBOwnerVPC added in v0.5.11

func GetNLBOwnerVPC(c echo.Context) error

func GetOrgVMSpec added in v0.4.9

func GetOrgVMSpec(c echo.Context) error

func GetPriceInfo added in v0.8.2

func GetPriceInfo(c echo.Context) error

func GetRegion added in v0.4.9

func GetRegion(c echo.Context) error

func GetRegionZone added in v0.7.6

func GetRegionZone(c echo.Context) error

func GetRegionZonePreConfig added in v0.8.5

func GetRegionZonePreConfig(c echo.Context) error

func GetSGOwnerVPC added in v0.5.5

func GetSGOwnerVPC(c echo.Context) error

func GetSecurity added in v0.4.9

func GetSecurity(c echo.Context) error

func GetVM added in v0.4.9

func GetVM(c echo.Context) error

func GetVMGroupHealthInfo added in v0.5.11

func GetVMGroupHealthInfo(c echo.Context) error

func GetVMSpec added in v0.4.9

func GetVMSpec(c echo.Context) error

func GetVMStatus added in v0.4.9

func GetVMStatus(c echo.Context) error

func GetVMUsingRS added in v0.5.5

func GetVMUsingRS(c echo.Context) error

func GetVPC added in v0.4.9

func GetVPC(c echo.Context) error

func ListAllCluster added in v0.6.14

func ListAllCluster(c echo.Context) error

list all Clusters for management (1) get args from REST Call (2) get all Cluster List by common-runtime API (3) return REST Json Format

func ListAllDisk added in v0.6.7

func ListAllDisk(c echo.Context) error

list all Disks for management (1) get args from REST Call (2) get all Disk List by common-runtime API (3) return REST Json Format

func ListAllKey added in v0.4.9

func ListAllKey(c echo.Context) error

list all KeyPairs for management (1) get args from REST Call (2) get all KeyPair List by common-runtime API (3) return REST Json Format

func ListAllMyImage added in v0.6.10

func ListAllMyImage(c echo.Context) error

list all MyImages for management (1) get args from REST Call (2) get all MyImage List by common-runtime API (3) return REST Json Format

func ListAllNLB added in v0.5.10

func ListAllNLB(c echo.Context) error

list all NLBs for management (1) get args from REST Call (2) get all NLB List by common-runtime API (3) return REST Json Format

func ListAllSecurity added in v0.4.9

func ListAllSecurity(c echo.Context) error

list all SGs for management (1) get args from REST Call (2) get all SG List by common-runtime API (3) return REST Json Format

func ListAllVM added in v0.4.9

func ListAllVM(c echo.Context) error

list all VMs for management (1) get args from REST Call (2) get all VM List by common-runtime API (3) return REST Json Format

func ListAllVPC added in v0.4.9

func ListAllVPC(c echo.Context) error

list all VPCs for management (1) get args from REST Call (2) get all VPC List by common-runtime API (3) return REST Json Format

func ListCloudDriver added in v0.4.9

func ListCloudDriver(c echo.Context) error

func ListCloudOS added in v0.4.9

func ListCloudOS(c echo.Context) error

================ List of support CloudOS

func ListCluster added in v0.6.14

func ListCluster(c echo.Context) error

func ListConnectionConfig added in v0.4.9

func ListConnectionConfig(c echo.Context) error

func ListCredential added in v0.4.9

func ListCredential(c echo.Context) error

func ListDisk added in v0.6.7

func ListDisk(c echo.Context) error

func ListImage added in v0.4.9

func ListImage(c echo.Context) error

================ Image Handler

func ListKey added in v0.4.9

func ListKey(c echo.Context) error

func ListMyImage added in v0.6.10

func ListMyImage(c echo.Context) error

func ListNLB added in v0.5.10

func ListNLB(c echo.Context) error

func ListOrgRegion added in v0.7.6

func ListOrgRegion(c echo.Context) error

func ListOrgRegionPreConfig added in v0.8.5

func ListOrgRegionPreConfig(c echo.Context) error

func ListOrgVMSpec added in v0.4.9

func ListOrgVMSpec(c echo.Context) error

func ListOrgZone added in v0.7.6

func ListOrgZone(c echo.Context) error

func ListProductFamily added in v0.8.2

func ListProductFamily(c echo.Context) error

================ PriceInfo Handler

func ListRegion added in v0.4.9

func ListRegion(c echo.Context) error

func ListRegionZone added in v0.7.6

func ListRegionZone(c echo.Context) error

================ RegionZone Handler

func ListRegionZonePreConfig added in v0.8.5

func ListRegionZonePreConfig(c echo.Context) error

================ RegionZone Handler (Pre-Config Version)

func ListSecurity added in v0.4.9

func ListSecurity(c echo.Context) error

func ListVM added in v0.4.9

func ListVM(c echo.Context) error

func ListVMSpec added in v0.4.9

func ListVMSpec(c echo.Context) error

================ VMSpec Handler

func ListVMStatus added in v0.4.9

func ListVMStatus(c echo.Context) error

func ListVPC added in v0.4.9

func ListVPC(c echo.Context) error

func RegisterCloudDriver added in v0.4.9

func RegisterCloudDriver(c echo.Context) error

================ CloudDriver Handler

func RegisterCluster added in v0.6.14

func RegisterCluster(c echo.Context) error

func RegisterCredential added in v0.4.9

func RegisterCredential(c echo.Context) error

================ Credential Handler

func RegisterDisk added in v0.6.7

func RegisterDisk(c echo.Context) error

func RegisterKey added in v0.4.12

func RegisterKey(c echo.Context) error

func RegisterMyImage added in v0.6.10

func RegisterMyImage(c echo.Context) error

func RegisterNLB added in v0.5.10

func RegisterNLB(c echo.Context) error

func RegisterRegion added in v0.4.9

func RegisterRegion(c echo.Context) error

================ Region Handler

func RegisterSecurity added in v0.4.12

func RegisterSecurity(c echo.Context) error

func RegisterSubnet added in v0.7.6

func RegisterSubnet(c echo.Context) error

func RegisterVM added in v0.4.12

func RegisterVM(c echo.Context) error

func RegisterVPC added in v0.4.12

func RegisterVPC(c echo.Context) error

func RemoveCSPSubnet added in v0.4.9

func RemoveCSPSubnet(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func RemoveNLBVMs added in v0.5.11

func RemoveNLBVMs(c echo.Context) error

func RemoveNodeGroup added in v0.6.14

func RemoveNodeGroup(c echo.Context) error

func RemoveRules added in v0.5.4

func RemoveRules(c echo.Context) error

(1) get rules info from REST Call (2) call common-runtime API (3) return REST Json Format

func RemoveSubnet added in v0.4.9

func RemoveSubnet(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func RunServer added in v0.2.1

func RunServer()

func SSHRun added in v0.4.9

func SSHRun(c echo.Context) error

================ SSH RUN

func SetNodeGroupAutoScaling added in v0.6.14

func SetNodeGroupAutoScaling(c echo.Context) error

func SnapshotVM added in v0.6.10

func SnapshotVM(c echo.Context) error

func StartVM added in v0.4.9

func StartVM(c echo.Context) error

func TerminateCSPVM added in v0.4.9

func TerminateCSPVM(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func TerminateVM added in v0.4.9

func TerminateVM(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnRegisterCloudDriver added in v0.4.9

func UnRegisterCloudDriver(c echo.Context) error

func UnRegisterCredential added in v0.4.9

func UnRegisterCredential(c echo.Context) error

func UnRegisterRegion added in v0.4.9

func UnRegisterRegion(c echo.Context) error

func UnregisterCluster added in v0.6.14

func UnregisterCluster(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterDisk added in v0.6.7

func UnregisterDisk(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterKey added in v0.4.12

func UnregisterKey(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterMyImage added in v0.6.10

func UnregisterMyImage(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterNLB added in v0.5.10

func UnregisterNLB(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterSecurity added in v0.4.12

func UnregisterSecurity(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterSubnet added in v0.7.6

func UnregisterSubnet(c echo.Context) error

func UnregisterVM added in v0.4.12

func UnregisterVM(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UnregisterVPC added in v0.4.12

func UnregisterVPC(c echo.Context) error

(1) get args from REST Call (2) call common-runtime API (3) return REST Json Format

func UpgradeCluster added in v0.6.14

func UpgradeCluster(c echo.Context) error

func UploadCloudDriver added in v0.5.11

func UploadCloudDriver(c echo.Context) error

Types

type BooleanInfo

type BooleanInfo struct {
	Result string // true or false
}

REST API Return struct for boolean type

type ClusterRegisterReq added in v0.6.14

type ClusterRegisterReq struct {
	ConnectionName string
	ReqInfo        struct {
		VPCName string
		Name    string
		CSPId   string
	}
}

type ClusterReq added in v0.6.14

type ClusterReq struct {
	NameSpace      string
	ConnectionName string
	ReqInfo        struct {
		// (1) Cluster Info
		Name    string
		Version string

		// (2) Network Info
		VPCName            string
		SubnetNames        []string
		SecurityGroupNames []string

		// (3) NodeGroupInfo List
		NodeGroupList []NodeGroupReq
	}
}

type DiskRegisterReq added in v0.6.7

type DiskRegisterReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name  string
		CSPId string
	}
}

type DiskReq added in v0.6.7

type DiskReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name string

		DiskType string
		DiskSize string
	}
}

type HealthCheckerReq added in v0.5.11

type HealthCheckerReq struct {
	Protocol  string // TCP|HTTP|HTTPS
	Port      string // Listener Port or 1-65535
	Interval  string // secs, Interval time between health checks.
	Timeout   string // secs, Waiting time to decide an unhealthy VM when no response.
	Threshold string // num, The number of continuous health checks to change the VM status.
}

for int mapping with string

type JSONResult added in v0.3.15

type JSONResult struct {
}

JSONResult's data field will be overridden by the specific type

type MyImageRegisterReq added in v0.6.10

type MyImageRegisterReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name  string
		CSPId string
	}
}

type MyImageReq added in v0.6.10

type MyImageReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name string

		SourceVM string
	}
}

type NLBRegisterReq added in v0.5.10

type NLBRegisterReq struct {
	ConnectionName string
	ReqInfo        struct {
		VPCName string
		Name    string
		CSPId   string
	}
}

type NLBReq added in v0.5.10

type NLBReq struct {
	ConnectionName string
	ReqInfo        struct {
		Name    string
		VPCName string
		Type    string // PUBLIC(V) | INTERNAL
		Scope   string // REGION(V) | GLOBAL

		//------ Frontend
		Listener cres.ListenerInfo

		//------ Backend
		VMGroup       VMGroupReq
		HealthChecker HealthCheckerReq // for int mapping with string
	}
}

type NodeGroupReq added in v0.6.14

type NodeGroupReq struct {
	Name         string
	ImageName    string
	VMSpecName   string
	RootDiskType string
	RootDiskSize string
	KeyPairName  string

	// autoscale config.
	OnAutoScaling   string
	DesiredNodeSize string
	MinNodeSize     string
	MaxNodeSize     string
}

type SSHRUNReqInfo

type SSHRUNReqInfo struct {
	UserName   string   // ex) "root"
	PrivateKey []string // ex)   ["-----BEGIN RSA PRIVATE KEY-----",
	//          "MIIEoQIBAAKCAQEArVNOLwMIp5VmZ4VPZotcoCHdEzimKalAsz+ccLfvAA1Y2ELH",
	//          "..."]
	ServerPort string // ex) "node12:22"
	Command    string // ex) "hostname"
}

type SimpleMsg added in v0.3.15

type SimpleMsg struct {
	Message string `json:"message" example:"Any message"`
}

JSON Simple message struct

type StatusInfo

type StatusInfo struct {
	Status string // PENDING | RUNNING | SUSPENDING | SUSPENDED | REBOOTING | TERMINATING | TERMINATED
}

type VMGroupReq added in v0.5.11

type VMGroupReq struct {
	Protocol string // TCP|HTTP|HTTPS
	Port     string // Listener Port or 1-65535
	VMs      []string
}

for VM IID mapping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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