service

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

cb spider call rest api handlers

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloudConnectionUrl = os.Getenv("SPIDER_URL")

var CloudConnectionUrl = "http://15.165.16.67:1024"

View Source
var MCISUrl = os.Getenv("TUMBLE_URL")
View Source
var NameSpaceUrl = os.Getenv("TUMBLE_URL")

var NameSpaceUrl = "http://15.165.16.67:1323"

View Source
var SpiderUrl = os.Getenv("SPIDER_URL")
View Source
var TumbleUrl = os.Getenv("TUMBLE_URL")

Functions

func GetGeoMetryInfo

func GetGeoMetryInfo(wg *sync.WaitGroup, ip_address string, status string, vm_id string, vm_name string, returnResult *[]IPStackInfo)

func GetVMStatus

func GetVMStatus(vm_name string, connectionConfig string) string

func RequestGet

func RequestGet(url string)

Types

type CloudConnectionInfo

type CloudConnectionInfo struct {
	ID             string `json:"id"`
	ConfigName     string `json:"ConfigName"`
	ProviderName   string `json:"ProviderName"`
	DriverName     string `json:"DriverName"`
	CredentialName string `json:"CredentialName"`
	RegionName     string `json:"RegionName"`
	Description    string `json:"description"`
}

func GetConnectionList

func GetConnectionList() []CloudConnectionInfo

func GetConnectionconfig

func GetConnectionconfig(drivername string) CloudConnectionInfo

func GetCredentialList

func GetCredentialList() []CloudConnectionInfo

func GetCredentialReg

func GetCredentialReg() []CloudConnectionInfo

func GetDriverReg

func GetDriverReg() []CloudConnectionInfo

type IPStackInfo

type IPStackInfo struct {
	IP          string  `json:"ip"`
	Lat         float64 `json:"latitude"`
	Long        float64 `json:"longitude"`
	CountryCode string  `json:"country_code"`
	VMName      string
	VMID        string
	Status      string
}

type KeepZero

type KeepZero float64

func (KeepZero) MarshalJSON

func (f KeepZero) MarshalJSON() ([]byte, error)

type KeyValueInfo

type KeyValueInfo struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

type MCISInfo

type MCISInfo struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
	VMNum  string `json:"vm_num"`
}

func GetMCIS

func GetMCIS(nsid string, mcisId string) []MCISInfo

func GetMCISList

func GetMCISList(nsid string) []MCISInfo

type NSInfo

type NSInfo struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

func GetNS

func GetNS(nsID string) NSInfo

func GetNSList

func GetNSList() []NSInfo

type RESP

type RESP struct {
	Region []struct {
		RegionName       string         `json:"RegionName"`
		ProviderName     string         `json:"ProviderName"`
		KeyValueInfoList []KeyValueInfo `json:"KeyValueInfoList"`
	} `json:"region"`
}

type RegionInfo

type RegionInfo struct {
	RegionName       string `json:"RegionName"`
	ProviderName     string `json:"ProviderName"`
	KeyValueInfoList []KeyValueInfo
}

func GetRegionList

func GetRegionList() []RegionInfo

Jump to

Keyboard shortcuts

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