Documentation ¶
Index ¶
- type KeFuInfo
- type KeFuOnlineInfo
- type Manager
- func (csm *Manager) Add(kfAccount, nickName string) (err error)
- func (csm *Manager) Delete(kfAccount string) (err error)
- func (csm *Manager) InviteBind(kfAccount, inviteWX string) (err error)
- func (csm *Manager) List() (customerServiceList []*KeFuInfo, err error)
- func (csm *Manager) OnlineList() (customerServiceOnlineList []*KeFuOnlineInfo, err error)
- func (csm *Manager) SendTypingStatus(openid string, cmd TypingStatus) (err error)
- func (csm *Manager) Update(kfAccount, nickName string) (err error)
- func (csm *Manager) UploadHeadImg(kfAccount, fileName string) (err error)
- type TypingStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeFuInfo ¶
type KeFuInfo struct { KfAccount string `json:"kf_account"` // 完整客服帐号,格式为:帐号前缀@公众号微信号 KfNick string `json:"kf_nick"` // 客服昵称 KfID int `json:"kf_id"` // 客服编号 KfHeadImgURL string `json:"kf_headimgurl"` // 客服头像 KfWX string `json:"kf_wx"` // 如果客服帐号已绑定了客服人员微信号, 则此处显示微信号 InviteWX string `json:"invite_wx"` // 如果客服帐号尚未绑定微信号,但是已经发起了一个绑定邀请, 则此处显示绑定邀请的微信号 InviteExpTime int `json:"invite_expire_time"` // 如果客服帐号尚未绑定微信号,但是已经发起过一个绑定邀请, 邀请的过期时间,为unix 时间戳 InviteStatus string `json:"invite_status"` // 邀请的状态,有等待确认“waiting”,被拒绝“rejected”, 过期“expired” }
KeFuInfo 客服基本信息
type KeFuOnlineInfo ¶
type KeFuOnlineInfo struct { KfAccount string `json:"kf_account"` Status int `json:"status"` KfID int `json:"kf_id"` AcceptedCase int `json:"accepted_case"` }
KeFuOnlineInfo 客服在线信息
type Manager ¶
Manager 客服管理者,可以管理客服
func NewCustomerServiceManager ¶
NewCustomerServiceManager 实例化客服管理
func (*Manager) InviteBind ¶
InviteBind 邀请绑定客服帐号和微信号
func (*Manager) OnlineList ¶
func (csm *Manager) OnlineList() (customerServiceOnlineList []*KeFuOnlineInfo, err error)
OnlineList 获取在线客服列表
func (*Manager) SendTypingStatus ¶
func (csm *Manager) SendTypingStatus(openid string, cmd TypingStatus) (err error)
SendTypingStatus 下发客服输入状态给用户
func (*Manager) UploadHeadImg ¶
UploadHeadImg 上传客服头像
type TypingStatus ¶
type TypingStatus string
TypingStatus 输入状态类型
const ( // Typing 表示正在输入状态 Typing TypingStatus = "Typing" // CancelTyping 表示取消正在输入状态 CancelTyping TypingStatus = "CancelTyping" )
Click to show internal directories.
Click to hide internal directories.