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 ( StrSPIDER_REST_URL string = "SPIDER_REST_URL" StrDRAGONFLY_REST_URL string = "DRAGONFLY_REST_URL" StrDB_URL string = "DB_URL" StrDB_DATABASE string = "DB_DATABASE" StrDB_USER string = "DB_USER" StrDB_PASSWORD string = "DB_PASSWORD" StrAUTOCONTROL_DURATION_MS 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 AUTOCONTROL_DURATION_MS string
View Source
var CBLog *logrus.Logger
CB-Store
View Source
var CBStore icbs.Store
View Source
var DB_DATABASE string
View Source
var DB_PASSWORD string
View Source
var DB_URL string
View Source
var DB_USER string
View Source
var DRAGONFLY_REST_URL string
View Source
var MYDB *sql.DB
View Source
var ORM *xorm.Engine
View Source
var SPIDER_REST_URL string
View Source
var StartTime string
Functions ¶
func AppendIfMissing ¶
func CheckConfig ¶
func CheckString ¶
func ConvGrpcStatusErr ¶
ConvGrpcStatusErr - GRPC 상태 코드 에러로 변환
func ConvertToMessage ¶
ConvertToMessage - 입력 데이터를 grpc 메시지로 변환
func ConvertToOutput ¶
ConvertToOutput - grpc 메시지를 출력포맷으로 변환
func CopySrcToDest ¶
func CopySrcToDest(src interface{}, dest interface{}) error
CopySrcToDest - 소스에서 타켓으로 데이터 복사
func GenMcisPolicyKey ¶
Generate Mcis policy key
func GenResourceKey ¶
func GetChildIdList ¶
func GetCspResourceId ¶
func GetObjectList ¶
func GetObjectList returns IDs of each child objects that has the same key.
func GetObjectValue ¶
func GetObjectValue returns the object value.
func InitAllConfig ¶
func InitAllConfig() error
func InitConfig ¶
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 ¶
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 ¶
type SpiderConnectionName struct {
ConnectionName string `json:"ConnectionName"`
}
Click to show internal directories.
Click to hide internal directories.