Documentation ¶
Overview ¶
Copyright 2019 Yunion
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Yunion ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Yunion ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Yunion ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Yunion ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Yunion ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type SDingTalkRobotSender
- func (dingRobotSender *SDingTalkRobotSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (dingRobotSender *SDingTalkRobotSender) GetAccessToken(ctx context.Context, key string) error
- func (dingRobotSender *SDingTalkRobotSender) GetSenderType() string
- func (dingRobotSender *SDingTalkRobotSender) IsPersonal() bool
- func (dingRobotSender *SDingTalkRobotSender) IsPullType() bool
- func (dingRobotSender *SDingTalkRobotSender) IsRobot() bool
- func (dingRobotSender *SDingTalkRobotSender) IsSystemConfigContactType() bool
- func (dingRobotSender *SDingTalkRobotSender) IsValid() bool
- func (dingRobotSender *SDingTalkRobotSender) RegisterConfig(config models.SConfig)
- func (dingRobotSender *SDingTalkRobotSender) Send(ctx context.Context, args api.SendParams) error
- func (dingRobotSender *SDingTalkRobotSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SDingTalkSender
- func (dingSender *SDingTalkSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (dingSender *SDingTalkSender) GetAccessToken(ctx context.Context, domainId string) error
- func (dingSender *SDingTalkSender) GetSenderType() string
- func (dingSender *SDingTalkSender) IsPersonal() bool
- func (dingSender *SDingTalkSender) IsPullType() bool
- func (dingSender *SDingTalkSender) IsRobot() bool
- func (dingSender *SDingTalkSender) IsSystemConfigContactType() bool
- func (dingSender *SDingTalkSender) IsValid() bool
- func (dingSender *SDingTalkSender) RegisterConfig(config models.SConfig)
- func (dingSender *SDingTalkSender) Send(ctx context.Context, args api.SendParams) error
- func (dingSender *SDingTalkSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SEmailSender
- func (emailSender *SEmailSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (emailSender *SEmailSender) GetAccessToken(ctx context.Context, key string) error
- func (emailSender *SEmailSender) GetSenderType() string
- func (emailSender *SEmailSender) IsPersonal() bool
- func (emailSender *SEmailSender) IsPullType() bool
- func (emailSender *SEmailSender) IsRobot() bool
- func (emailSender *SEmailSender) IsSystemConfigContactType() bool
- func (emailSender *SEmailSender) IsValid() bool
- func (emailSender *SEmailSender) RegisterConfig(config models.SConfig)
- func (emailSender *SEmailSender) Send(ctx context.Context, args api.SendParams) error
- func (emailSender *SEmailSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SFeishuRobotSender
- func (feishuRobotSender *SFeishuRobotSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (feishuRobotSender *SFeishuRobotSender) GetAccessToken(ctx context.Context, key string) error
- func (feishuRobotSender *SFeishuRobotSender) GetSenderType() string
- func (feishuRobotSender *SFeishuRobotSender) IsPersonal() bool
- func (feishuRobotSender *SFeishuRobotSender) IsPullType() bool
- func (feishuRobotSender *SFeishuRobotSender) IsRobot() bool
- func (feishuRobotSender *SFeishuRobotSender) IsSystemConfigContactType() bool
- func (feishuRobotSender *SFeishuRobotSender) IsValid() bool
- func (feishuRobotSender *SFeishuRobotSender) RegisterConfig(config models.SConfig)
- func (feishuRobotSender *SFeishuRobotSender) Send(ctx context.Context, args api.SendParams) error
- func (feishuRobotSender *SFeishuRobotSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SFeishuSender
- func (feishuSender *SFeishuSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (feishuSender *SFeishuSender) GetAccessToken(ctx context.Context, domainId string) error
- func (self *SFeishuSender) GetSenderType() string
- func (feishuSender *SFeishuSender) IsPersonal() bool
- func (feishuSender *SFeishuSender) IsPullType() bool
- func (feishuSender *SFeishuSender) IsRobot() bool
- func (feishuSender *SFeishuSender) IsSystemConfigContactType() bool
- func (feishuSender *SFeishuSender) IsValid() bool
- func (feishuSender *SFeishuSender) RegisterConfig(config models.SConfig)
- func (feishuSender *SFeishuSender) Send(ctx context.Context, args api.SendParams) error
- func (feishuSender *SFeishuSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SMobileSender
- func (smsSender *SMobileSender) AddConfig(config api.NotifyConfig) error
- func (smsSender *SMobileSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (smsSender *SMobileSender) DeleteConfig(config api.NotifyConfig) error
- func (smsSender *SMobileSender) GetAccessToken(ctx context.Context, key string) error
- func (smsSender *SMobileSender) GetSenderType() string
- func (smsSender *SMobileSender) IsPersonal() bool
- func (smsSender *SMobileSender) IsPullType() bool
- func (smsSender *SMobileSender) IsRobot() bool
- func (smsSender *SMobileSender) IsSystemConfigContactType() bool
- func (smsSender *SMobileSender) IsValid() bool
- func (smsSender *SMobileSender) RegisterConfig(config models.SConfig)
- func (smsSender *SMobileSender) Send(ctx context.Context, args api.SendParams) error
- func (smsSender *SMobileSender) UpdateConfig(config api.NotifyConfig) error
- func (smsSender *SMobileSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SWebconsoleSender
- func (websender *SWebconsoleSender) AddConfig(config api.NotifyConfig) error
- func (websender *SWebconsoleSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (websender *SWebconsoleSender) DeleteConfig(config api.NotifyConfig) error
- func (websender *SWebconsoleSender) GetAccessToken(ctx context.Context, key string) error
- func (self *SWebconsoleSender) GetSenderType() string
- func (websender *SWebconsoleSender) IsPersonal() bool
- func (websender *SWebconsoleSender) IsPullType() bool
- func (websender *SWebconsoleSender) IsRobot() bool
- func (websender *SWebconsoleSender) IsSystemConfigContactType() bool
- func (websender *SWebconsoleSender) IsValid() bool
- func (websender *SWebconsoleSender) RegisterConfig(config models.SConfig)
- func (self *SWebconsoleSender) Send(ctx context.Context, args api.SendParams) error
- func (websender *SWebconsoleSender) UpdateConfig(config api.NotifyConfig) error
- func (websender *SWebconsoleSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SWebhookSender
- func (websender *SWebhookSender) AddConfig(config api.NotifyConfig) error
- func (websender *SWebhookSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (websender *SWebhookSender) DeleteConfig(config api.NotifyConfig) error
- func (websender *SWebhookSender) GetAccessToken(ctx context.Context, key string) error
- func (self *SWebhookSender) GetSenderType() string
- func (websender *SWebhookSender) IsPersonal() bool
- func (websender *SWebhookSender) IsPullType() bool
- func (websender *SWebhookSender) IsRobot() bool
- func (websender *SWebhookSender) IsSystemConfigContactType() bool
- func (websender *SWebhookSender) IsValid() bool
- func (websender *SWebhookSender) RegisterConfig(config models.SConfig)
- func (self *SWebhookSender) Send(ctx context.Context, args api.SendParams) error
- func (websender *SWebhookSender) UpdateConfig(config api.NotifyConfig) error
- func (websender *SWebhookSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SWebsocketSender
- func (websocket *SWebsocketSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (websocket *SWebsocketSender) GetAccessToken(ctx context.Context, key string) error
- func (websocket *SWebsocketSender) GetSenderType() string
- func (websocket *SWebsocketSender) IsPersonal() bool
- func (websocket *SWebsocketSender) IsPullType() bool
- func (websocket *SWebsocketSender) IsRobot() bool
- func (websocket *SWebsocketSender) IsSystemConfigContactType() bool
- func (websocket *SWebsocketSender) IsValid() bool
- func (websocket *SWebsocketSender) RegisterConfig(config models.SConfig)
- func (websocket *SWebsocketSender) Send(ctx context.Context, params api.SendParams) error
- func (websocket *SWebsocketSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SWorkwxRobotSender
- func (workwxRobotSender *SWorkwxRobotSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (workwxRobotSender *SWorkwxRobotSender) GetAccessToken(ctx context.Context, key string) error
- func (workwxRobotSender *SWorkwxRobotSender) GetSenderType() string
- func (workwxRobotSender *SWorkwxRobotSender) IsPersonal() bool
- func (workwxRobotSender *SWorkwxRobotSender) IsPullType() bool
- func (workwxRobotSender *SWorkwxRobotSender) IsRobot() bool
- func (workwxRobotSender *SWorkwxRobotSender) IsSystemConfigContactType() bool
- func (workwxRobotSender *SWorkwxRobotSender) IsValid() bool
- func (workwxRobotSender *SWorkwxRobotSender) RegisterConfig(config models.SConfig)
- func (workwxRobotSender *SWorkwxRobotSender) Send(ctx context.Context, args api.SendParams) error
- func (workwxRobotSender *SWorkwxRobotSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
- type SWorkwxSender
- func (workwxSender *SWorkwxSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
- func (workwxSender *SWorkwxSender) GetAccessToken(ctx context.Context, domainId string) error
- func (workwxSender *SWorkwxSender) GetSenderType() string
- func (workwxSender *SWorkwxSender) IsPersonal() bool
- func (workwxSender *SWorkwxSender) IsPullType() bool
- func (workwxSender *SWorkwxSender) IsRobot() bool
- func (workwxSender *SWorkwxSender) IsSystemConfigContactType() bool
- func (workwxSender *SWorkwxSender) IsValid() bool
- func (workwxSender *SWorkwxSender) RegisterConfig(config models.SConfig)
- func (workwxSender *SWorkwxSender) Send(ctx context.Context, args api.SendParams) error
- func (workwxSender *SWorkwxSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
Constants ¶
const ( ApiWebhookRobotV2SendMessage = "https://open.feishu.cn/open-apis/bot/v2/hook/" // 钉钉发送消息 ApiDingtalkSendMessage = "https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2?" // 钉钉获取token ApiDingtalkGetToken = "https://oapi.dingtalk.com/gettoken?" // 钉钉使用手机号获取用户ID ApiDingtalkGetUserByMobile = "https://oapi.dingtalk.com/topapi/v2/user/getbymobile?" // 钉钉获取消息发送结果 ApiDingtalkGetSendResult = "https://oapi.dingtalk.com/topapi/message/corpconversation/getsendresult?" // 企业微信获取token ApiWorkwxGetToken = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?" // 企业微信使用手机号获取用户ID ApiWorkwxGetUserByMobile = "https://qyapi.weixin.qq.com/cgi-bin/user/getuserid?" // 企业微信发送消息 ApiWorkwxSendMessage = "https://qyapi.weixin.qq.com/cgi-bin/message/send?" // 飞书使用手机号或邮箱获取用户ID ApiFetchUserID = "https://open.feishu.cn/open-apis/user/v1/batch_get_id?" )
const ApiSendMessageForFeishuByOpenId = feishu.ApiRobotSendMessage + "?receive_id_type=open_id"
const EVENT_HEADER = "X-Yunion-Event"
const (
LARK_MESSAGE_SUCCESS = "success"
)
const (
WEBHOOK_PREFIX = "https://oapi.dingtalk.com/robot/send?access_token="
)
Variables ¶
var ( ErrIPWhiteList = errors.Error("Need to add ip to whtelist") ErrNoSupportSecSetting = errors.Error("Only the IP address option in the security Settings is supported") ErrNoSuchMobile = errors.Error("No such mobile") ErrIncompleteConfig = errors.Error("Incomplete config") ErrDuplicateConfig = errors.Error("Duplicate config for a domain") )
var ErrNoSuchWebhook = errors.Error("No such webhook")
var (
FAIL_KEY = []string{"失败", "fail ", "failed"}
)
var InvalidWebhook = errors.Error("Invalid webhook")
Functions ¶
This section is empty.
Types ¶
type SDingTalkRobotSender ¶
type SDingTalkRobotSender struct {
// contains filtered or unexported fields
}
func (*SDingTalkRobotSender) ContactByMobile ¶
func (*SDingTalkRobotSender) GetAccessToken ¶
func (dingRobotSender *SDingTalkRobotSender) GetAccessToken(ctx context.Context, key string) error
func (*SDingTalkRobotSender) GetSenderType ¶
func (dingRobotSender *SDingTalkRobotSender) GetSenderType() string
func (*SDingTalkRobotSender) IsPersonal ¶
func (dingRobotSender *SDingTalkRobotSender) IsPersonal() bool
func (*SDingTalkRobotSender) IsPullType ¶
func (dingRobotSender *SDingTalkRobotSender) IsPullType() bool
func (*SDingTalkRobotSender) IsRobot ¶
func (dingRobotSender *SDingTalkRobotSender) IsRobot() bool
func (*SDingTalkRobotSender) IsSystemConfigContactType ¶
func (dingRobotSender *SDingTalkRobotSender) IsSystemConfigContactType() bool
func (*SDingTalkRobotSender) IsValid ¶
func (dingRobotSender *SDingTalkRobotSender) IsValid() bool
func (*SDingTalkRobotSender) RegisterConfig ¶
func (dingRobotSender *SDingTalkRobotSender) RegisterConfig(config models.SConfig)
func (*SDingTalkRobotSender) Send ¶
func (dingRobotSender *SDingTalkRobotSender) Send(ctx context.Context, args api.SendParams) error
func (*SDingTalkRobotSender) ValidateConfig ¶
func (dingRobotSender *SDingTalkRobotSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SDingTalkSender ¶
type SDingTalkSender struct {
// contains filtered or unexported fields
}
func (*SDingTalkSender) ContactByMobile ¶
func (*SDingTalkSender) GetAccessToken ¶
func (dingSender *SDingTalkSender) GetAccessToken(ctx context.Context, domainId string) error
func (*SDingTalkSender) GetSenderType ¶
func (dingSender *SDingTalkSender) GetSenderType() string
func (*SDingTalkSender) IsPersonal ¶
func (dingSender *SDingTalkSender) IsPersonal() bool
func (*SDingTalkSender) IsPullType ¶
func (dingSender *SDingTalkSender) IsPullType() bool
func (*SDingTalkSender) IsRobot ¶
func (dingSender *SDingTalkSender) IsRobot() bool
func (*SDingTalkSender) IsSystemConfigContactType ¶
func (dingSender *SDingTalkSender) IsSystemConfigContactType() bool
func (*SDingTalkSender) IsValid ¶
func (dingSender *SDingTalkSender) IsValid() bool
func (*SDingTalkSender) RegisterConfig ¶
func (dingSender *SDingTalkSender) RegisterConfig(config models.SConfig)
func (*SDingTalkSender) Send ¶
func (dingSender *SDingTalkSender) Send(ctx context.Context, args api.SendParams) error
func (*SDingTalkSender) ValidateConfig ¶
func (dingSender *SDingTalkSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SEmailSender ¶
type SEmailSender struct {
// contains filtered or unexported fields
}
func (*SEmailSender) ContactByMobile ¶
func (*SEmailSender) GetAccessToken ¶
func (emailSender *SEmailSender) GetAccessToken(ctx context.Context, key string) error
func (*SEmailSender) GetSenderType ¶
func (emailSender *SEmailSender) GetSenderType() string
func (*SEmailSender) IsPersonal ¶
func (emailSender *SEmailSender) IsPersonal() bool
func (*SEmailSender) IsPullType ¶
func (emailSender *SEmailSender) IsPullType() bool
func (*SEmailSender) IsRobot ¶
func (emailSender *SEmailSender) IsRobot() bool
func (*SEmailSender) IsSystemConfigContactType ¶
func (emailSender *SEmailSender) IsSystemConfigContactType() bool
func (*SEmailSender) IsValid ¶
func (emailSender *SEmailSender) IsValid() bool
func (*SEmailSender) RegisterConfig ¶
func (emailSender *SEmailSender) RegisterConfig(config models.SConfig)
func (*SEmailSender) Send ¶
func (emailSender *SEmailSender) Send(ctx context.Context, args api.SendParams) error
func (*SEmailSender) ValidateConfig ¶
func (emailSender *SEmailSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SFeishuRobotSender ¶
type SFeishuRobotSender struct {
// contains filtered or unexported fields
}
func (*SFeishuRobotSender) ContactByMobile ¶
func (*SFeishuRobotSender) GetAccessToken ¶
func (feishuRobotSender *SFeishuRobotSender) GetAccessToken(ctx context.Context, key string) error
func (*SFeishuRobotSender) GetSenderType ¶
func (feishuRobotSender *SFeishuRobotSender) GetSenderType() string
func (*SFeishuRobotSender) IsPersonal ¶
func (feishuRobotSender *SFeishuRobotSender) IsPersonal() bool
func (*SFeishuRobotSender) IsPullType ¶
func (feishuRobotSender *SFeishuRobotSender) IsPullType() bool
func (*SFeishuRobotSender) IsRobot ¶
func (feishuRobotSender *SFeishuRobotSender) IsRobot() bool
func (*SFeishuRobotSender) IsSystemConfigContactType ¶
func (feishuRobotSender *SFeishuRobotSender) IsSystemConfigContactType() bool
func (*SFeishuRobotSender) IsValid ¶
func (feishuRobotSender *SFeishuRobotSender) IsValid() bool
func (*SFeishuRobotSender) RegisterConfig ¶
func (feishuRobotSender *SFeishuRobotSender) RegisterConfig(config models.SConfig)
func (*SFeishuRobotSender) Send ¶
func (feishuRobotSender *SFeishuRobotSender) Send(ctx context.Context, args api.SendParams) error
func (*SFeishuRobotSender) ValidateConfig ¶
func (feishuRobotSender *SFeishuRobotSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SFeishuSender ¶
type SFeishuSender struct {
// contains filtered or unexported fields
}
func (*SFeishuSender) ContactByMobile ¶
func (feishuSender *SFeishuSender) ContactByMobile(ctx context.Context, mobile, domainId string) (string, error)
根据用户手机号获取用户的open_id
func (*SFeishuSender) GetAccessToken ¶
func (feishuSender *SFeishuSender) GetAccessToken(ctx context.Context, domainId string) error
获取token
func (*SFeishuSender) GetSenderType ¶
func (self *SFeishuSender) GetSenderType() string
func (*SFeishuSender) IsPersonal ¶
func (feishuSender *SFeishuSender) IsPersonal() bool
func (*SFeishuSender) IsPullType ¶
func (feishuSender *SFeishuSender) IsPullType() bool
func (*SFeishuSender) IsRobot ¶
func (feishuSender *SFeishuSender) IsRobot() bool
func (*SFeishuSender) IsSystemConfigContactType ¶
func (feishuSender *SFeishuSender) IsSystemConfigContactType() bool
func (*SFeishuSender) IsValid ¶
func (feishuSender *SFeishuSender) IsValid() bool
func (*SFeishuSender) RegisterConfig ¶
func (feishuSender *SFeishuSender) RegisterConfig(config models.SConfig)
func (*SFeishuSender) Send ¶
func (feishuSender *SFeishuSender) Send(ctx context.Context, args api.SendParams) error
发送飞书消息
func (*SFeishuSender) ValidateConfig ¶
func (feishuSender *SFeishuSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
校验appId与appSecret
type SMobileSender ¶
type SMobileSender struct {
// contains filtered or unexported fields
}
func (*SMobileSender) AddConfig ¶
func (smsSender *SMobileSender) AddConfig(config api.NotifyConfig) error
func (*SMobileSender) ContactByMobile ¶
func (*SMobileSender) DeleteConfig ¶
func (smsSender *SMobileSender) DeleteConfig(config api.NotifyConfig) error
func (*SMobileSender) GetAccessToken ¶
func (smsSender *SMobileSender) GetAccessToken(ctx context.Context, key string) error
func (*SMobileSender) GetSenderType ¶
func (smsSender *SMobileSender) GetSenderType() string
func (*SMobileSender) IsPersonal ¶
func (smsSender *SMobileSender) IsPersonal() bool
func (*SMobileSender) IsPullType ¶
func (smsSender *SMobileSender) IsPullType() bool
func (*SMobileSender) IsRobot ¶
func (smsSender *SMobileSender) IsRobot() bool
func (*SMobileSender) IsSystemConfigContactType ¶
func (smsSender *SMobileSender) IsSystemConfigContactType() bool
func (*SMobileSender) IsValid ¶
func (smsSender *SMobileSender) IsValid() bool
func (*SMobileSender) RegisterConfig ¶
func (smsSender *SMobileSender) RegisterConfig(config models.SConfig)
func (*SMobileSender) Send ¶
func (smsSender *SMobileSender) Send(ctx context.Context, args api.SendParams) error
func (*SMobileSender) UpdateConfig ¶
func (smsSender *SMobileSender) UpdateConfig(config api.NotifyConfig) error
func (*SMobileSender) ValidateConfig ¶
func (smsSender *SMobileSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SWebconsoleSender ¶
type SWebconsoleSender struct {
// contains filtered or unexported fields
}
func (*SWebconsoleSender) AddConfig ¶
func (websender *SWebconsoleSender) AddConfig(config api.NotifyConfig) error
func (*SWebconsoleSender) ContactByMobile ¶
func (*SWebconsoleSender) DeleteConfig ¶
func (websender *SWebconsoleSender) DeleteConfig(config api.NotifyConfig) error
func (*SWebconsoleSender) GetAccessToken ¶
func (websender *SWebconsoleSender) GetAccessToken(ctx context.Context, key string) error
func (*SWebconsoleSender) GetSenderType ¶
func (self *SWebconsoleSender) GetSenderType() string
func (*SWebconsoleSender) IsPersonal ¶
func (websender *SWebconsoleSender) IsPersonal() bool
func (*SWebconsoleSender) IsPullType ¶
func (websender *SWebconsoleSender) IsPullType() bool
func (*SWebconsoleSender) IsRobot ¶
func (websender *SWebconsoleSender) IsRobot() bool
func (*SWebconsoleSender) IsSystemConfigContactType ¶
func (websender *SWebconsoleSender) IsSystemConfigContactType() bool
func (*SWebconsoleSender) IsValid ¶
func (websender *SWebconsoleSender) IsValid() bool
func (*SWebconsoleSender) RegisterConfig ¶
func (websender *SWebconsoleSender) RegisterConfig(config models.SConfig)
func (*SWebconsoleSender) Send ¶
func (self *SWebconsoleSender) Send(ctx context.Context, args api.SendParams) error
func (*SWebconsoleSender) UpdateConfig ¶
func (websender *SWebconsoleSender) UpdateConfig(config api.NotifyConfig) error
func (*SWebconsoleSender) ValidateConfig ¶
func (websender *SWebconsoleSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SWebhookSender ¶
type SWebhookSender struct {
// contains filtered or unexported fields
}
func (*SWebhookSender) AddConfig ¶
func (websender *SWebhookSender) AddConfig(config api.NotifyConfig) error
func (*SWebhookSender) ContactByMobile ¶
func (*SWebhookSender) DeleteConfig ¶
func (websender *SWebhookSender) DeleteConfig(config api.NotifyConfig) error
func (*SWebhookSender) GetAccessToken ¶
func (websender *SWebhookSender) GetAccessToken(ctx context.Context, key string) error
func (*SWebhookSender) GetSenderType ¶
func (self *SWebhookSender) GetSenderType() string
func (*SWebhookSender) IsPersonal ¶
func (websender *SWebhookSender) IsPersonal() bool
func (*SWebhookSender) IsPullType ¶
func (websender *SWebhookSender) IsPullType() bool
func (*SWebhookSender) IsRobot ¶
func (websender *SWebhookSender) IsRobot() bool
func (*SWebhookSender) IsSystemConfigContactType ¶
func (websender *SWebhookSender) IsSystemConfigContactType() bool
func (*SWebhookSender) IsValid ¶
func (websender *SWebhookSender) IsValid() bool
func (*SWebhookSender) RegisterConfig ¶
func (websender *SWebhookSender) RegisterConfig(config models.SConfig)
func (*SWebhookSender) Send ¶
func (self *SWebhookSender) Send(ctx context.Context, args api.SendParams) error
func (*SWebhookSender) UpdateConfig ¶
func (websender *SWebhookSender) UpdateConfig(config api.NotifyConfig) error
func (*SWebhookSender) ValidateConfig ¶
func (websender *SWebhookSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SWebsocketSender ¶
type SWebsocketSender struct {
// contains filtered or unexported fields
}
func (*SWebsocketSender) ContactByMobile ¶
func (*SWebsocketSender) GetAccessToken ¶
func (websocket *SWebsocketSender) GetAccessToken(ctx context.Context, key string) error
func (*SWebsocketSender) GetSenderType ¶
func (websocket *SWebsocketSender) GetSenderType() string
func (*SWebsocketSender) IsPersonal ¶
func (websocket *SWebsocketSender) IsPersonal() bool
func (*SWebsocketSender) IsPullType ¶
func (websocket *SWebsocketSender) IsPullType() bool
func (*SWebsocketSender) IsRobot ¶
func (websocket *SWebsocketSender) IsRobot() bool
func (*SWebsocketSender) IsSystemConfigContactType ¶
func (websocket *SWebsocketSender) IsSystemConfigContactType() bool
func (*SWebsocketSender) IsValid ¶
func (websocket *SWebsocketSender) IsValid() bool
func (*SWebsocketSender) RegisterConfig ¶
func (websocket *SWebsocketSender) RegisterConfig(config models.SConfig)
func (*SWebsocketSender) Send ¶
func (websocket *SWebsocketSender) Send(ctx context.Context, params api.SendParams) error
func (*SWebsocketSender) ValidateConfig ¶
func (websocket *SWebsocketSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SWorkwxRobotSender ¶
type SWorkwxRobotSender struct {
// contains filtered or unexported fields
}
func (*SWorkwxRobotSender) ContactByMobile ¶
func (*SWorkwxRobotSender) GetAccessToken ¶
func (workwxRobotSender *SWorkwxRobotSender) GetAccessToken(ctx context.Context, key string) error
func (*SWorkwxRobotSender) GetSenderType ¶
func (workwxRobotSender *SWorkwxRobotSender) GetSenderType() string
func (*SWorkwxRobotSender) IsPersonal ¶
func (workwxRobotSender *SWorkwxRobotSender) IsPersonal() bool
func (*SWorkwxRobotSender) IsPullType ¶
func (workwxRobotSender *SWorkwxRobotSender) IsPullType() bool
func (*SWorkwxRobotSender) IsRobot ¶
func (workwxRobotSender *SWorkwxRobotSender) IsRobot() bool
func (*SWorkwxRobotSender) IsSystemConfigContactType ¶
func (workwxRobotSender *SWorkwxRobotSender) IsSystemConfigContactType() bool
func (*SWorkwxRobotSender) IsValid ¶
func (workwxRobotSender *SWorkwxRobotSender) IsValid() bool
func (*SWorkwxRobotSender) RegisterConfig ¶
func (workwxRobotSender *SWorkwxRobotSender) RegisterConfig(config models.SConfig)
func (*SWorkwxRobotSender) Send ¶
func (workwxRobotSender *SWorkwxRobotSender) Send(ctx context.Context, args api.SendParams) error
func (*SWorkwxRobotSender) ValidateConfig ¶
func (workwxRobotSender *SWorkwxRobotSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)
type SWorkwxSender ¶
type SWorkwxSender struct {
// contains filtered or unexported fields
}
func (*SWorkwxSender) ContactByMobile ¶
func (*SWorkwxSender) GetAccessToken ¶
func (workwxSender *SWorkwxSender) GetAccessToken(ctx context.Context, domainId string) error
func (*SWorkwxSender) GetSenderType ¶
func (workwxSender *SWorkwxSender) GetSenderType() string
func (*SWorkwxSender) IsPersonal ¶
func (workwxSender *SWorkwxSender) IsPersonal() bool
func (*SWorkwxSender) IsPullType ¶
func (workwxSender *SWorkwxSender) IsPullType() bool
func (*SWorkwxSender) IsRobot ¶
func (workwxSender *SWorkwxSender) IsRobot() bool
func (*SWorkwxSender) IsSystemConfigContactType ¶
func (workwxSender *SWorkwxSender) IsSystemConfigContactType() bool
func (*SWorkwxSender) IsValid ¶
func (workwxSender *SWorkwxSender) IsValid() bool
func (*SWorkwxSender) RegisterConfig ¶
func (workwxSender *SWorkwxSender) RegisterConfig(config models.SConfig)
func (*SWorkwxSender) Send ¶
func (workwxSender *SWorkwxSender) Send(ctx context.Context, args api.SendParams) error
func (*SWorkwxSender) ValidateConfig ¶
func (workwxSender *SWorkwxSender) ValidateConfig(ctx context.Context, config api.NotifyConfig) (string, error)