Documentation
¶
Index ¶
- Constants
- type BindInfo
- type QQBot
- func (bot *QQBot) BindQQ(QQ int64, encryptedEmail string) (err error)
- func (bot *QQBot) BotEventHandler(c *gin.Context)
- func (bot *QQBot) GetBindInfo(encryptedEmail string) (bindInfo BindInfo, err error)
- func (bot *QQBot) GetBotQQ() (botQQ int64, err error)
- func (bot *QQBot) GetStatus(encryptedEmail string) (status bool, err error)
- func (bot *QQBot) SendReplyNotice(isComment bool, holeID, replyID uint, timestamp time.Time, ...) (err error)
- func (bot *QQBot) ToggleStatus(encryptedEmail string) (status bool, err error)
Constants ¶
View Source
const ( BOT_SERVER = "http://localhost:4000/" REDIRECT_SERVER = "http://husthole.com/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindInfo ¶ added in v0.0.3
绑定QQ信息
参数信息:
BindingStatus:绑定状态 //0: 未绑定; 1: 正在绑定; 2: 已绑定
BindQQ:绑定的QQ
type QQBot ¶ added in v0.0.2
type QQBot struct { BotServer string RedirectServer string Rdb *redis.Client Db *sql.DB ErrQQBound error }
func (*QQBot) BotEventHandler ¶ added in v0.0.2
func (*QQBot) GetBindInfo ¶ added in v0.0.3
功能: 获取用户的QQ绑定状态
参数: encryptedEmail: 加密后的email
返回值: bindInfo BindInfo, err error
func (*QQBot) SendReplyNotice ¶ added in v0.0.2
func (bot *QQBot) SendReplyNotice(isComment bool, holeID, replyID uint, timestamp time.Time, encryptedEmail, userAlias, content string) (err error)
功能:发送回复通知
参数:
isComment: 是否为对树洞本身的回复
holeID: 树洞号
replyID: 回复ID
timestamp: 回复时间戳
encryptedEmail: 加密后的用户email
userAlias: 树洞昵称
content: 回复内容
Click to show internal directories.
Click to hide internal directories.