Documentation ¶
Index ¶
- func InitCloudevent()
- func InitDB() error
- type SCloudevent
- type SCloudeventManager
- func (manager *SCloudeventManager) CreateByInsertOrUpdate() bool
- func (manager *SCloudeventManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.CloudeventDetails
- func (manager *SCloudeventManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (manager *SCloudeventManager) FilterByOwner(ctx context.Context, q *sqlchemy.SQuery, man db.FilterByOwnerProvider, ...) *sqlchemy.SQuery
- func (manager *SCloudeventManager) GetPagingConfig() *db.SPagingConfig
- func (manager *SCloudeventManager) GetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (manager *SCloudeventManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SCloudeventManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SCloudeventManager) NamespaceScope() rbacscope.TRbacScope
- func (manager *SCloudeventManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SCloudeventManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SCloudeventManager) ResourceScope() rbacscope.TRbacScope
- func (manager *SCloudeventManager) SyncCloudevent(ctx context.Context, userCred mcclient.TokenCredential, ...) int
- type SCloudprovider
- func (provider SCloudprovider) GetExternalId() string
- func (provider SCloudprovider) GetGlobalId() string
- func (self *SCloudprovider) GetNextTimeRange() (time.Time, time.Time, error)
- func (self *SCloudprovider) GetProvider() (cloudprovider.ICloudProvider, error)
- func (provider *SCloudprovider) GetProviderFactory() (cloudprovider.ICloudProviderFactory, error)
- func (self *SCloudprovider) MarkEndSync(userCred mcclient.TokenCredential) error
- func (self *SCloudprovider) MarkSyncing(userCred mcclient.TokenCredential) error
- func (self *SCloudprovider) SetLastSyncTimeAt(userCred mcclient.TokenCredential, last time.Time) error
- func (provider *SCloudprovider) StartCloudeventSyncTask(ctx context.Context, userCred mcclient.TokenCredential) error
- type SCloudproviderManager
- func (manager *SCloudproviderManager) GetLocalCloudproviders() ([]SCloudprovider, error)
- func (manager *SCloudproviderManager) GetRegionCloudproviders(ctx context.Context, userCred mcclient.TokenCredential) ([]SCloudprovider, error)
- func (manager *SCloudproviderManager) InitializeData() error
- func (manager *SCloudproviderManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SCloudproviderManager) SyncCloudeventTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
- func (manager *SCloudproviderManager) SyncCloudproviders(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCloudevent ¶
func InitCloudevent()
Types ¶
type SCloudevent ¶
type SCloudevent struct { db.SModelBase db.SDomainizedResourceBase EventId int64 `primary:"true" auto_increment:"true" list:"user" clickhouse_partition_by:"toInt64(event_id/100000000000)` Name string `width:"128" charset:"utf8" nullable:"false" index:"true" list:"user"` Service string `width:"64" charset:"utf8" nullable:"true" list:"user"` ResourceType string `width:"64" charset:"utf8" nullable:"true" list:"user"` Action string `width:"64" charset:"utf8" nullable:"true" list:"user"` RequestId string `width:"128" charset:"utf8" nullable:"true" list:"user"` Request jsonutils.JSONObject `charset:"utf8" nullable:"true" list:"user"` Account string `width:"64" charset:"utf8" nullable:"true" list:"user"` Success bool `nullable:"false" list:"user"` CreatedAt time.Time `nullable:"false" created_at:"true" index:"true" get:"user" list:"user" clickhouse_ttl:"6m"` CloudproviderId string `width:"64" charset:"utf8" nullable:"true" list:"user"` Manager string `width:"128" charset:"utf8" nullable:"false" index:"true" list:"user"` Provider string `width:"64" charset:"ascii" nullable:"false" list:"user"` Brand string `width:"64" charset:"ascii" list:"domain"` }
func (*SCloudevent) BeforeInsert ¶
func (event *SCloudevent) BeforeInsert()
func (*SCloudevent) CustomizeCreate ¶
func (self *SCloudevent) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SCloudevent) GetOwnerId ¶
func (self *SCloudevent) GetOwnerId() mcclient.IIdentityProvider
type SCloudeventManager ¶
type SCloudeventManager struct { db.SModelBaseManager db.SDomainizedResourceBaseManager }
var CloudeventManager *SCloudeventManager
func (*SCloudeventManager) CreateByInsertOrUpdate ¶
func (manager *SCloudeventManager) CreateByInsertOrUpdate() bool
func (*SCloudeventManager) FetchCustomizeColumns ¶
func (manager *SCloudeventManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []api.CloudeventDetails
func (*SCloudeventManager) FetchOwnerId ¶
func (manager *SCloudeventManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SCloudeventManager) FilterByOwner ¶
func (manager *SCloudeventManager) FilterByOwner(ctx context.Context, q *sqlchemy.SQuery, man db.FilterByOwnerProvider, userCred mcclient.TokenCredential, owner mcclient.IIdentityProvider, scope rbacscope.TRbacScope) *sqlchemy.SQuery
func (*SCloudeventManager) GetPagingConfig ¶
func (manager *SCloudeventManager) GetPagingConfig() *db.SPagingConfig
func (*SCloudeventManager) GetPropertyDistinctField ¶
func (manager *SCloudeventManager) GetPropertyDistinctField(ctx context.Context, userCred mcclient.TokenCredential, input apis.DistinctFieldInput) (jsonutils.JSONObject, error)
func (*SCloudeventManager) ListItemExportKeys ¶
func (manager *SCloudeventManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SCloudeventManager) ListItemFilter ¶
func (manager *SCloudeventManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.CloudeventListInput, ) (*sqlchemy.SQuery, error)
云平台操作日志列表
func (*SCloudeventManager) NamespaceScope ¶
func (manager *SCloudeventManager) NamespaceScope() rbacscope.TRbacScope
func (*SCloudeventManager) OrderByExtraFields ¶
func (manager *SCloudeventManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.CloudeventListInput, ) (*sqlchemy.SQuery, error)
func (*SCloudeventManager) QueryDistinctExtraField ¶
func (*SCloudeventManager) ResourceScope ¶
func (manager *SCloudeventManager) ResourceScope() rbacscope.TRbacScope
func (*SCloudeventManager) SyncCloudevent ¶
func (manager *SCloudeventManager) SyncCloudevent(ctx context.Context, userCred mcclient.TokenCredential, cloudprovider *SCloudprovider, iEvents []cloudprovider.ICloudEvent) int
type SCloudprovider ¶
type SCloudprovider struct { db.SEnabledStatusStandaloneResourceBase db.SProjectizedResourceBase SyncStatus string LastSync time.Time LastSyncEndAt time.Time LastSyncTimeAt time.Time Provider string `width:"64" charset:"ascii" list:"domain"` Brand string `width:"64" charset:"ascii" list:"domain"` }
func (SCloudprovider) GetExternalId ¶
func (provider SCloudprovider) GetExternalId() string
func (SCloudprovider) GetGlobalId ¶
func (provider SCloudprovider) GetGlobalId() string
func (*SCloudprovider) GetNextTimeRange ¶
func (*SCloudprovider) GetProvider ¶
func (self *SCloudprovider) GetProvider() (cloudprovider.ICloudProvider, error)
func (*SCloudprovider) GetProviderFactory ¶
func (provider *SCloudprovider) GetProviderFactory() (cloudprovider.ICloudProviderFactory, error)
func (*SCloudprovider) MarkEndSync ¶
func (self *SCloudprovider) MarkEndSync(userCred mcclient.TokenCredential) error
func (*SCloudprovider) MarkSyncing ¶
func (self *SCloudprovider) MarkSyncing(userCred mcclient.TokenCredential) error
func (*SCloudprovider) SetLastSyncTimeAt ¶
func (self *SCloudprovider) SetLastSyncTimeAt(userCred mcclient.TokenCredential, last time.Time) error
func (*SCloudprovider) StartCloudeventSyncTask ¶
func (provider *SCloudprovider) StartCloudeventSyncTask(ctx context.Context, userCred mcclient.TokenCredential) error
type SCloudproviderManager ¶
type SCloudproviderManager struct { db.SEnabledStatusStandaloneResourceBaseManager db.SProjectizedResourceBaseManager }
var CloudproviderManager *SCloudproviderManager
func (*SCloudproviderManager) GetLocalCloudproviders ¶
func (manager *SCloudproviderManager) GetLocalCloudproviders() ([]SCloudprovider, error)
func (*SCloudproviderManager) GetRegionCloudproviders ¶
func (manager *SCloudproviderManager) GetRegionCloudproviders(ctx context.Context, userCred mcclient.TokenCredential) ([]SCloudprovider, error)
func (*SCloudproviderManager) InitializeData ¶
func (manager *SCloudproviderManager) InitializeData() error
func (*SCloudproviderManager) QueryDistinctExtraField ¶
func (*SCloudproviderManager) SyncCloudeventTask ¶
func (manager *SCloudproviderManager) SyncCloudeventTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
func (*SCloudproviderManager) SyncCloudproviders ¶
func (manager *SCloudproviderManager) SyncCloudproviders(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
Click to show internal directories.
Click to hide internal directories.