restruntime

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

README

runtime for REST-based API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 ApiServer

func ApiServer(routes []route)

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

func ControlVM added in v0.4.9

func ControlVM(c echo.Context) error

func CreateConnectionConfig added in v0.4.9

func CreateConnectionConfig(c echo.Context) error

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

func CreateImage added in v0.4.9

func CreateImage(c echo.Context) error

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

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 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 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 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 DeleteConnectionConfig added in v0.4.9

func DeleteConnectionConfig(c echo.Context) error

func DeleteImage added in v0.4.9

func DeleteImage(c echo.Context) error

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 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 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 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 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 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 GetOrgVMSpec added in v0.4.9

func GetOrgVMSpec(c echo.Context) error

func GetRegion added in v0.4.9

func GetRegion(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 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 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 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 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 ListImage added in v0.4.9

func ListImage(c echo.Context) error

func ListKey added in v0.4.9

func ListKey(c echo.Context) error

func ListOrgVMSpec added in v0.4.9

func ListOrgVMSpec(c echo.Context) error

func ListRegion added in v0.4.9

func ListRegion(c echo.Context) error

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 RegisterCredential added in v0.4.9

func RegisterCredential(c echo.Context) error

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

func RegisterKey added in v0.4.12

func RegisterKey(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 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 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 StartVM added in v0.4.9

func StartVM(c echo.Context) error

(1) check exist(NameID) (2) create Resource (3) insert IID

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 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 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 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

Types

type BooleanInfo

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

REST API Return struct for boolean type

type JSONResult added in v0.3.15

type JSONResult struct {
}

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

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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