Documentation
¶
Index ¶
- type BaseModel
- type Notify
- type NotifyConfig
- type NotifyDB
- func (n *NotifyDB) CheckNotifyNameExist(scopeID, scopeName, notifyName string) (bool, error)
- func (n *NotifyDB) CheckNotifyTemplateExist(scope, scopeID string) (*[]NotifyConfig, error)
- func (n *NotifyDB) CreateNotifyGroup(notifyGroup *NotifyGroup) (id int64, err error)
- func (n *NotifyDB) CreateNotifyRecord(record *Notify) error
- func (n *NotifyDB) CreateUserDefineNotifyTemplate(customize *NotifyConfig) error
- func (n *NotifyDB) DeleteNotifyRecord(id int64) error
- func (n *NotifyDB) GetAllNotifyGroup(scope, scopeId string, orgId int64) ([]model.GetAllGroupData, error)
- func (n *NotifyDB) GetAllUserDefineNotify(scope, scopeID string) (*[]NotifyConfig, error)
- func (n *NotifyDB) GetAllUserDefineTemplates() (*[]NotifyConfig, error)
- func (n *NotifyDB) GetNotify(id int64) (*Notify, error)
- func (n *NotifyDB) GetNotifyGroup(id int64) (*NotifyGroup, error)
- func (n *NotifyDB) GetNotifyList(notifyListReq *model.QueryNotifyListReq) ([]*Notify, error)
- func (n *NotifyDB) GetProjectByScopeID(scopeID string) (projectID string, err error)
- func (n *NotifyDB) GetUserDefine(notifyId string) (*NotifyConfig, error)
- func (n *NotifyDB) UpdateEnable(id int64) error
- func (n *NotifyDB) UpdateNotify(updateNotify *Notify) error
- type NotifyGroup
- type NotifyRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notify ¶
type NotifyConfig ¶
type NotifyConfig struct {
gorm.Model
NotifyID string `gorm:"column:notify_id"`
Metadata string `gorm:"column:metadata"`
Behavior string `gorm:"column:behavior"`
Templates string `gorm:"column:templates"`
Scope string `gorm:"column:scope"`
ScopeID string `gorm:"column:scope_id"`
}
func (*NotifyConfig) TableName ¶
func (c *NotifyConfig) TableName() string
type NotifyDB ¶
func (*NotifyDB) CheckNotifyNameExist ¶
func (*NotifyDB) CheckNotifyTemplateExist ¶
func (n *NotifyDB) CheckNotifyTemplateExist(scope, scopeID string) (*[]NotifyConfig, error)
func (*NotifyDB) CreateNotifyGroup ¶
func (n *NotifyDB) CreateNotifyGroup(notifyGroup *NotifyGroup) (id int64, err error)
func (*NotifyDB) CreateNotifyRecord ¶
func (*NotifyDB) CreateUserDefineNotifyTemplate ¶
func (n *NotifyDB) CreateUserDefineNotifyTemplate(customize *NotifyConfig) error
func (*NotifyDB) DeleteNotifyRecord ¶
func (*NotifyDB) GetAllNotifyGroup ¶
func (*NotifyDB) GetAllUserDefineNotify ¶
func (n *NotifyDB) GetAllUserDefineNotify(scope, scopeID string) (*[]NotifyConfig, error)
func (*NotifyDB) GetAllUserDefineTemplates ¶
func (n *NotifyDB) GetAllUserDefineTemplates() (*[]NotifyConfig, error)
func (*NotifyDB) GetNotifyGroup ¶
func (n *NotifyDB) GetNotifyGroup(id int64) (*NotifyGroup, error)
func (*NotifyDB) GetNotifyList ¶
func (n *NotifyDB) GetNotifyList(notifyListReq *model.QueryNotifyListReq) ([]*Notify, error)
func (*NotifyDB) GetProjectByScopeID ¶
func (*NotifyDB) GetUserDefine ¶
func (n *NotifyDB) GetUserDefine(notifyId string) (*NotifyConfig, error)
func (*NotifyDB) UpdateEnable ¶
func (*NotifyDB) UpdateNotify ¶
type NotifyGroup ¶
type NotifyGroup struct {
BaseModel
Name string `gorm:"size:150"`
ScopeType string `gorm:"size:150;index:idx_scope_type"`
ScopeID string `gorm:"size:150;index:idx_scope_id"`
OrgID int64 `gorm:"index:idx_org_id"`
TargetData string `gorm:"type:text"`
Label string `gorm:"size:200"`
ClusterName string
AutoCreate bool
Creator string `gorm:"size:150"`
}
func (NotifyGroup) TableName ¶
func (NotifyGroup) TableName() string
func (*NotifyGroup) ToApiData ¶
func (notifyGroup *NotifyGroup) ToApiData() *apistructs.NotifyGroup
type NotifyRecord ¶
type NotifyRecord struct {
NotifyId string `json:"notify_id" gorm:"column:notify_id"`
NotifyName string `json:"notify_name" gorm:"column:notify_name"`
ScopeType string `json:"scope_type" gorm:"column:scope_type"`
ScopeId int64 `json:"scope_id" gorm:"column:scope_id"`
GroupId string `json:"group_id" gorm:"column:group_id"`
NotifyGroup string `json:"notify_group" gorm:"column:notify_group"`
Title string `json:"title" gorm:"column:title"`
NotifyTime time.Time `json:"notify_time" gorm:"column:notify_time"`
CreateTime time.Time `json:"create_time" gorm:"column:create_time"`
UpdateTime time.Time `json:"update_time" gorm:"column:update_time"`
}
func (*NotifyRecord) TableName ¶
func (n *NotifyRecord) TableName() string
Click to show internal directories.
Click to hide internal directories.