Documentation ¶
Index ¶
- Constants
- type Channel
- type Mail
- type MailUser
- type Setting
- func (setting *Setting) CreateChannel(channel string) *Setting
- func (setting *Setting) CreateMailUser(username, email string)
- func (setting *Setting) InitBasicField()
- func (setting *Setting) IsChannelExist(channel string) bool
- func (setting *Setting) Mail() Mail
- func (setting *Setting) RemoveChannel(id int)
- func (setting *Setting) RemoveMailUser(id int)
- func (setting *Setting) Slack() Slack
- func (setting *Setting) UpdateMail(config, template string)
- func (setting *Setting) UpdateSlack(url, template string)
- func (setting *Setting) UpdateWebHook(url, template string)
- func (setting *Setting) Webhook() WebHook
- type Slack
- type WebHook
Constants ¶
View Source
const ( SlackCode = "slack" SlackUrlKey = "url" SlackTemplateKey = "template" SlackChannelKey = "channel" )
View Source
const ( MailCode = "mail" MailTemplateKey = "template" MailServerKey = "server" MailUserKey = "user" )
View Source
const ( WebhookCode = "webhook" WebhookTemplateKey = "template" WebhookUrlKey = "url" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Setting ¶
type Setting struct { Id int `gorm:"type:int(20); primary_key; auto_increment; not null"` Code string `gorm:"type:varchar(100); not null"` Key string `gorm:"type:varchar(100); not null"` Value string `gorm:"type:varchar(4096); not null; default '' "` }
func (*Setting) CreateChannel ¶
创建slack渠道
func (*Setting) CreateMailUser ¶
func (*Setting) IsChannelExist ¶
func (*Setting) RemoveMailUser ¶
func (*Setting) UpdateMail ¶
func (*Setting) UpdateSlack ¶
func (*Setting) UpdateWebHook ¶
Click to show internal directories.
Click to hide internal directories.