Documentation ¶
Index ¶
- Constants
- Variables
- func InitDB() error
- func InitEmailQueue()
- func InitEventLog()
- type IReceiver
- type SCompanyInfo
- type SConfig
- func (self *SConfig) Config() notifyv2.SConfig
- func (c *SConfig) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SConfig) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SConfig) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SConfig) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (c *SConfig) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (c *SConfig) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (c *SConfig) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SConfig) StartRepullSubcontactTask(ctx context.Context, userCred mcclient.TokenCredential, del bool) error
- func (c *SConfig) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ConfigUpdateInput, error)
- type SConfigManager
- func (self *SConfigManager) BatchCheckConfig(contactType string, domainIds []string) ([]bool, error)
- func (self *SConfigManager) Config(contactType, domainId string, attribution string) (*SConfig, error)
- func (self *SConfigManager) Configs(contactType string) ([]SConfig, error)
- func (cm *SConfigManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.ConfigDetails
- func (cm *SConfigManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (self *SConfigManager) GetConfigs(contactType string) ([]notifyv2.SConfig, error)
- func (self *SConfigManager) HasSystemConfig(contactType string) (bool, error)
- func (self *SConfigManager) InitializeData() error
- func (manager *SConfigManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (self *SConfigManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (cm *SConfigManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (cm *SConfigManager) PerformValidate(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ConfigValidateOutput, error)
- func (cm *SConfigManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (cm *SConfigManager) ResourceScope() rbacutils.TRbacScope
- func (self *SConfigManager) SetConfig(contactType string, config notifyv2.SConfig) error
- func (cm *SConfigManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ConfigCreateInput, error)
- type SContact
- type SEmailQueue
- func (eq *SEmailQueue) Dump() string
- func (e *SEmailQueue) GetRecordTime() time.Time
- func (eq *SEmailQueue) PerformSend(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (eq *SEmailQueue) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (eq *SEmailQueue) Run()
- type SEmailQueueManager
- func (manager *SEmailQueueManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.EmailQueueDetails
- func (manager *SEmailQueueManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SEmailQueueManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.EmailQueueCreateInput, error)
- type SEmailQueueStatus
- type SEmailQueueStatusManager
- type SEvent
- type SEventDisplay
- type SEventManager
- type SLocalTemplateManager
- type SNotification
- func (n *SNotification) AddOne() error
- func (n *SNotification) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (n *SNotification) Notification() (notifyv2.SNotification, error)
- func (n *SNotification) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (n *SNotification) ReceiveDetails(userCred mcclient.TokenCredential, scope string) ([]api.ReceiveDetail, error)
- func (n *SNotification) ReceiverNotificationsNotOK() ([]SReceiverNotification, error)
- func (n *SNotification) TemplateStore() notifyv2.ITemplateStore
- type SNotificationManager
- func (nm *SNotificationManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.NotificationDetails
- func (nm *SNotificationManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (nm *SNotificationManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (self *SNotificationManager) InitializeData() error
- func (nm *SNotificationManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (nm *SNotificationManager) NamespaceScope() rbacutils.TRbacScope
- func (nm *SNotificationManager) PerformEventNotify(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.NotificationManagerEventNotifyOutput, error)
- func (nm *SNotificationManager) ReSend(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
- func (nm *SNotificationManager) ResourceScope() rbacutils.TRbacScope
- func (nm *SNotificationManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.NotificationCreateInput, error)
- type SReceiver
- func (r *SReceiver) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (r *SReceiver) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (r *SReceiver) GetContact(cType string) (string, error)
- func (r *SReceiver) GetDomainId() string
- func (r *SReceiver) GetEnabledContactTypes() ([]string, error)
- func (r *SReceiver) GetTemplateLang(ctx context.Context) (string, error)
- func (r *SReceiver) GetVerifiedContactTypes() ([]string, error)
- func (r *SReceiver) IsEnabled() bool
- func (r *SReceiver) IsEnabledContactType(ct string) (bool, error)
- func (r *SReceiver) IsOwner(userCred mcclient.TokenCredential) bool
- func (r *SReceiver) IsVerifiedContactType(ct string) (bool, error)
- func (r *SReceiver) MarkContactTypeUnVerified(contactType string, note string) error
- func (r *SReceiver) MarkContactTypeVerified(contactType string) error
- func (r *SReceiver) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SReceiver) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SReceiver) PerformEnableContactType(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SReceiver) PerformTriggerVerify(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SReceiver) PerformVerify(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SReceiver) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (r *SReceiver) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (r *SReceiver) PreUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (r *SReceiver) PullCache(force bool) error
- func (r *SReceiver) PushCache(ctx context.Context) error
- func (r *SReceiver) SetContact(cType string, contact string) error
- func (r *SReceiver) SetEnabledContactTypes(contactTypes []string) error
- func (r *SReceiver) SetVerifiedContactTypes(contactTypes []string) error
- func (r *SReceiver) StartSubcontactPullTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (r *SReceiver) Sync(ctx context.Context) error
- func (r *SReceiver) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ReceiverUpdateInput, error)
- type SReceiverBase
- type SReceiverManager
- func (rm *SReceiverManager) CreateByInsertOrUpdate() bool
- func (rm *SReceiverManager) EnabledContactFilter(contactType string, q *sqlchemy.SQuery) *sqlchemy.SQuery
- func (rm *SReceiverManager) FetchByIDs(ctx context.Context, ids ...string) ([]SReceiver, error)
- func (rm *SReceiverManager) FetchByIdOrNames(ctx context.Context, idOrNames ...string) ([]SReceiver, error)
- func (rm *SReceiverManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.ReceiverDetails
- func (rm *SReceiverManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (rm *SReceiverManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, ...) *sqlchemy.SQuery
- func (rm *SReceiverManager) InitializeData() error
- func (rm *SReceiverManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (rm *SReceiverManager) OnAdd(obj *jsonutils.JSONDict)
- func (rm *SReceiverManager) OnDelete(obj *jsonutils.JSONDict)
- func (rm *SReceiverManager) OnUpdate(oldObj, newObj *jsonutils.JSONDict)
- func (rm *SReceiverManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (rm *SReceiverManager) PerformGetTypes(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ConfigManagerGetTypesOutput, error)
- func (rm *SReceiverManager) PerformIntellijGet(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (rm *SReceiverManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (rm *SReceiverManager) ResourceScope() rbacutils.TRbacScope
- func (rm *SReceiverManager) StartWatchUserInKeystone() error
- func (rm *SReceiverManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ReceiverCreateInput, error)
- func (rm *SReceiverManager) VerifiedContactFilter(contactType string, q *sqlchemy.SQuery) *sqlchemy.SQuery
- type SReceiverNotification
- type SReceiverNotificationManager
- func (rnm *SReceiverNotificationManager) Create(ctx context.Context, userCred mcclient.TokenCredential, ...) (*SReceiverNotification, error)
- func (rnm *SReceiverNotificationManager) CreateContact(ctx context.Context, userCred mcclient.TokenCredential, ...) (*SReceiverNotification, error)
- func (rnm *SReceiverNotificationManager) CreateRobot(ctx context.Context, userCred mcclient.TokenCredential, ...) (*SReceiverNotification, error)
- func (rnm *SReceiverNotificationManager) GetMasterFieldName() string
- func (rnm *SReceiverNotificationManager) GetSlaveFieldName() string
- func (self *SReceiverNotificationManager) InitializeData() error
- func (rnm *SReceiverNotificationManager) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration
- type SRobot
- func (r *SRobot) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (r *SRobot) GetContact(ctype string) (string, error)
- func (r *SRobot) GetDomainId() string
- func (r *SRobot) GetTemplateLang(ctx context.Context) (string, error)
- func (r *SRobot) IsEnabled() bool
- func (r *SRobot) IsEnabledContactType(ctype string) (bool, error)
- func (r *SRobot) IsVerifiedContactType(ctype string) (bool, error)
- func (r *SRobot) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SRobot) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SRobot) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (r *SRobot) Receiver() *rpcapi.SReceiver
- func (r *SRobot) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.RobotUpdateInput, error)
- type SRobotManager
- func (rm *SRobotManager) FetchByIdOrNames(ctx context.Context, idOrNames ...string) ([]SRobot, error)
- func (rm *SRobotManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.RobotDetails
- func (rm *SRobotManager) InitializeData() error
- func (rm *SRobotManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (rm *SRobotManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.RobotCreateInput, error)
- type SSubContact
- type SSubContactManager
- type SSubscriber
- func (s *SSubscriber) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (s *SSubscriber) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (s *SSubscriber) PerformChange(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (s *SSubscriber) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (s *SSubscriber) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (s *SSubscriber) PerformSetReceiver(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (s *SSubscriber) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (sr *SSubscriber) SetReceivers(ctx context.Context, receiverIds []string) error
- type SSubscriberDis
- type SSubscriberManager
- func (sm *SSubscriberManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.SubscriberDetails
- func (sm *SSubscriberManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (sm *SSubscriberManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (sm *SSubscriberManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.SubscriberCreateInput, error)
- type SSubscriberReceiver
- type SSubscriberReceiverManager
- type STemplate
- type STemplateManager
- func (tm *STemplateManager) FillWithTemplate(ctx context.Context, lang string, no notifyv2.SNotification) (params apis.SendParams, err error)
- func (tm *STemplateManager) GetCompanyInfo(ctx context.Context) (SCompanyInfo, error)
- func (tm *STemplateManager) GetEmailUrl() string
- func (tm *STemplateManager) InitializeData() error
- func (tm *STemplateManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (tm *STemplateManager) PerformSave(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (tm *STemplateManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.TemplateCreateInput, error)
- type STopic
- func (t *STopic) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (t *STopic) PreCheckPerformAction(ctx context.Context, userCred mcclient.TokenCredential, action string, ...) error
- func (ss *STopic) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
- func (ss *STopic) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- type STopicManager
- func (sm *STopicManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []notify.TopicDetails
- func (sm *STopicManager) InitializeData() error
- func (sm *STopicManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (sm *STopicManager) TopicByEvent(eventStr string, advanceDays int) (*STopic, error)
- func (sm *STopicManager) TopicsByEvent(eventStr string, advanceDays int) ([]STopic, error)
- func (sm *STopicManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- type SVerification
- type SVerificationManager
Constants ¶
View Source
const ( NOTIFY_RECEIVED = "received" // Received a task about sending a notification NOTIFY_SENT = "sent" // Nofity module has sent notification, but result unkown NOTIFY_OK = "sent_ok" // Notification was sent successfully NOTIFY_FAIL = "sent_fail" // That sent a notification is failed NOTIFY_REMOVED = "removed" )
View Source
const ( DefaultResourceCreateDelete = "resource create or delete" DefaultResourceChangeConfig = "resource change config" DefaultResourceUpdate = "resource update" DefaultResourceReleaseDue1Day = "resource release due 1 day" DefaultResourceReleaseDue3Day = "resource release due 3 day" DefaultResourceReleaseDue30Day = "resource release due 30 day" DefaultScheduledTaskExecute = "scheduled task execute" DefaultScalingPolicyExecute = "scaling policy execute" DefaultSnapshotPolicyExecute = "snapshot policy execute" DefaultResourceOperationFailed = "resource operation failed" DefaultResourceSync = "resource sync" DefaultSystemExceptionEvent = "system exception event" DefaultChecksumTestFailed = "checksum test failed" DefaultUserLock = "user lock" DefaultActionLogExceedCount = "action log exceed count" )
View Source
const (
CONTACTTYPE_ALL = "all"
)
View Source
const (
ReceiverIdDefault = "default"
)
View Source
const (
SendByContact = "send_by_contact"
)
Variables ¶
View Source
var ( ErrContactNotFound = errors.New("Contact Not Found") ErrVeritying = errors.New("During the verification process, please do not try again") ErrDial = errors.New("Dial Failed") ErrGetConfig = errors.New("Get Config Failed") ErrUpdateConfig = errors.New("Update Config Failed") )
View Source
var ( PersonalConfigContactTypes = []string{ api.EMAIL, api.MOBILE, api.DINGTALK, api.FEISHU, api.WORKWX, } RobotContactTypes = []string{ api.FEISHU_ROBOT, api.DINGTALK_ROBOT, api.WORKWX_ROBOT, } SystemConfigContactTypes = append( RobotContactTypes, api.WEBCONSOLE, api.WEBHOOK, ) )
View Source
var ErrVerifyFrequently = errors.Wrap(httperrors.ErrTooManyRequests, "Send validation messages too frequently")
View Source
var LaxMobileRegexp = regexp.MustCompile(`[0-9]{6,14}`)
View Source
var NotifyService notifyv2.INotifyService
Functions ¶
func InitEmailQueue ¶
func InitEmailQueue()
func InitEventLog ¶
func InitEventLog()
Types ¶
type SCompanyInfo ¶
type SConfig ¶
type SConfig struct { db.SStandaloneResourceBase db.SDomainizedResourceBase Type string `width:"15" nullable:"false" create:"required" get:"domain" list:"domain" index:"true"` Content jsonutils.JSONObject `nullable:"false" create:"required" update:"domain" get:"domain" list:"domain"` Attribution string `width:"8" nullable:"false" default:"system" get:"domain" list:"domain" create:"optional"` }
func (*SConfig) CustomizeCreate ¶
func (c *SConfig) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SConfig) CustomizeDelete ¶
func (c *SConfig) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SConfig) PostCreate ¶
func (c *SConfig) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SConfig) PostUpdate ¶
func (c *SConfig) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SConfig) PreDelete ¶
func (c *SConfig) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SConfig) RealDelete ¶
func (*SConfig) StartRepullSubcontactTask ¶
func (*SConfig) ValidateUpdateData ¶
func (c *SConfig) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ConfigUpdateInput) (api.ConfigUpdateInput, error)
type SConfigManager ¶
type SConfigManager struct { db.SStandaloneResourceBaseManager db.SDomainizedResourceBaseManager }
var ConfigManager *SConfigManager
func (*SConfigManager) BatchCheckConfig ¶
func (self *SConfigManager) BatchCheckConfig(contactType string, domainIds []string) ([]bool, error)
func (*SConfigManager) Config ¶
func (self *SConfigManager) Config(contactType, domainId string, attribution string) (*SConfig, error)
func (*SConfigManager) Configs ¶
func (self *SConfigManager) Configs(contactType string) ([]SConfig, error)
Fetch all SConfig struct which type is contactType.
func (*SConfigManager) FetchCustomizeColumns ¶
func (cm *SConfigManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []api.ConfigDetails
func (*SConfigManager) FilterByOwner ¶
func (cm *SConfigManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SConfigManager) GetConfigs ¶
func (self *SConfigManager) GetConfigs(contactType string) ([]notifyv2.SConfig, error)
func (*SConfigManager) HasSystemConfig ¶
func (self *SConfigManager) HasSystemConfig(contactType string) (bool, error)
func (*SConfigManager) InitializeData ¶
func (self *SConfigManager) InitializeData() error
func (*SConfigManager) ListItemExportKeys ¶
func (manager *SConfigManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings) (*sqlchemy.SQuery, error)
func (*SConfigManager) ListItemFilter ¶
func (self *SConfigManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.ConfigListInput) (*sqlchemy.SQuery, error)
func (*SConfigManager) OrderByExtraFields ¶
func (cm *SConfigManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ConfigListInput) (*sqlchemy.SQuery, error)
func (*SConfigManager) PerformValidate ¶
func (cm *SConfigManager) PerformValidate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ConfigValidateInput) (api.ConfigValidateOutput, error)
func (*SConfigManager) QueryDistinctExtraField ¶
func (*SConfigManager) ResourceScope ¶
func (cm *SConfigManager) ResourceScope() rbacutils.TRbacScope
func (*SConfigManager) SetConfig ¶
func (self *SConfigManager) SetConfig(contactType string, config notifyv2.SConfig) error
func (*SConfigManager) ValidateCreateData ¶
func (cm *SConfigManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.ConfigCreateInput) (api.ConfigCreateInput, error)
type SContact ¶
type SContact struct { SReceiverBase // contains filtered or unexported fields }
type SEmailQueue ¶
type SEmailQueue struct { db.SLogBase RecvAt time.Time `nullable:"false" created_at:"true" index:"true" get:"user" list:"user" json:"recv_at"` Dest string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"admin_required"` Subject string `width:"256" charset:"utf8" nullable:"false" list:"user" create:"admin_required"` SessionId string `width:"256" charset:"utf8" nullable:"false" list:"user" create:"admin_optional"` Content jsonutils.JSONObject `length:"long" charset:"utf8" nullable:"false" list:"user" create:"admin_required"` ProjectId string `width:"128" charset:"ascii" list:"user" create:"admin_optional" index:"true"` Project string `width:"128" charset:"utf8" list:"user" create:"admin_optional"` ProjectDomainId string `name:"project_domain_id" default:"default" width:"128" charset:"ascii" list:"user" create:"admin_optional"` ProjectDomain string `name:"project_domain" default:"Default" width:"128" charset:"utf8" list:"user" create:"admin_optional"` UserId string `width:"128" charset:"ascii" list:"user" create:"admin_required"` User string `width:"128" charset:"utf8" list:"user" create:"admin_required"` DomainId string `width:"128" charset:"ascii" list:"user" create:"admin_optional"` Domain string `width:"128" charset:"utf8" list:"user" create:"admin_optional"` Roles string `width:"64" charset:"utf8" list:"user" create:"admin_optional"` }
func (*SEmailQueue) Dump ¶
func (eq *SEmailQueue) Dump() string
func (*SEmailQueue) GetRecordTime ¶
func (e *SEmailQueue) GetRecordTime() time.Time
func (*SEmailQueue) PerformSend ¶
func (eq *SEmailQueue) PerformSend( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.EmailQueueSendInput, ) (jsonutils.JSONObject, error)
func (*SEmailQueue) PostCreate ¶
func (eq *SEmailQueue) PostCreate( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject, )
func (*SEmailQueue) Run ¶
func (eq *SEmailQueue) Run()
type SEmailQueueManager ¶
type SEmailQueueManager struct {
db.SLogBaseManager
}
var EmailQueueManager *SEmailQueueManager
func (*SEmailQueueManager) FetchCustomizeColumns ¶
func (manager *SEmailQueueManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []api.EmailQueueDetails
func (*SEmailQueueManager) ListItemFilter ¶
func (manager *SEmailQueueManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.EmailQueueListInput, ) (*sqlchemy.SQuery, error)
宿主机/物理机列表
func (*SEmailQueueManager) ValidateCreateData ¶
func (manager *SEmailQueueManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.EmailQueueCreateInput, ) (api.EmailQueueCreateInput, error)
type SEmailQueueStatus ¶
type SEmailQueueStatusManager ¶
type SEmailQueueStatusManager struct {
db.SModelBaseManager
}
var EmailQueueStatusManager *SEmailQueueStatusManager
type SEvent ¶
type SEvent struct { db.SLogBase // 资源创建时间 CreatedAt time.Time `nullable:"false" created_at:"true" index:"true" get:"user" list:"user" json:"created_at"` Message string Event string `width:"64" nullable:"true"` AdvanceDays int TopicId string `width:"128" nullable:"true" index:"true"` }
func (*SEvent) GetRecordTime ¶
type SEventDisplay ¶
type SEventManager ¶
type SEventManager struct {
db.SLogBaseManager
}
var EventManager *SEventManager
func (*SEventManager) CreateEvent ¶
type SLocalTemplateManager ¶
type SLocalTemplateManager struct {
// contains filtered or unexported fields
}
templateDir = "/opt/yunion/share/local-templates"
var LocalTemplateManager *SLocalTemplateManager
func (*SLocalTemplateManager) FillWithTemplate ¶
func (lt *SLocalTemplateManager) FillWithTemplate(ctx context.Context, lang string, no notifyv2.SNotification) (params rpcapi.SendParams, err error)
type SNotification ¶
type SNotification struct { db.SStatusStandaloneResourceBase ContactType string `width:"16" nullable:"false" create:"required" list:"user" get:"user" index:"true"` // swagger:ignore Topic string `width:"128" nullable:"true" create:"required" search:"user"` Priority string `width:"16" nullable:"true" create:"optional" list:"user" get:"user"` // swagger:ignore Message string `create:"required"` ReceivedAt time.Time `nullable:"true" list:"user" get:"user"` EventId string `width:"128" nullable:"true"` SendTimes int Tag string `width:"16" nullable:"true" index:"true" create:"optional"` }
func (*SNotification) AddOne ¶
func (n *SNotification) AddOne() error
func (*SNotification) CustomizeCreate ¶
func (n *SNotification) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SNotification) Notification ¶
func (n *SNotification) Notification() (notifyv2.SNotification, error)
func (*SNotification) PostCreate ¶
func (n *SNotification) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SNotification) ReceiveDetails ¶
func (n *SNotification) ReceiveDetails(userCred mcclient.TokenCredential, scope string) ([]api.ReceiveDetail, error)
func (*SNotification) ReceiverNotificationsNotOK ¶
func (n *SNotification) ReceiverNotificationsNotOK() ([]SReceiverNotification, error)
func (*SNotification) TemplateStore ¶
func (n *SNotification) TemplateStore() notifyv2.ITemplateStore
type SNotificationManager ¶
type SNotificationManager struct {
db.SStatusStandaloneResourceBaseManager
}
var NotificationManager *SNotificationManager
func (*SNotificationManager) FetchCustomizeColumns ¶
func (nm *SNotificationManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []api.NotificationDetails
func (*SNotificationManager) FetchOwnerId ¶
func (nm *SNotificationManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SNotificationManager) FilterByOwner ¶
func (nm *SNotificationManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SNotificationManager) InitializeData ¶
func (self *SNotificationManager) InitializeData() error
func (*SNotificationManager) ListItemFilter ¶
func (nm *SNotificationManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.NotificationListInput) (*sqlchemy.SQuery, error)
通知消息列表
func (*SNotificationManager) NamespaceScope ¶
func (nm *SNotificationManager) NamespaceScope() rbacutils.TRbacScope
func (*SNotificationManager) PerformEventNotify ¶
func (nm *SNotificationManager) PerformEventNotify(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.NotificationManagerEventNotifyInput) (api.NotificationManagerEventNotifyOutput, error)
TODO: support project and domain
func (*SNotificationManager) ReSend ¶
func (nm *SNotificationManager) ReSend(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
func (*SNotificationManager) ResourceScope ¶
func (nm *SNotificationManager) ResourceScope() rbacutils.TRbacScope
func (*SNotificationManager) ValidateCreateData ¶
func (nm *SNotificationManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.NotificationCreateInput) (api.NotificationCreateInput, error)
type SReceiver ¶
type SReceiver struct { db.SStatusStandaloneResourceBase db.SDomainizedResourceBase db.SEnabledResourceBase Email string `width:"128" nullable:"false" create:"optional" update:"user" get:"user" list:"user"` // swagger:ignore Mobile string `width:"32" nullable:"false" create:"optional"` Lang string `width:"8" charset:"ascii" nullable:"false" list:"user" update:"user"` // swagger:ignore EnabledEmail tristate.TriState `default:"false" update:"user"` // swagger:ignore VerifiedEmail tristate.TriState `default:"false" update:"user"` // swagger:ignore EnabledMobile tristate.TriState `default:"false" update:"user"` // swagger:ignore VerifiedMobile tristate.TriState `default:"false" update:"user"` // contains filtered or unexported fields }
func (*SReceiver) CustomizeCreate ¶
func (r *SReceiver) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SReceiver) GetDomainId ¶
func (*SReceiver) GetEnabledContactTypes ¶
func (*SReceiver) GetTemplateLang ¶
func (*SReceiver) GetVerifiedContactTypes ¶
func (*SReceiver) IsEnabledContactType ¶
func (*SReceiver) IsVerifiedContactType ¶
func (*SReceiver) MarkContactTypeUnVerified ¶
func (*SReceiver) MarkContactTypeVerified ¶
func (*SReceiver) PerformDisable ¶
func (r *SReceiver) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)
func (*SReceiver) PerformEnable ¶
func (r *SReceiver) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformEnableInput) (jsonutils.JSONObject, error)
func (*SReceiver) PerformEnableContactType ¶
func (r *SReceiver) PerformEnableContactType(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ReceiverEnableContactTypeInput) (jsonutils.JSONObject, error)
func (*SReceiver) PerformTriggerVerify ¶
func (r *SReceiver) PerformTriggerVerify(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ReceiverTriggerVerifyInput) (jsonutils.JSONObject, error)
func (*SReceiver) PerformVerify ¶
func (r *SReceiver) PerformVerify(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ReceiverVerifyInput) (jsonutils.JSONObject, error)
func (*SReceiver) PostCreate ¶
func (r *SReceiver) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SReceiver) PostUpdate ¶
func (r *SReceiver) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SReceiver) PreUpdate ¶
func (r *SReceiver) PreUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SReceiver) SetEnabledContactTypes ¶
func (*SReceiver) SetVerifiedContactTypes ¶
func (*SReceiver) StartSubcontactPullTask ¶
func (*SReceiver) ValidateUpdateData ¶
func (r *SReceiver) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ReceiverUpdateInput) (api.ReceiverUpdateInput, error)
type SReceiverBase ¶
type SReceiverBase struct { }
func (SReceiverBase) GetDomainId ¶
func (s SReceiverBase) GetDomainId() string
func (SReceiverBase) GetTemplateLang ¶
func (s SReceiverBase) GetTemplateLang(ctx context.Context) (string, error)
func (SReceiverBase) IsEnabled ¶
func (s SReceiverBase) IsEnabled() bool
func (SReceiverBase) IsEnabledContactType ¶
func (s SReceiverBase) IsEnabledContactType(_ string) (bool, error)
func (SReceiverBase) IsVerifiedContactType ¶
func (s SReceiverBase) IsVerifiedContactType(_ string) (bool, error)
type SReceiverManager ¶
type SReceiverManager struct { db.SStatusStandaloneResourceBaseManager db.SDomainizedResourceBaseManager db.SEnabledResourceBaseManager }
var ReceiverManager *SReceiverManager
func (*SReceiverManager) CreateByInsertOrUpdate ¶
func (rm *SReceiverManager) CreateByInsertOrUpdate() bool
func (*SReceiverManager) EnabledContactFilter ¶
func (*SReceiverManager) FetchByIDs ¶
func (*SReceiverManager) FetchByIdOrNames ¶
func (*SReceiverManager) FetchCustomizeColumns ¶
func (rm *SReceiverManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []api.ReceiverDetails
func (*SReceiverManager) FetchOwnerId ¶
func (rm *SReceiverManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SReceiverManager) FilterByOwner ¶
func (rm *SReceiverManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery
func (*SReceiverManager) InitializeData ¶
func (rm *SReceiverManager) InitializeData() error
func (*SReceiverManager) ListItemFilter ¶
func (rm *SReceiverManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.ReceiverListInput) (*sqlchemy.SQuery, error)
func (*SReceiverManager) OnAdd ¶
func (rm *SReceiverManager) OnAdd(obj *jsonutils.JSONDict)
Implemente interface EventHandler
func (*SReceiverManager) OnDelete ¶
func (rm *SReceiverManager) OnDelete(obj *jsonutils.JSONDict)
func (*SReceiverManager) OnUpdate ¶
func (rm *SReceiverManager) OnUpdate(oldObj, newObj *jsonutils.JSONDict)
func (*SReceiverManager) OrderByExtraFields ¶
func (rm *SReceiverManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ReceiverListInput) (*sqlchemy.SQuery, error)
func (*SReceiverManager) PerformGetTypes ¶
func (rm *SReceiverManager) PerformGetTypes(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ConfigManagerGetTypesInput) (api.ConfigManagerGetTypesOutput, error)
func (*SReceiverManager) PerformIntellijGet ¶
func (rm *SReceiverManager) PerformIntellijGet(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ReceiverIntellijGetInput) (jsonutils.JSONObject, error)
func (*SReceiverManager) QueryDistinctExtraField ¶
func (*SReceiverManager) ResourceScope ¶
func (rm *SReceiverManager) ResourceScope() rbacutils.TRbacScope
func (*SReceiverManager) StartWatchUserInKeystone ¶
func (rm *SReceiverManager) StartWatchUserInKeystone() error
func (*SReceiverManager) ValidateCreateData ¶
func (rm *SReceiverManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.ReceiverCreateInput) (api.ReceiverCreateInput, error)
func (*SReceiverManager) VerifiedContactFilter ¶
type SReceiverNotification ¶
type SReceiverNotification struct { db.SJointResourceBase ReceiverID string `width:"128" charset:"ascii" nullable:"false" index:"true"` NotificationID string `width:"128" charset:"ascii" nullable:"false" index:"true"` // ignore if ReceiverID is not empty or default Contact string `width:"128" index:"true"` ReceiverType string `width:"16"` SendAt time.Time SendBy string `width:"128"` Status string `width:"36" charset:"ascii"` FailedReason string `width:"1024"` }
+onecloud:swagger-gen-ignore
func (*SReceiverNotification) BeforeSend ¶
func (*SReceiverNotification) Receiver ¶
func (rn *SReceiverNotification) Receiver() (IReceiver, error)
type SReceiverNotificationManager ¶
type SReceiverNotificationManager struct {
db.SJointResourceBaseManager
}
var ReceiverNotificationManager *SReceiverNotificationManager
func (*SReceiverNotificationManager) Create ¶
func (rnm *SReceiverNotificationManager) Create(ctx context.Context, userCred mcclient.TokenCredential, receiverID, notificationID string) (*SReceiverNotification, error)
func (*SReceiverNotificationManager) CreateContact ¶
func (rnm *SReceiverNotificationManager) CreateContact(ctx context.Context, userCred mcclient.TokenCredential, contact, notificationID string) (*SReceiverNotification, error)
func (*SReceiverNotificationManager) CreateRobot ¶
func (rnm *SReceiverNotificationManager) CreateRobot(ctx context.Context, userCred mcclient.TokenCredential, RobotID, notificationID string) (*SReceiverNotification, error)
func (*SReceiverNotificationManager) GetMasterFieldName ¶
func (rnm *SReceiverNotificationManager) GetMasterFieldName() string
func (*SReceiverNotificationManager) GetSlaveFieldName ¶
func (rnm *SReceiverNotificationManager) GetSlaveFieldName() string
func (*SReceiverNotificationManager) InitializeData ¶
func (self *SReceiverNotificationManager) InitializeData() error
func (*SReceiverNotificationManager) SetHandlerProcessTimeout ¶
func (rnm *SReceiverNotificationManager) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration
type SRobot ¶
type SRobot struct { db.SSharableVirtualResourceBase db.SEnabledResourceBase Type string `width:"16" nullable:"false" create:"required" get:"user" list:"user" index:"true"` Address string `nullable:"false" create:"required" update:"user" get:"user" list:"user"` Lang string `width:"16" nullable:"false" create:"required" update:"user" get:"user" list:"user"` }
func (*SRobot) CustomizeCreate ¶
func (r *SRobot) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SRobot) GetDomainId ¶
func (*SRobot) GetTemplateLang ¶
func (*SRobot) IsEnabledContactType ¶
func (*SRobot) IsVerifiedContactType ¶
func (*SRobot) PerformDisable ¶
func (r *SRobot) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformDisableInput) (jsonutils.JSONObject, error)
func (*SRobot) PerformEnable ¶
func (r *SRobot) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input apis.PerformEnableInput) (jsonutils.JSONObject, error)
func (*SRobot) PostDelete ¶
func (r *SRobot) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SRobot) ValidateUpdateData ¶
func (r *SRobot) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.RobotUpdateInput) (api.RobotUpdateInput, error)
type SRobotManager ¶
type SRobotManager struct { db.SSharableVirtualResourceBaseManager db.SEnabledResourceBaseManager }
var RobotManager *SRobotManager
func (*SRobotManager) FetchByIdOrNames ¶
func (*SRobotManager) FetchCustomizeColumns ¶
func (rm *SRobotManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []api.RobotDetails
func (*SRobotManager) InitializeData ¶
func (rm *SRobotManager) InitializeData() error
func (*SRobotManager) ListItemFilter ¶
func (rm *SRobotManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.RobotListInput) (*sqlchemy.SQuery, error)
func (*SRobotManager) ValidateCreateData ¶
func (rm *SRobotManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.RobotCreateInput) (api.RobotCreateInput, error)
type SSubContact ¶
type SSubContact struct { db.SStandaloneResourceBase // id of receiver user ReceiverID string `width:"128" nullable:"false" index:"true"` Type string `width:"16" nullable:"false" index:"true"` Contact string `width:"128" nullable:"false"` ParentContactType string `width:"16" nullable:"false"` Enabled tristate.TriState `default:"false"` Verified tristate.TriState `default:"false"` VerifiedNote string `width:"1024"` }
+onecloud:swagger-gen-ignore
func (*SSubContact) Disable ¶
func (sc *SSubContact) Disable() error
func (*SSubContact) Disverify ¶
func (sc *SSubContact) Disverify() error
func (*SSubContact) Enable ¶
func (sc *SSubContact) Enable() error
func (*SSubContact) Update ¶
func (sc *SSubContact) Update(contact *string, enabled *bool, verified *bool) error
func (*SSubContact) Verify ¶
func (sc *SSubContact) Verify() error
type SSubContactManager ¶
type SSubContactManager struct {
db.SStandaloneResourceBaseManager
}
var SubContactManager *SSubContactManager
type SSubscriber ¶
type SSubscriber struct { db.SStandaloneAnonResourceBase db.SEnabledResourceBase TopicID string `width:"128" charset:"ascii" nullable:"false" index:"true" get:"user" list:"user" create:"required"` Type string `width:"16" charset:"ascii" nullable:"false" index:"true" get:"user" list:"user" create:"required"` Identification string `width:"128" charset:"ascii" nullable:"false" index:"true"` RoleScope string `width:"8" charset:"ascii" nullable:"false" get:"user" list:"user" create:"optional"` ResourceScope string `width:"8" charset:"ascii" nullable:"false" get:"user" list:"user" create:"required"` ResourceAttributionId string `width:"128" charset:"ascii" nullable:"false" get:"user" list:"user" create:"optional"` ResourceAttributionName string `width:"128" charset:"utf8" list:"user" create:"optional"` Scope string `width:"128" charset:"ascii" nullable:"false" create:"required"` DomainId string `width:"128" charset:"ascii" nullable:"false" create:"optional"` }
func (*SSubscriber) CustomizeCreate ¶
func (s *SSubscriber) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SSubscriber) CustomizeDelete ¶
func (s *SSubscriber) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SSubscriber) PerformChange ¶
func (s *SSubscriber) PerformChange(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SubscriberChangeInput) (jsonutils.JSONObject, error)
func (*SSubscriber) PerformDisable ¶
func (s *SSubscriber) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSubscriber) PerformEnable ¶
func (s *SSubscriber) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SSubscriber) PerformSetReceiver ¶
func (s *SSubscriber) PerformSetReceiver(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SubscriberSetReceiverInput) (jsonutils.JSONObject, error)
func (*SSubscriber) PostCreate ¶
func (s *SSubscriber) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SSubscriber) SetReceivers ¶
func (sr *SSubscriber) SetReceivers(ctx context.Context, receiverIds []string) error
type SSubscriberDis ¶
type SSubscriberDis struct { SSubscriber ReceiverName string `json:"receiver_name"` RoleName string `json:"role_name"` }
type SSubscriberManager ¶
type SSubscriberManager struct { db.SStandaloneAnonResourceBaseManager db.SEnabledResourceBaseManager }
var SubscriberManager *SSubscriberManager
func (*SSubscriberManager) FetchCustomizeColumns ¶
func (sm *SSubscriberManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []api.SubscriberDetails
func (*SSubscriberManager) ListItemFilter ¶
func (sm *SSubscriberManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.SubscriberListInput) (*sqlchemy.SQuery, error)
func (*SSubscriberManager) QueryDistinctExtraField ¶
func (*SSubscriberManager) ValidateCreateData ¶
func (sm *SSubscriberManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.SubscriberCreateInput) (api.SubscriberCreateInput, error)
type SSubscriberReceiver ¶
type SSubscriberReceiver struct { db.SJointResourceBase SubscriberId string `width:"36" charset:"ascii" nullable:"false" index:"true"` ReceiverId string `width:"128" charset:"ascii" nullable:"false" index:"true"` }
type SSubscriberReceiverManager ¶
type SSubscriberReceiverManager struct {
db.SJointResourceBaseManager
}
var SubscriberReceiverManager *SSubscriberReceiverManager
func (*SSubscriberReceiverManager) GetMasterFieldName ¶
func (srm *SSubscriberReceiverManager) GetMasterFieldName() string
func (*SSubscriberReceiverManager) GetSlaveFieldName ¶
func (srm *SSubscriberReceiverManager) GetSlaveFieldName() string
type STemplate ¶
type STemplate struct { db.SStandaloneAnonResourceBase ContactType string `width:"16" nullable:"false" create:"required" update:"user" list:"user"` Topic string `width:"20" nullable:"false" create:"required" update:"user" list:"user"` // title | content | remote TemplateType string `width:"10" nullable:"false" create:"required" update:"user" list:"user"` Content string `length:"text" nullable:"false" create:"required" get:"user" list:"user" update:"user"` Lang string `width:"8" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional"` Example string `nullable:"true" create:"optional" get:"user" list:"user" update:"user"` }
func (*STemplate) ValidateUpdateData ¶
func (t *STemplate) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.TemplateUpdateInput) (api.TemplateUpdateInput, error)
type STemplateManager ¶
type STemplateManager struct {
db.SStandaloneAnonResourceBaseManager
}
var TemplateManager *STemplateManager
func (*STemplateManager) FillWithTemplate ¶
func (tm *STemplateManager) FillWithTemplate(ctx context.Context, lang string, no notifyv2.SNotification) (params apis.SendParams, err error)
FillWithTemplate will return the title and content generated by corresponding template. Local cache about common template will be considered in case of performance issues.
func (*STemplateManager) GetCompanyInfo ¶
func (tm *STemplateManager) GetCompanyInfo(ctx context.Context) (SCompanyInfo, error)
func (*STemplateManager) GetEmailUrl ¶
func (tm *STemplateManager) GetEmailUrl() string
func (*STemplateManager) InitializeData ¶
func (tm *STemplateManager) InitializeData() error
func (*STemplateManager) ListItemFilter ¶
func (tm *STemplateManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input api.TemplateListInput) (*sqlchemy.SQuery, error)
func (*STemplateManager) PerformSave ¶
func (tm *STemplateManager) PerformSave(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.TemplateManagerSaveInput) (jsonutils.JSONObject, error)
func (*STemplateManager) ValidateCreateData ¶
func (tm *STemplateManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.TemplateCreateInput) (api.TemplateCreateInput, error)
type STopic ¶
type STopic struct { db.SStandaloneResourceBase db.SEnabledResourceBase Type string `width:"20" nullable:"false" create:"required" update:"user" list:"user"` Resources uint64 `nullable:"false"` Actions uint32 `nullable:"false"` Results uint8 `nullable:"false"` AdvanceDays int `nullable:"false"` WebconsoleDisable tristate.TriState }
func (*STopic) PerformDisable ¶
func (t *STopic) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input notify.PerformDisableInput) (jsonutils.JSONObject, error)
func (*STopic) PreCheckPerformAction ¶
func (t *STopic) PreCheckPerformAction( ctx context.Context, userCred mcclient.TokenCredential, action string, query jsonutils.JSONObject, data jsonutils.JSONObject, ) error
func (*STopic) ValidateDeleteCondition ¶
func (*STopic) ValidateUpdateData ¶
func (ss *STopic) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input jsonutils.JSONObject) (jsonutils.JSONObject, error)
type STopicManager ¶
type STopicManager struct { db.SStandaloneResourceBaseManager db.SEnabledResourceBaseManager }
var TopicManager *STopicManager
func (*STopicManager) FetchCustomizeColumns ¶
func (sm *STopicManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []notify.TopicDetails
func (*STopicManager) InitializeData ¶
func (sm *STopicManager) InitializeData() error
func (*STopicManager) ListItemFilter ¶
func (sm *STopicManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input notify.TopicListInput) (*sqlchemy.SQuery, error)
func (*STopicManager) TopicByEvent ¶
func (sm *STopicManager) TopicByEvent(eventStr string, advanceDays int) (*STopic, error)
func (*STopicManager) TopicsByEvent ¶
func (sm *STopicManager) TopicsByEvent(eventStr string, advanceDays int) ([]STopic, error)
func (*STopicManager) ValidateCreateData ¶
func (sm *STopicManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input jsonutils.JSONObject) (jsonutils.JSONObject, error)
type SVerification ¶
type SVerification struct { db.SStandaloneResourceBase ReceiverId string `width:"128" nullable:"false"` ContactType string `width:"16" nullable:"false"` Token string `width:"200" nullable:"false"` }
+onecloud:swagger-gen-ignore
type SVerificationManager ¶
type SVerificationManager struct {
db.SStandaloneResourceBaseManager
}
var VerificationManager *SVerificationManager
func (*SVerificationManager) Create ¶
func (vm *SVerificationManager) Create(ctx context.Context, receiverId, contactType string) (*SVerification, error)
func (*SVerificationManager) Get ¶
func (vm *SVerificationManager) Get(receiverId, contactType string) (*SVerification, error)
Click to show internal directories.
Click to hide internal directories.