Documentation
¶
Index ¶
- Constants
- Variables
- func AppendIfMissing(slice []string, i string) []string
- func CheckConfig(id string) (bool, error)
- func CheckNs(id string) (bool, error)
- func CheckString(name string) error
- func ConvGrpcStatusErr(err error, tag string, method string) error
- func ConvertToMessage(inType string, inData string, obj interface{}) error
- func ConvertToOutput(outType string, obj interface{}) (string, error)
- func CopySrcToDest(src interface{}, dest interface{}) error
- func DelAllNs() error
- func DelNs(id string) error
- func DeleteObject(key string) error
- func DeleteObjects(key string) error
- func GenMcisKey(nsId string, mcisId string, vmId string) string
- func GenMcisPolicyKey(nsId string, mcisId string, vmId string) string
- func GenMcisVmGroupKey(nsId string, mcisId string, groupId string) string
- func GenResourceKey(nsId string, resourceType string, resourceId string) string
- func GenUuid() string
- func GetChildIdList(key string) []string
- func GetCspResourceId(nsId string, resourceType string, resourceId string) (string, error)
- func GetObjectList(key string) []string
- func GetObjectValue(key string) (string, error)
- func InitAllConfig() error
- func InitConfig(id string) error
- func ListConfigId() []string
- func ListNsId() ([]string, error)
- func LookupKeyValueList(kvl []KeyValue, key string) string
- func NVL(str string, def string) string
- func NewGrpcStatusErr(msg string, tag string, method string) error
- func NsValidation() echo.MiddlewareFunc
- func OpenSQL(path string) error
- func PrintJsonPretty(v interface{})
- func SelectDatabase(database string) error
- func ToLower(name string) string
- func UpdateGlobalVariable(id string) error
- type ConfigInfo
- type ConfigReq
- type ConnConfig
- type ConnConfigList
- type IID
- type IdList
- type KeyValue
- type NsInfo
- type NsReq
- type Region
- type RegionList
- type SimpleMsg
- type SpiderConnectionName
Constants ¶
View Source
const ( StrSpiderRestUrl string = "SPIDER_REST_URL" StrDragonflyRestUrl string = "DRAGONFLY_REST_URL" StrDBUrl string = "DB_URL" StrDBDatabase string = "DB_DATABASE" StrDBUser string = "DB_USER" StrDBPassword string = "DB_PASSWORD" StrAutocontrolDurationMs string = "AUTOCONTROL_DURATION_MS" CbStoreKeyNotFoundErrorString string = "key not found" StrAdd string = "add" StrDelete string = "delete" StrSSHKey string = "sshKey" StrImage string = "image" StrSecurityGroup string = "securityGroup" StrSpec string = "spec" StrVNet string = "vNet" )
Variables ¶
View Source
var AutocontrolDurationMs string
View Source
var CBLog *logrus.Logger
CB-Store
View Source
var CBStore icbs.Store
View Source
var DBDatabase string
View Source
var DBPassword string
View Source
var DBUrl string
View Source
var DBUser string
View Source
var DragonflyRestUrl string
View Source
var MyDB *sql.DB
View Source
var ORM *xorm.Engine
View Source
var SpiderRestUrl string
View Source
var StartTime string
Functions ¶
func AppendIfMissing ¶ added in v0.3.11
func CheckConfig ¶ added in v0.3.1
func CheckString ¶ added in v0.3.7
func ConvGrpcStatusErr ¶
ConvGrpcStatusErr - GRPC 상태 코드 에러로 변환
func ConvertToMessage ¶
ConvertToMessage - 입력 데이터를 grpc 메시지로 변환
func ConvertToOutput ¶
ConvertToOutput - grpc 메시지를 출력포맷으로 변환
func CopySrcToDest ¶
func CopySrcToDest(src interface{}, dest interface{}) error
CopySrcToDest - 소스에서 타켓으로 데이터 복사
func DeleteObject ¶ added in v0.3.3
func DeleteObject delete the object.
func DeleteObjects ¶ added in v0.3.3
func DeleteObjects delete objects.
func GenMcisPolicyKey ¶ added in v0.2.8
Generate Mcis policy key
func GenMcisVmGroupKey ¶ added in v0.3.3
func GenResourceKey ¶
func GetChildIdList ¶
func GetCspResourceId ¶
func GetObjectList ¶ added in v0.3.3
func GetObjectList returns IDs of each child objects that has the same key.
func GetObjectValue ¶ added in v0.3.3
func GetObjectValue returns the object value.
func InitAllConfig ¶ added in v0.3.9
func InitAllConfig() error
func InitConfig ¶ added in v0.3.9
func ListConfigId ¶
func ListConfigId() []string
func LookupKeyValueList ¶
func NewGrpcStatusErr ¶
NewGrpcStatusErr - GRPC 상태 코드 에러 생성
func NsValidation ¶
func NsValidation() echo.MiddlewareFunc
func PrintJsonPretty ¶
func PrintJsonPretty(v interface{})
func SelectDatabase ¶
func UpdateGlobalVariable ¶ added in v0.3.9
Types ¶
type ConfigInfo ¶
type ConfigInfo struct {
Id string `json:"id" example:"SPIDER_REST_URL"`
Name string `json:"name" example:"SPIDER_REST_URL"`
Value string `json:"value" example:"http://localhost:1024/spider"`
}
swagger:response ConfigInfo
func GetConfig ¶
func GetConfig(id string) (ConfigInfo, error)
func ListConfig ¶
func ListConfig() ([]ConfigInfo, error)
func UpdateConfig ¶
func UpdateConfig(u *ConfigReq) (ConfigInfo, error)
type ConfigReq ¶
type ConfigReq struct {
Name string `json:"name" example:"SPIDER_REST_URL"`
Value string `json:"value" example:"http://localhost:1024/spider"`
}
swagger:request ConfigReq
type ConnConfig ¶
type ConnConfig struct {
ConfigName string
ProviderName string
DriverName string
CredentialName string
RegionName string
}
func GetConnConfig ¶
func GetConnConfig(ConnConfigName string) (ConnConfig, error)
type ConnConfigList ¶
type ConnConfigList struct {
Connectionconfig []ConnConfig `json:"connectionconfig"`
}
func GetConnConfigList ¶
func GetConnConfigList() (ConnConfigList, error)
type IID ¶
Spider 2020-03-30 https://github.com/cloud-barista/cb-spider/blob/master/cloud-control-manager/cloud-driver/interfaces/resources/IId.go
type NsInfo ¶
type NsInfo struct {
Id string `json:"id" example:"namespaceid01"`
Name string `json:"name" example:"namespacename01"`
Description string `json:"description" example:"Description for this namespace"`
}
swagger:response NsInfo
type Region ¶
type RegionList ¶
type RegionList struct {
Region []Region `json:"region"`
}
RegionList is array struct for Region
type SimpleMsg ¶
type SimpleMsg struct {
Message string `json:"message" example:"Any message"`
}
JSON Simple message struct
type SpiderConnectionName ¶ added in v0.3.7
type SpiderConnectionName struct {
ConnectionName string `json:"ConnectionName"`
}
Click to show internal directories.
Click to hide internal directories.