云上操作日志同步

This commit is contained in:
ioito
2019-11-07 16:38:17 +08:00
committed by Qu Xuan
parent e7491733d7
commit 4036d34656
36 changed files with 1821 additions and 27 deletions
+15
View File
@@ -55,6 +55,9 @@ type ICloudProviderFactory interface {
NeedSyncSkuFromCloud() bool
IsSupportObjectStorage() bool
IsCloudeventRegional() bool
GetMaxCloudEventSyncDays() int
GetMaxCloudEventKeepDays() int
}
type ICloudProvider interface {
@@ -219,6 +222,18 @@ func (factory *baseProviderFactory) IsOnPremise() bool {
return false
}
func (factory *baseProviderFactory) IsCloudeventRegional() bool {
return false
}
func (factory *baseProviderFactory) GetMaxCloudEventSyncDays() int {
return 7
}
func (factory *baseProviderFactory) GetMaxCloudEventKeepDays() int {
return 7
}
type SPremiseBaseProviderFactory struct {
baseProviderFactory
}
+15
View File
@@ -132,6 +132,8 @@ type ICloudRegion interface {
CreateIElasticcaches(ec *SCloudElasticCacheInput) (ICloudElasticcache, error)
GetProvider() string
GetICloudEvents(start time.Time, end time.Time, withReadEvent bool) ([]ICloudEvent, error) //获取公有云操作日志接口
}
type ICloudZone interface {
@@ -913,3 +915,16 @@ type ICloudElasticcacheParameter interface {
GetModifiable() bool
GetForceRestart() bool
}
type ICloudEvent interface {
GetName() string
GetService() string
GetAction() string
GetResourceType() string
GetRequestId() string
GetRequest() jsonutils.JSONObject
GetAccount() string
IsSuccess() bool
GetCreatedAt() time.Time
}