Documentation
¶
Index ¶
- Constants
- type BaseIMProvider
- type BaseSMSProvider
- type BotMsgContent
- type Content
- type CustomerImage
- type CustomerImageResp
- type CustomerMsg
- type CustomerMsgImage
- type CustomerMsgLink
- type CustomerMsgText
- type Endpoint
- type EnterpriseGroupMsg
- type EnterpriseMsg
- type IIMProvider
- type IMEndpoint
- type IMMessage
- type ISMSProvider
- type IServiceEmail
- type IServiceIM
- type IServiceSMS
- type IServiceWechatNotify
- type MPMsgTemplate
- type MPSubscribeMsg
- type MiniProgram
- type MsgCustomer
- type MsgImage
- type MsgLink
- type MsgResp
- type MsgRespImage
- type MsgTemplate
- type ReqBotMsg
- type ReqCustomerMsg
- type ReqEmail
- type ReqSMS
- type TemplateMsg
- type TemplateValue
- type TokenResp
Constants ¶
View Source
const ( ServiceIM = "im" IMGoEasy = "goeasy" )
View Source
const ( Aliyun = "aliyun" Twilio = "twilio" RongCloud = "rongcloud" Huawei = "huawei" )
View Source
const ( BotMsgTypeText = "text" BotMsgTypeMarkdown = "markdown" )
View Source
const ( ErrReqNotify = "ErrReqNotify" ErrMsgNotify = "ErrMsgNotify" )
View Source
const (
ServiceEmail = "email"
)
View Source
const (
ServiceSMS = "sms"
)
View Source
const (
ServiceWechatNotify = "wechat-notify"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseIMProvider ¶
type BaseIMProvider struct {
IIMProvider
// contains filtered or unexported fields
}
func (*BaseIMProvider) GetEndpoint ¶
func (s *BaseIMProvider) GetEndpoint() *IMEndpoint
func (*BaseIMProvider) GetHostByRegion ¶
func (s *BaseIMProvider) GetHostByRegion(code string) string
func (*BaseIMProvider) Init ¶
func (s *BaseIMProvider) Init(endpoint *IMEndpoint) error
func (*BaseIMProvider) PostMessage ¶
func (s *BaseIMProvider) PostMessage(msg *IMMessage) error
type BaseSMSProvider ¶
func (*BaseSMSProvider) AddEndpoint ¶
func (s *BaseSMSProvider) AddEndpoint(name string, endpoint Endpoint)
func (*BaseSMSProvider) GetEndpoint ¶
func (s *BaseSMSProvider) GetEndpoint(name string) (*Endpoint, error)
func (*BaseSMSProvider) Init ¶
func (s *BaseSMSProvider) Init()
type BotMsgContent ¶ added in v0.1.7
type CustomerImage ¶ added in v0.1.7
type CustomerImageResp ¶ added in v0.1.7
type CustomerImageResp struct {
MediaID string `json:"media_id"`
}
type CustomerMsg ¶ added in v0.1.7
type CustomerMsgImage ¶ added in v0.1.7
type CustomerMsgImage struct {
CustomerMsg
Image MsgImage `json:"image"`
}
type CustomerMsgLink ¶ added in v0.1.7
type CustomerMsgLink struct {
CustomerMsg
Link MsgLink `json:"link"`
}
type CustomerMsgText ¶ added in v0.1.7
type CustomerMsgText struct {
CustomerMsg
Text Content `json:"text"`
}
type EnterpriseGroupMsg ¶ added in v0.1.7
type EnterpriseMsg ¶ added in v0.1.7
type EnterpriseMsg struct {
Endpoint string `json:"endpoint"`
EnterpriseGroupMsg
}
type IIMProvider ¶
type IIMProvider interface {
GetHostByRegion(code string) string
Init(endpoint *IMEndpoint) error
PostMessage(msg *IMMessage) error
GetEndpoint() *IMEndpoint
}
type IMEndpoint ¶
type ISMSProvider ¶
type IServiceEmail ¶
type IServiceIM ¶
type IServiceSMS ¶
type IServiceWechatNotify ¶ added in v0.1.7
type MPMsgTemplate ¶ added in v0.1.7
type MPSubscribeMsg ¶ added in v0.1.7
type MPSubscribeMsg struct {
Endpoint string `json:"endpoint"`
}
type MiniProgram ¶ added in v0.1.7
type MsgCustomer ¶ added in v0.1.7
type MsgRespImage ¶ added in v0.1.7
type MsgTemplate ¶ added in v0.1.7
type ReqBotMsg ¶ added in v0.1.7
type ReqBotMsg struct {
BotKey string
BotMsgContent
}
type ReqCustomerMsg ¶ added in v0.1.7
type ReqCustomerMsg struct {
Endpoint string `json:"endpoint"`
Body interface{} `json:"body"`
}
type TemplateMsg ¶ added in v0.1.7
type TemplateMsg struct {
Endpoint string `json:"endpoint"`
MsgTemplate
}
type TemplateValue ¶ added in v0.1.7
type TemplateValue struct {
Value string `json:"value"`
}
Click to show internal directories.
Click to hide internal directories.