Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct {
From string `json:"from"`
To string `json:"to"`
Subject string `json:"subject"`
Body string `json:"template"`
}
Email ...
type Notify ¶
type Notify struct {
// contains filtered or unexported fields
}
Notify ...
func NewNotify ¶
func NewNotify( adaptor *adaptors.Adaptors, appCfg *config.AppConfig, graceful *graceful_service.GracefulService, scriptService *scripts.ScriptService) *Notify
NewNotify ...
type NotifyBind ¶
type NotifyBind struct {
// contains filtered or unexported fields
}
Javascript Binding
Notifr()
.NewSMS() .NewEmail() .NewSlack(channel, text) .NewTelegram(text) .Send(msg)
func (*NotifyBind) NewSlack ¶
func (b *NotifyBind) NewSlack(channel, text string) *SlackMessage
NewSlack ...
func (*NotifyBind) NewTelegram ¶ added in v0.0.18
func (b *NotifyBind) NewTelegram(text string) *Telegram
NewTelegram ...
type NotifyConfig ¶
type NotifyConfig struct {
MbAccessKey string `json:"mb_access_key"`
MbName string `json:"mb_name"`
TWFrom string `json:"tw_from"`
TWSid string `json:"tw_sid"`
TWAuthToken string `json:"tw_auth_token"`
TelegramToken string `json:"telegram_token"`
TelegramChatId *int64 `json:"telegram_chat_id"`
EmailAuth string `json:"email_auth"`
EmailPass string `json:"email_pass"`
EmailSmtp string `json:"email_smtp"`
EmailPort int `json:"email_port"`
EmailSender string `json:"email_sender"`
SlackToken string `json:"slack_token"`
SlackUserName string `json:"slack_user_name"`
// contains filtered or unexported fields
}
NotifyConfig ...
func NewNotifyConfig ¶ added in v0.0.18
func NewNotifyConfig(adaptor *adaptors.Adaptors) *NotifyConfig
NewNotifyConfig ...
func (*NotifyConfig) Update ¶ added in v0.0.18
func (n *NotifyConfig) Update() (err error)
Update ...
type NotifyStat ¶
type NotifyStat struct {
MbBalance float32 `json:"mb_balance,omitempty"`
TwBalance float32 `json:"tw_balance,omitempty"`
Workers int `json:"workers"`
}
NotifyStat ...
type SMS ¶
type SMS struct {
Text string `json:"text"`
// contains filtered or unexported fields
}
SMS ...
type SlackMessage ¶
SlackMessage ...
func (*SlackMessage) Save ¶
func (s *SlackMessage) Save() (addresses []string, message *m.Message)
Save ...
func (*SlackMessage) SetRender ¶
func (s *SlackMessage) SetRender(render *m.TemplateRender)
SetRender ...
type Telegram ¶
type Telegram struct {
Text string `json:"text"`
}
Telegram ...
func (*Telegram) SetRender ¶ added in v0.0.18
func (s *Telegram) SetRender(render *m.TemplateRender)
SetRender ...
type TemplateBind ¶
type TemplateBind struct {
// contains filtered or unexported fields
}
Javascript Binding
Template()
.Render('name', {'key':'val'})
func (*TemplateBind) Render ¶
func (t *TemplateBind) Render(templateName string, params map[string]interface{}) *m.TemplateRender
Render ...
Click to show internal directories.
Click to hide internal directories.