Documentation ¶
Index ¶
- Constants
- func ExtractDataFromAssociationField(instID int64, input map[string]interface{}, asstDes []metadata.Association) []*metadata.InstAsst
- func NewAsstObjectInst(pheader http.Header, engine *backbone.Engine, ownerID string, ...) *asstObjectInst
- func NewImportInstance(ownerID string, pheader http.Header, engine *backbone.Engine) *importInstance
- func ParseHostSnap(data string) (map[string]interface{}, error)
- type HostLog
- type HostModuleLog
- type InstNameAsst
- type Logics
- func (lgc *Logics) AddHost(appID int64, moduleID []int64, ownerID string, pheader http.Header, ...) ([]string, []string, []string, error)
- func (lgc *Logics) CloneHostProperty(input *meta.CloneHostPropertyParams, appID, cloudID int64, header http.Header) (interface{}, error)
- func (lgc *Logics) EnterIP(pheader http.Header, ownerID string, appID, moduleID int64, ip string, ...) error
- func (lgc *Logics) GetAgentStatus(appID int64, gseConfg *options.Gse, header http.Header) (*meta.GetAgentStatusResult, error)
- func (lgc *Logics) GetAppDetails(fields string, condition map[string]interface{}, pheader http.Header) (types.MapStr, error)
- func (lgc *Logics) GetAppIDByCond(pheader http.Header, cond []metadata.ConditionItem) ([]int64, error)
- func (lgc *Logics) GetAppMapByCond(pheader http.Header, fields string, cond interface{}) (map[int64]types.MapStr, error)
- func (lgc *Logics) GetConfigByCond(pheader http.Header, cond map[string][]int64) ([]map[string]int64, error)
- func (lgc *Logics) GetDefaultAppID(ownerID string, pheader http.Header) (int64, error)
- func (lgc *Logics) GetDefaultAppIDWithSupplier(pheader http.Header) (int64, error)
- func (lgc *Logics) GetHostAttributes(ownerID string, header http.Header) ([]metadata.Header, error)
- func (lgc *Logics) GetHostIDByCond(pheader http.Header, cond map[string][]int64) ([]int64, error)
- func (lgc *Logics) GetHostIDByInstID(pheader http.Header, asstObjId string, instIDArr []int64) ([]int64, error)
- func (lgc *Logics) GetHostInfoByConds(pheader http.Header, cond map[string]interface{}) ([]map[string]interface{}, error)
- func (lgc *Logics) GetHostInstanceDetails(pheader http.Header, ownerID, hostID string) (map[string]interface{}, string, error)
- func (lgc *Logics) GetIPAndProxyByCompany(ipArr []string, cloudID, appID int64, header http.Header) (interface{}, error)
- func (lgc *Logics) GetInstAsstDetailsSub(pheader http.Header, objID, ownerID string, input []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (lgc *Logics) GetInstDetailsSub(pheader http.Header, objID, ownerID string, input []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (lgc *Logics) GetModuleByModuleID(pheader http.Header, appID, moduleID int64) ([]mapstr.MapStr, error)
- func (lgc *Logics) GetModuleIDByCond(phader http.Header, cond []metadata.ConditionItem) ([]int64, error)
- func (lgc *Logics) GetModuleMapByCond(pheader http.Header, fields string, cond interface{}) (map[int64]types.MapStr, error)
- func (lgc *Logics) GetObjectAsst(ownerID string, pheader http.Header) (map[string]string, error)
- func (lgc *Logics) GetObjectAttributes(ownerID, objID string, pheader http.Header, page meta.BasePage) ([]meta.Attribute, error)
- func (lgc *Logics) GetObjectInstByCond(pheader http.Header, objID string, cond []meta.ConditionItem) ([]int64, error)
- func (lgc *Logics) GetResoulePoolModuleID(pheader http.Header, condition interface{}) (int64, error)
- func (lgc *Logics) GetSetIDByCond(pheader http.Header, cond []metadata.ConditionItem) ([]int64, error)
- func (lgc *Logics) GetSetIDByObjectCond(pheader http.Header, appID int64, objectCond []meta.ConditionItem) ([]int64, error)
- func (lgc *Logics) GetSetMapByCond(pheader http.Header, fields string, cond interface{}) (map[int64]mapstr.MapStr, error)
- func (lgc *Logics) GetSingleApp(pheader http.Header, cond interface{}) (mapstr.MapStr, error)
- func (lgc *Logics) GetTopoIDByName(pheader http.Header, c *meta.HostToAppModule) (int64, int64, int64, error)
- func (lgc *Logics) IsHostExistInApp(appID, hostID int64, pheader http.Header) (bool, error)
- func (lgc *Logics) IsPlatExist(pheader http.Header, cond interface{}) (bool, error)
- func (lgc *Logics) LockHost(ctx context.Context, header http.Header, input *metadata.HostLockRequest) errors.CCError
- func (lgc *Logics) NewHostLog(pheader http.Header, ownerID string) *HostLog
- func (lgc *Logics) NewHostModuleLog(header http.Header, instID []int64) *HostModuleLog
- func (lgc *Logics) NewPHPAPI(header http.Header) *PHPAPI
- func (lgc *Logics) QueryHostLock(ctx context.Context, header http.Header, input *metadata.QueryHostLockRequest) (map[string]bool, errors.CCError)
- func (lgc *Logics) SearchHost(pheader http.Header, data *metadata.HostCommonSearch, isDetail bool) (*metadata.SearchHost, error)
- func (lgc *Logics) UnlockHost(ctx context.Context, header http.Header, input *metadata.HostLockRequest) errors.CCError
- func (lgc *Logics) UpdateCustomProperty(hostID, appID int64, proeprtyJson map[string]interface{}, header http.Header) (interface{}, error)
- func (lgc *Logics) UpdateHost(input map[string]interface{}, appID int64, header http.Header) (interface{}, int, error)
- func (lgc *Logics) UpdateHostByAppID(input *meta.UpdateHostParams, appID int64, header http.Header) (interface{}, int, error)
- type PHPAPI
- func (phpapi *PHPAPI) AddHost(data map[string]interface{}) (int64, error)
- func (phpapi *PHPAPI) AddModuleHostConfig(hostID, appID int64, moduleIDs []int64) error
- func (phpapi *PHPAPI) GetCustomerPropertyByOwner(objType string) ([]meta.Attribute, error)
- func (phpapi *PHPAPI) GetDefaultModules(appID int) (types.MapStr, error)
- func (phpapi *PHPAPI) GetHostByCond(param *meta.QueryInput) ([]types.MapStr, error)
- func (phpapi *PHPAPI) GetHostByIPAndSource(innerIP string, platID int64) ([]types.MapStr, error)
- func (phpapi *PHPAPI) GetHostDataByConfig(configData []map[string]int64) ([]interface{}, error)
- func (phpapi *PHPAPI) GetHostMapByCond(condition map[string]interface{}) (map[int64]map[string]interface{}, []int64, error)
- func (phpapi *PHPAPI) In_existIpArr(arr []string, ip string) bool
- func (phpapi *PHPAPI) SetHostData(moduleHostConfig []map[string]int64, hostMap map[int64]map[string]interface{}) ([]interface{}, error)
- func (phpapi *PHPAPI) UpdateHostMain(hostCondition, data map[string]interface{}, appID int64) (string, error)
Constants ¶
View Source
const ( SplitFlag = "##" TopoSetName = "TopSetName" TopoModuleName = "TopModuleName" )
HostSearch search host by mutiple condition
Variables ¶
This section is empty.
Functions ¶
func NewAsstObjectInst ¶
func NewImportInstance ¶
func ParseHostSnap ¶
Types ¶
type HostLog ¶
func (*HostLog) AuditLog ¶
func (h *HostLog) AuditLog(hostID int64) *auditoplog.AuditLogExt
func (*HostLog) WithCurrent ¶
type HostModuleLog ¶
type HostModuleLog struct {
// contains filtered or unexported fields
}
func (*HostModuleLog) SaveAudit ¶
func (h *HostModuleLog) SaveAudit(appID, user, desc string) error
func (*HostModuleLog) WithCurrent ¶
func (h *HostModuleLog) WithCurrent() error
func (*HostModuleLog) WithPrevious ¶
func (h *HostModuleLog) WithPrevious() error
type InstNameAsst ¶
type Logics ¶
func (*Logics) CloneHostProperty ¶
func (*Logics) EnterIP ¶
func (lgc *Logics) EnterIP(pheader http.Header, ownerID string, appID, moduleID int64, ip string, cloudID int64, host map[string]interface{}, isIncrement bool) error
EnterIP 将机器导入到制定模块或者空闲机器, 已经存在机器,不操作
func (*Logics) GetAgentStatus ¶
func (*Logics) GetAppDetails ¶
func (*Logics) GetAppIDByCond ¶
func (*Logics) GetAppMapByCond ¶
func (*Logics) GetConfigByCond ¶
func (*Logics) GetDefaultAppID ¶
func (*Logics) GetDefaultAppIDWithSupplier ¶
func (*Logics) GetHostAttributes ¶
func (*Logics) GetHostIDByCond ¶
func (*Logics) GetHostIDByInstID ¶
func (*Logics) GetHostInfoByConds ¶
func (*Logics) GetHostInstanceDetails ¶
func (*Logics) GetIPAndProxyByCompany ¶
func (*Logics) GetInstAsstDetailsSub ¶
func (lgc *Logics) GetInstAsstDetailsSub(pheader http.Header, objID, ownerID string, input []map[string]interface{}, page meta.BasePage) ([]map[string]interface{}, error)
get inst detail sub with association object detail
func (*Logics) GetInstDetailsSub ¶
func (lgc *Logics) GetInstDetailsSub(pheader http.Header, objID, ownerID string, input []map[string]interface{}, page meta.BasePage) ([]map[string]interface{}, error)
get inst detail sub without association object detail
func (*Logics) GetModuleByModuleID ¶
func (*Logics) GetModuleIDByCond ¶
func (*Logics) GetModuleMapByCond ¶
func (*Logics) GetObjectAsst ¶
func (*Logics) GetObjectAttributes ¶
func (lgc *Logics) GetObjectAttributes(ownerID, objID string, pheader http.Header, page meta.BasePage) ([]meta.Attribute, error)
get the object attributes
func (*Logics) GetObjectInstByCond ¶
func (*Logics) GetResoulePoolModuleID ¶
func (*Logics) GetSetIDByCond ¶
func (*Logics) GetSetIDByObjectCond ¶
func (*Logics) GetSetMapByCond ¶
func (*Logics) GetSingleApp ¶
func (*Logics) GetTopoIDByName ¶
func (*Logics) IsHostExistInApp ¶
func (*Logics) IsPlatExist ¶
func (*Logics) NewHostLog ¶
func (*Logics) NewHostModuleLog ¶
func (lgc *Logics) NewHostModuleLog(header http.Header, instID []int64) *HostModuleLog
func (*Logics) QueryHostLock ¶
func (*Logics) SearchHost ¶
func (lgc *Logics) SearchHost(pheader http.Header, data *metadata.HostCommonSearch, isDetail bool) (*metadata.SearchHost, error)
func (*Logics) UnlockHost ¶
func (*Logics) UpdateCustomProperty ¶
func (*Logics) UpdateHost ¶
func (*Logics) UpdateHostByAppID ¶
type PHPAPI ¶
type PHPAPI struct {
// contains filtered or unexported fields
}
PHPAPI ee,ce version api
func (*PHPAPI) AddModuleHostConfig ¶
func (*PHPAPI) GetCustomerPropertyByOwner ¶
func (*PHPAPI) GetDefaultModules ¶
func (*PHPAPI) GetHostByCond ¶
func (*PHPAPI) GetHostByIPAndSource ¶
func (*PHPAPI) GetHostDataByConfig ¶
GetHostDataByConfig get host info
func (*PHPAPI) GetHostMapByCond ¶
func (phpapi *PHPAPI) GetHostMapByCond(condition map[string]interface{}) (map[int64]map[string]interface{}, []int64, error)
search host helpers
func (*PHPAPI) In_existIpArr ¶
In_existIpArr exsit ip in array
func (*PHPAPI) SetHostData ¶
Click to show internal directories.
Click to hide internal directories.