Documentation ¶
Index ¶
- Constants
- Variables
- type Account
- type ActionRequest
- type ActionResult
- type Bot
- type BotExpand
- type BrandList
- type ChatContact
- type ChatContactExpand
- type ChatContactGroup
- type ChatContactGroupExpand
- type ChatContactLabel
- type ChatGroup
- func (cc *ChatGroup) CriteriaAlias(fieldname string) (dbx.Field, error)
- func (g *ChatGroup) Fields() []dbx.Field
- func (g *ChatGroup) SelectFrom() string
- func (chatgroup *ChatGroup) SetAlias(alias string)
- func (chatgroup *ChatGroup) SetAvatar(avatar string)
- func (chatgroup *ChatGroup) SetExt(ext string)
- func (chatgroup *ChatGroup) SetLastMsgId(msgId string)
- func (chatgroup *ChatGroup) SetLastSendAt(sendAt time.Time)
- type ChatGroupCriteria
- type ChatGroupExtend
- type ChatGroupMember
- type ChatGroupMemberExpand
- type ChatMessageHeader
- type ChatUser
- func (u *ChatUser) CriteriaAlias(fieldname string) (dbx.Field, error)
- func (u *ChatUser) Fields() []dbx.Field
- func (u *ChatUser) SelectFrom() string
- func (chatuser *ChatUser) SetAlias(alias string)
- func (chatuser *ChatUser) SetAvatar(avatar string)
- func (chatuser *ChatUser) SetCity(city string)
- func (chatuser *ChatUser) SetCountry(country string)
- func (chatuser *ChatUser) SetExt(ext string)
- func (chatuser *ChatUser) SetLabel(label string)
- func (chatuser *ChatUser) SetLastMsgId(msgId string)
- func (chatuser *ChatUser) SetLastSendAt(sendAt time.Time)
- func (chatuser *ChatUser) SetProvince(province string)
- func (chatuser *ChatUser) SetRemark(remark string)
- func (chatuser *ChatUser) SetSignature(signature string)
- type ChatUserCriteria
- type Device
- type ErrorHandler
- func (o *ErrorHandler) AccountValidate(q dbx.Queryable, name string, pass string) bool
- func (o *ErrorHandler) AccountValidateSecret(q dbx.Queryable, name string, secret string) bool
- func (o *ErrorHandler) ActionCount(pool *redis.Pool, ar *ActionRequest) (int, int, int)
- func (o *ErrorHandler) ActionCountDaily(conn redis.Conn, ar *ActionRequest) int
- func (o *ErrorHandler) ActionCountHourly(conn redis.Conn, ar *ActionRequest) int
- func (o *ErrorHandler) ActionCountMinutely(conn redis.Conn, ar *ActionRequest) int
- func (o *ErrorHandler) ActionIsHealthy(conn redis.Conn, ar *ActionRequest) bool
- func (o *ErrorHandler) ActionRequestCountByTime(conn redis.Conn, keyPattern string, checkTimeout int64) int
- func (o *ErrorHandler) AddBotFailingAction(conn redis.Conn, fb *FailingBot, actionType string)
- func (o *ErrorHandler) AddFailingBot(conn redis.Conn, fb *FailingBot)
- func (o *ErrorHandler) BotMigrate(q dbx.Queryable, botId string, login string) string
- func (o *ErrorHandler) ChatMessageHeaderFromMessage(msg string) ChatMessageHeader
- func (o *ErrorHandler) CheckBotOwner(q dbx.Queryable, login string, accountName string)
- func (o *ErrorHandler) CheckBotOwnerById(q dbx.Queryable, botId string, accountName string)
- func (o *ErrorHandler) CheckFilterOwner(q dbx.Queryable, filterId string, accountName string)
- func (o *ErrorHandler) CheckFilterTemplateOwner(q dbx.Queryable, filterTemplateId string, accountName string) bool
- func (o *ErrorHandler) CheckFilterTemplateSuiteOwner(q dbx.Queryable, suiteId string, accountName string) bool
- func (o *ErrorHandler) CheckOwnerOfChatgroups(q dbx.Queryable, accountName string, ids []string) []string
- func (o *ErrorHandler) CheckOwnerOfChatusers(q dbx.Queryable, accountName string, ids []string) []string
- func (o *ErrorHandler) ContainsWechatMessageWithMsgId(db *mgo.Database, msgId string) (bool, error)
- func (o *ErrorHandler) CreateChatRoom(db *mgo.Database, botId string, peerId string) *pb.ChatRoom
- func (o *ErrorHandler) DeleteBot(q dbx.Queryable, botId string)
- func (o *ErrorHandler) DeleteChatContact(q dbx.Queryable, botId string, username string)
- func (o *ErrorHandler) DeleteFilter(q dbx.Queryable, filterId string)
- func (o *ErrorHandler) DeleteFilterTemplate(q dbx.Queryable, templateId string)
- func (o *ErrorHandler) EnsureChatRoomIndexes(db *mgo.Database)
- func (o *ErrorHandler) EnsureMessageIndexes(db *mgo.Database)
- func (o *ErrorHandler) EnsuredMongoIndexes(db *mgo.Database)
- func (o *ErrorHandler) FailingActionCount(conn redis.Conn, keyPattern string, checkTimeout int64) int
- func (o *ErrorHandler) FillWechatMessageContact(wrapper *rpc.GRPCWrapper, message *WechatMessage, bot *Bot) error
- func (o *ErrorHandler) FillWechatMessagesContact(wrapper *rpc.GRPCWrapper, messages []*WechatMessage, bot *Bot) error
- func (o *ErrorHandler) FillWechatMessagesImageSignedURL(ossBucket *oss.Bucket, messages []*WechatMessage)
- func (o *ErrorHandler) FindOrCreateChatGroups(q dbx.Queryable, chatgroups []*ChatGroup) []ChatGroup
- func (o *ErrorHandler) FindOrCreateChatUser(q dbx.Queryable, ctype string, chatusername string) *ChatUser
- func (o *ErrorHandler) FindOrCreateChatUsers(q dbx.Queryable, chatusers []*ChatUser) []ChatUser
- func (o *ErrorHandler) FriendRequestToJson(fr *FriendRequest) string
- func (o *ErrorHandler) GetAccountById(q dbx.Queryable, aid string) *Account
- func (o *ErrorHandler) GetAccountByName(q dbx.Queryable, name string) *Account
- func (o *ErrorHandler) GetAccounts(q dbx.Queryable) []Account
- func (o *ErrorHandler) GetActionRequest(pool *redis.Pool, arid string) *ActionRequest
- func (o *ErrorHandler) GetActionRequest_(conn redis.Conn, arid string) *ActionRequest
- func (o *ErrorHandler) GetBotById(q dbx.Queryable, botid string) *Bot
- func (o *ErrorHandler) GetBotByIdNull(q dbx.Queryable, botid string) *Bot
- func (o *ErrorHandler) GetBotByLogin(q dbx.Queryable, login string, accountId string) *Bot
- func (o *ErrorHandler) GetBotExpandById(q dbx.Queryable, botid string) *BotExpand
- func (o *ErrorHandler) GetBotFailingActions(conn redis.Conn) []interface{}
- func (o *ErrorHandler) GetBotsByAccountName(q dbx.Queryable, accountname string) []BotExpand
- func (o *ErrorHandler) GetChatGroupById(q dbx.Queryable, cgid string) *ChatGroup
- func (o *ErrorHandler) GetChatGroupByName(q dbx.Queryable, ctype string, groupname string) *ChatGroup
- func (o *ErrorHandler) GetChatGroupByNames(q dbx.Queryable, ctype string, groupnames []string) []ChatGroup
- func (o *ErrorHandler) GetChatGroupCount(q dbx.Queryable, criteria ChatGroupCriteria) int64
- func (o *ErrorHandler) GetChatGroupCountWithBotId(q dbx.Queryable, criteria ChatGroupCriteria) int64
- func (o *ErrorHandler) GetChatGroupMemberByGroup(q dbx.Queryable, groupname string) []ChatGroupMember
- func (o *ErrorHandler) GetChatGroupMemberById(q dbx.Queryable, gmid string) *ChatGroupMember
- func (o *ErrorHandler) GetChatGroups(q dbx.Queryable, accountId string, criteria ChatGroupCriteria, ...) []ChatGroupExtend
- func (o *ErrorHandler) GetChatGroupsWithBotId(q dbx.Queryable, criteria ChatGroupCriteria, paging utils.Paging) []ChatGroupExtend
- func (o *ErrorHandler) GetChatRoomWithId(db *mgo.Database, roomId string) *pb.ChatRoom
- func (o *ErrorHandler) GetChatRoomWithPeerId(db *mgo.Database, botId string, peerId string) *pb.ChatRoom
- func (o *ErrorHandler) GetChatRooms(db *mgo.Database, botIds []string, chatType string, fromRoomId string, ...) []*pb.ChatRoom
- func (o *ErrorHandler) GetChatUnreadMessagesMeta(db *mgo.Database, userId string, peerId string, fromMessageId string) *UnreadMessageMeta
- func (o *ErrorHandler) GetChatUserById(q dbx.Queryable, cuid string) *ChatUser
- func (o *ErrorHandler) GetChatUserByName(q dbx.Queryable, ctype string, username string) *ChatUser
- func (o *ErrorHandler) GetChatUserCount(q dbx.Queryable, criteria ChatUserCriteria) int64
- func (o *ErrorHandler) GetChatUserCountWithBotId(q dbx.Queryable, criteria ChatUserCriteria) int64
- func (o *ErrorHandler) GetChatUsers(q dbx.Queryable, accountId string, criteria ChatUserCriteria, ...) []ChatUser
- func (o *ErrorHandler) GetChatUsersByNames(q dbx.Queryable, ctype string, chatusernames []string) []ChatUser
- func (o *ErrorHandler) GetChatUsersWithBotId(q dbx.Queryable, criteria ChatUserCriteria, paging utils.Paging) []ChatUser
- func (o *ErrorHandler) GetDeviceByAccountName(q dbx.Queryable, accountname string) []Device
- func (o *ErrorHandler) GetFailingBots(conn redis.Conn) []interface{}
- func (o *ErrorHandler) GetFilterByAccountId(q dbx.Queryable, accountid string) []Filter
- func (o *ErrorHandler) GetFilterById(q dbx.Queryable, filterid string) *Filter
- func (o *ErrorHandler) GetFilterTemplateById(q dbx.Queryable, templateId string) *FilterTemplate
- func (o *ErrorHandler) GetFilterTemplateSuiteById(q dbx.Queryable, suiteId string) *FilterTemplateSuite
- func (o *ErrorHandler) GetFilterTemplateSuitesByAccountName(q dbx.Queryable, accountname string) []FilterTemplateSuite
- func (o *ErrorHandler) GetFilterTemplatesBySuiteId(q dbx.Queryable, suiteId string) []FilterTemplate
- func (o *ErrorHandler) GetFriendRequestsByLogin(q dbx.Queryable, login string, status string) []FriendRequest
- func (o *ErrorHandler) GetMessagesHistories(db *mgo.Database, userId string, peerId string, direction string, ...) []*WechatMessage
- func (o *ErrorHandler) GetMomentByBotAndCode(q dbx.Queryable, botId string, momentCode string) *Moment
- func (o *ErrorHandler) GetMomentByCode(q dbx.Queryable, momentCode string) []Moment
- func (o *ErrorHandler) GetWechatMessageWithMsgId(db *mgo.Database, msgId string) *WechatMessage
- func (o *ErrorHandler) GetWechatMessages(query *mgo.Query) []*WechatMessage
- func (o *ErrorHandler) LoadCookiesFromString(cookiestrings []string) []*http.Cookie
- func (o *ErrorHandler) LoadWebTriggerCookies(pool *redis.Pool, header ChatMessageHeader, domain string) []*http.Cookie
- func (o *ErrorHandler) MomentCrawlRedisKey(botId string) string
- func (ctx *ErrorHandler) NewAccount(name string, pass string) *Account
- func (o *ErrorHandler) NewActionRequest(login string, actiontype string, actionbody string, status string) *ActionRequest
- func (o *ErrorHandler) NewBot(name string, bottype string, accountId string, login string) *Bot
- func (ctx *ErrorHandler) NewChatContact(botId string, chatuserid string) *ChatContact
- func (ctx *ErrorHandler) NewChatContactGroup(botId string, chatgroupid string) *ChatContactGroup
- func (o *ErrorHandler) NewChatContactLabel(botId string, labelId int, label string) *ChatContactLabel
- func (ctx *ErrorHandler) NewChatGroup(groupname string, ctype string, nickname string, owner string, membercount int, ...) *ChatGroup
- func (ctx *ErrorHandler) NewChatGroupMember(gid string, uid string, attendance int) *ChatGroupMember
- func (ctx *ErrorHandler) NewChatUser(username string, ctype string, nickname string) *ChatUser
- func (o *ErrorHandler) NewDefaultChatContactExpand() dbx.Searchable
- func (o *ErrorHandler) NewDefaultChatContactGroupExpand() dbx.Searchable
- func (o *ErrorHandler) NewDefaultChatContactLabel() dbx.Searchable
- func (o *ErrorHandler) NewDefaultChatGroup() dbx.Searchable
- func (o *ErrorHandler) NewDefaultChatGroupMemberExpand() dbx.Searchable
- func (o *ErrorHandler) NewDefaultChatUser() dbx.Searchable
- func (o *ErrorHandler) NewDefaultFriendRequest() dbx.Searchable
- func (o *ErrorHandler) NewDefaultMoment() dbx.Searchable
- func (o *ErrorHandler) NewDevice(name string, bottype string, accountId string) *Device
- func (o *ErrorHandler) NewFailingBot(ar *ActionRequest) *FailingBot
- func (o *ErrorHandler) NewFilter(name string, filterType string, templateId string, accountId string) *Filter
- func (o *ErrorHandler) NewFilterTemplate(accountId string, name string, ftsuiteId string, index int, fttype string, ...) *FilterTemplate
- func (o *ErrorHandler) NewFilterTemplateSuite(accountId string, name string) *FilterTemplateSuite
- func (o *ErrorHandler) NewFriendRequest(botId string, login string, requestlogin string, requestbody string, ...) *FriendRequest
- func (o *ErrorHandler) NewMoment(botId string, momentCode string, sendAt int, chatUserId string) *Moment
- func (o *ErrorHandler) RecoverAction(conn redis.Conn, key string, action string)
- func (o *ErrorHandler) RecoverBotFailingAction(pool *redis.Pool, recoverTime int64)
- func (o *ErrorHandler) RecoverClient(conn redis.Conn, key string)
- func (o *ErrorHandler) RecoverFailingBot(pool *redis.Pool, recoverTime int64)
- func (o *ErrorHandler) RedisDo(conn redis.Conn, timeout time.Duration, cmd string, args ...interface{}) interface{}
- func (o *ErrorHandler) RedisMatch(conn redis.Conn, keyPattern string) []string
- func (o *ErrorHandler) RedisMatchCount(conn redis.Conn, keyPattern string) int
- func (o *ErrorHandler) RedisMatchCountCond(conn redis.Conn, keyPattern string, cmp func(redis.Conn, string) bool) int
- func (o *ErrorHandler) RedisSend(conn redis.Conn, cmd string, args ...interface{})
- func (o *ErrorHandler) RedisString(reply interface{}) string
- func (o *ErrorHandler) RedisValue(reply interface{}) []interface{}
- func (o *ErrorHandler) SaveAccount(q dbx.Queryable, account *Account)
- func (o *ErrorHandler) SaveActionRequestFailLog(conn redis.Conn, ar *ActionRequest)
- func (o *ErrorHandler) SaveActionRequestWLimit(conn redis.Conn, apilogdb *mgo.Database, ar *ActionRequest, ...)
- func (o *ErrorHandler) SaveBot(q dbx.Queryable, bot *Bot)
- func (o *ErrorHandler) SaveChatContact(q dbx.Queryable, chatcontact *ChatContact)
- func (o *ErrorHandler) SaveChatContactGroup(q dbx.Queryable, chatcontactgroup *ChatContactGroup)
- func (o *ErrorHandler) SaveChatContactLabels(q dbx.Queryable, chatcontactlabels []*ChatContactLabel)
- func (o *ErrorHandler) SaveChatGroup(q dbx.Queryable, chatgroup *ChatGroup)
- func (o *ErrorHandler) SaveChatGroupMember(q dbx.Queryable, chatGroupMember *ChatGroupMember)
- func (o *ErrorHandler) SaveChatUser(q dbx.Queryable, chatuser *ChatUser)
- func (o *ErrorHandler) SaveContactByAccept(q dbx.Queryable, clientType string, botId string, fr FriendRequest)
- func (o *ErrorHandler) SaveDevice(q dbx.Queryable, device *Device)
- func (o *ErrorHandler) SaveFailingActionRequest(conn redis.Conn, ar *ActionRequest, actionCheck, botCheck HealthCheckConfig)
- func (o *ErrorHandler) SaveFilter(q dbx.Queryable, filter *Filter)
- func (o *ErrorHandler) SaveFilterTemplate(q dbx.Queryable, filtertemp *FilterTemplate)
- func (o *ErrorHandler) SaveFilterTemplateSuite(q dbx.Queryable, ftsuite *FilterTemplateSuite)
- func (o *ErrorHandler) SaveFriendRequest(q dbx.Queryable, fr *FriendRequest)
- func (o *ErrorHandler) SaveIgnoreChatContact(q dbx.Queryable, chatcontact *ChatContact)
- func (o *ErrorHandler) SaveIgnoreChatContactGroup(q dbx.Queryable, chatcontactgroup *ChatContactGroup)
- func (o *ErrorHandler) SaveIgnoreChatContactGroups(q dbx.Queryable, chatcontactgroups []*ChatContactGroup)
- func (o *ErrorHandler) SaveIgnoreChatContacts(q dbx.Queryable, chatcontacts []*ChatContact)
- func (o *ErrorHandler) SaveIgnoreGroupMember(q dbx.Queryable, chatGroupMember *ChatGroupMember)
- func (o *ErrorHandler) SaveMoment(q dbx.Queryable, moment *Moment)
- func (o *ErrorHandler) SaveMomentCrawlTail(pool *redis.Pool, botId string, momentCode string)
- func (o *ErrorHandler) SaveWebTriggerCookies(pool *redis.Pool, header ChatMessageHeader, domain string, ...)
- func (o *ErrorHandler) SelectByCriteria(q dbx.Queryable, accountId string, query string, domain string) ([]interface{}, utils.Paging)
- func (o *ErrorHandler) SpopMomentCrawlTail(pool *redis.Pool, botId string) string
- func (o *ErrorHandler) SyncChatContact(q dbx.Queryable, botIds []string, lastId string, pagesize int64) []ChatContact
- func (o *ErrorHandler) UpdateActionRequest(pool *redis.Pool, apilogdb *mgo.Database, ar *ActionRequest)
- func (o *ErrorHandler) UpdateActionRequest_(conn redis.Conn, apilogdb *mgo.Database, ar *ActionRequest)
- func (o *ErrorHandler) UpdateApiLog(db *mgo.Database, ar *ActionRequest)
- func (o *ErrorHandler) UpdateBot(q dbx.Queryable, bot *Bot)
- func (o *ErrorHandler) UpdateBotFilterId(q dbx.Queryable, bot *Bot)
- func (o *ErrorHandler) UpdateBotLogin(q dbx.Queryable, bot *Bot)
- func (o *ErrorHandler) UpdateBotMomentFilterId(q dbx.Queryable, bot *Bot)
- func (o *ErrorHandler) UpdateChatGroup(q dbx.Queryable, chatgroup *ChatGroup)
- func (o *ErrorHandler) UpdateChatRoomLastReadMsgId(db *mgo.Database, botId string, peerId string, msgId string)
- func (o *ErrorHandler) UpdateChatUser(q dbx.Queryable, chatuser *ChatUser)
- func (o *ErrorHandler) UpdateFilter(q dbx.Queryable, filter *Filter)
- func (o *ErrorHandler) UpdateFilterTemplate(q dbx.Queryable, template *FilterTemplate)
- func (o *ErrorHandler) UpdateFilterTemplateSuite(q dbx.Queryable, suite *FilterTemplateSuite)
- func (o *ErrorHandler) UpdateFriendRequest(q dbx.Queryable, fr *FriendRequest)
- func (o *ErrorHandler) UpdateOrCreateChatGroup(q dbx.Queryable, chatgroup *ChatGroup)
- func (o *ErrorHandler) UpdateOrCreateChatGroups(q dbx.Queryable, chatgroups []*ChatGroup)
- func (o *ErrorHandler) UpdateOrCreateChatRoom(db *mgo.Database, botId string, peerId string)
- func (o *ErrorHandler) UpdateOrCreateChatUser(q dbx.Queryable, chatuser *ChatUser)
- func (o *ErrorHandler) UpdateOrCreateChatUsers(q dbx.Queryable, chatusers []*ChatUser)
- func (o *ErrorHandler) UpdateOrCreateGroupMembers(q dbx.Queryable, chatGroupMembers []*ChatGroupMember)
- func (o *ErrorHandler) UpdateWechatMessages(db *mgo.Database, messages []map[string]interface{})
- type FailingBot
- type Filter
- type FilterTemplate
- type FilterTemplateSuite
- type FriendRequest
- type HealthCheckConfig
- type Moment
- type MsgSource
- type UnreadMessageMeta
- type WechatFriendRequest
- type WechatMessage
- type WechatMessageContact
Constants ¶
View Source
const (
ApilogCollection string = "apilogs"
)
View Source
const (
ChatRoomCollection string = "chat_rooms"
)
View Source
const (
TN_CHATCONTACTGROUPS string = "chatcontactgroups"
)
View Source
const (
TN_CHATCONTACTS string = "chatcontacts"
)
View Source
const (
TN_CHATGROUPMEMBERS string = "chatgroupmembers"
)
View Source
const (
TN_CHATGROUPS string = "chatgroups"
)
View Source
const (
TN_CHATUSERS string = "chatusers"
)
View Source
const (
TN_FRIENDREQUEST string = "friendrequests"
)
View Source
const (
TN_MOMENTS string = "moments"
)
View Source
const (
WechatMessageCollection string = "wechat_message_histories"
)
Variables ¶
View Source
var (
TN_BOTS string = "bots"
)
View Source
var (
TN_CHATCONTACTLABELS string = "chatcontactlabels"
)
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { AccountId string `db:"accountid"` AccountName string `db:"accountname"` Avatar sql.NullString `db:"avatar"` Email sql.NullString `db:"email"` Secret string `db:"secret"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
type ActionRequest ¶
type ActionRequest struct { ActionRequestId string `json:"actionRequestId"` ClientType string `json:"clientType"` ClientId string `json:"clientId"` Login string `json:"login"` ActionType string `json:"actionType"` ActionBody string `json:"actionBody"` Status string `json:"status"` Result string `json:"result"` CreateAt utils.JSONTime `json:"createAt"` ReplyAt utils.JSONTime `json:"replyAt"` }
func (*ActionRequest) ToBotActionRequest ¶
func (ar *ActionRequest) ToBotActionRequest() *pb.BotActionRequest
type ActionResult ¶
type ActionResult struct { Data interface{} `json:"data"` Success bool `json:"success"` }
type Bot ¶
type Bot struct { BotId string `db:"botid"` AccountId string `db:"accountid"` BotName string `db:"botname"` Login string `db:"login"` ChatbotType string `db:"chatbottype"` LoginInfo sql.NullString `db:"logininfo"` Callback sql.NullString `db:"callback"` FilterId sql.NullString `db:"filterid"` MomentFilterId sql.NullString `db:"momentfilterid"` WxaappId sql.NullString `db:"wxaappid"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
type BotExpand ¶
type BotExpand struct { BotId string `db:"botid"` AccountId string `db:"accountid"` BotName string `db:"botname"` Login string `db:"login"` ChatbotType string `db:"chatbottype"` LoginInfo sql.NullString `db:"logininfo"` Callback sql.NullString `db:"callback"` FilterId sql.NullString `db:"filterid"` MomentFilterId sql.NullString `db:"momentfilterid"` WxaappId sql.NullString `db:"wxaappid"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` Alias sql.NullString `db:"alias"` NickName sql.NullString `db:"nickname"` Avatar sql.NullString `db:"avatar"` Sex int `db:"sex"` Country sql.NullString `db:"country"` Province sql.NullString `db:"province"` City sql.NullString `db:"city"` Signature sql.NullString `db:"signature"` Remark sql.NullString `db:"remark"` Label sql.NullString `db:"label"` LastSendAt mysql.NullTime `db:"lastsendat"` }
type ChatContact ¶
type ChatContactExpand ¶
func (*ChatContactExpand) CriteriaAlias ¶
func (cc *ChatContactExpand) CriteriaAlias(fieldname string) (dbx.Field, error)
func (*ChatContactExpand) Fields ¶
func (cc *ChatContactExpand) Fields() []dbx.Field
func (*ChatContactExpand) SelectFrom ¶
func (cc *ChatContactExpand) SelectFrom() string
type ChatContactGroup ¶
type ChatContactGroupExpand ¶
func (*ChatContactGroupExpand) CriteriaAlias ¶
func (cg *ChatContactGroupExpand) CriteriaAlias(fieldname string) (dbx.Field, error)
func (*ChatContactGroupExpand) Fields ¶
func (cg *ChatContactGroupExpand) Fields() []dbx.Field
func (*ChatContactGroupExpand) SelectFrom ¶
func (cg *ChatContactGroupExpand) SelectFrom() string
type ChatContactLabel ¶
type ChatContactLabel struct { ChatContactLabelId string `db:"chatcontactlabelid"` BotId string `db:"botid"` LabelId int `db:"labelid"` Label string `db:"label"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
func (*ChatContactLabel) CriteriaAlias ¶
func (l *ChatContactLabel) CriteriaAlias(fieldname string) (dbx.Field, error)
func (*ChatContactLabel) Fields ¶
func (l *ChatContactLabel) Fields() []dbx.Field
func (*ChatContactLabel) SelectFrom ¶
func (l *ChatContactLabel) SelectFrom() string
type ChatGroup ¶
type ChatGroup struct { ChatGroupId string `db:"chatgroupid"` GroupName string `db:"groupname"` Type string `db:"type"` Alias sql.NullString `db:"alias"` NickName string `db:"nickname"` Owner string `db:"owner"` Avatar sql.NullString `db:"avatar"` MemberCount int `db:"membercount"` MaxMemberCount int `db:"maxmembercount"` Ext sql.NullString `db:"ext" search:"-"` LastMsgId sql.NullString `db:"lastmsgid"` LastSendAt mysql.NullTime `db:"lastsendat"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` LastSyncMembersAt mysql.NullTime `db:"lastsyncmembersat"` }
func (*ChatGroup) CriteriaAlias ¶
func (*ChatGroup) SelectFrom ¶
func (*ChatGroup) SetLastMsgId ¶
func (*ChatGroup) SetLastSendAt ¶
type ChatGroupCriteria ¶
type ChatGroupCriteria struct { GroupName sql.NullString NickName sql.NullString Type sql.NullString BotId sql.NullString }
type ChatGroupExtend ¶
type ChatGroupExtend struct { ChatGroup OwnerUserName sql.NullString `db:"owner_username"` OwnerAlias sql.NullString `db:"owner_alias"` OwnerNickName sql.NullString `db:"owner_nickname"` OwnerAvatar sql.NullString `db:"owner_avatar"` OwnerSex sql.NullInt64 `db:"owner_sex"` OwnerCountry sql.NullString `db:"owner_country"` OwnerProvince sql.NullString `db:"owner_province"` OwnerCity sql.NullString `db:"owner_city"` OwnerSignature sql.NullString `db:"owner_signature"` OwnerRemark sql.NullString `db:"owner_remark"` OwnerLabel sql.NullString `db:"owner_label"` OwnerLastMsgId sql.NullString `db:"owner_lastmsgid"` OwnerLastSendAt mysql.NullTime `db:"owner_lastsendat"` }
type ChatGroupMember ¶
type ChatGroupMember struct { ChatGroupMemberId string `db:"chatgroupmemberid"` ChatGroupId string `db:"chatgroupid"` ChatMemberId string `db:"chatmemberid"` InvitedBy sql.NullString `db:"invitedby"` Attendance int `db:"attendance"` GroupNickName sql.NullString `db:"groupnickname"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
func (*ChatGroupMember) Fields ¶
func (gm *ChatGroupMember) Fields() []dbx.Field
func (*ChatGroupMember) SetGroupNickName ¶
func (chatGroupMember *ChatGroupMember) SetGroupNickName(groupnickname string)
func (*ChatGroupMember) SetInvitedBy ¶
func (chatGroupMember *ChatGroupMember) SetInvitedBy(invitedby string)
type ChatGroupMemberExpand ¶
type ChatGroupMemberExpand struct { GroupName string `db:"groupname"` ChatGroupMember ChatUser }
func (*ChatGroupMemberExpand) CriteriaAlias ¶
func (gm *ChatGroupMemberExpand) CriteriaAlias(fieldname string) (dbx.Field, error)
func (*ChatGroupMemberExpand) Fields ¶
func (gm *ChatGroupMemberExpand) Fields() []dbx.Field
func (*ChatGroupMemberExpand) SelectFrom ¶
func (gm *ChatGroupMemberExpand) SelectFrom() string
type ChatMessageHeader ¶
type ChatUser ¶
type ChatUser struct { ChatUserId string `db:"chatuserid"` UserName string `db:"username"` Type string `db:"type"` Alias sql.NullString `db:"alias"` NickName string `db:"nickname"` Avatar sql.NullString `db:"avatar"` Sex int `db:"sex"` Country sql.NullString `db:"country"` Province sql.NullString `db:"province"` City sql.NullString `db:"city"` Signature sql.NullString `db:"signature"` Remark sql.NullString `db:"remark"` Label sql.NullString `db:"label"` Isgh int `db:"isgh"` Ext sql.NullString `db:"ext" search:"-"` LastMsgId sql.NullString `db:"lastmsgid"` LastSendAt mysql.NullTime `db:"lastsendat"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
func (*ChatUser) CriteriaAlias ¶
func (*ChatUser) SelectFrom ¶
func (*ChatUser) SetCountry ¶
func (*ChatUser) SetLastMsgId ¶
func (*ChatUser) SetLastSendAt ¶
func (*ChatUser) SetProvince ¶
func (*ChatUser) SetSignature ¶
type ChatUserCriteria ¶
type ChatUserCriteria struct { UserName sql.NullString NickName sql.NullString Type sql.NullString BotId sql.NullString }
type ErrorHandler ¶
type ErrorHandler struct {
dbx.ErrorHandler
}
func (*ErrorHandler) AccountValidate ¶
func (*ErrorHandler) AccountValidateSecret ¶
func (*ErrorHandler) ActionCount ¶
func (o *ErrorHandler) ActionCount(pool *redis.Pool, ar *ActionRequest) (int, int, int)
func (*ErrorHandler) ActionCountDaily ¶
func (o *ErrorHandler) ActionCountDaily(conn redis.Conn, ar *ActionRequest) int
func (*ErrorHandler) ActionCountHourly ¶
func (o *ErrorHandler) ActionCountHourly(conn redis.Conn, ar *ActionRequest) int
func (*ErrorHandler) ActionCountMinutely ¶
func (o *ErrorHandler) ActionCountMinutely(conn redis.Conn, ar *ActionRequest) int
func (*ErrorHandler) ActionIsHealthy ¶
func (o *ErrorHandler) ActionIsHealthy(conn redis.Conn, ar *ActionRequest) bool
func (*ErrorHandler) ActionRequestCountByTime ¶
func (*ErrorHandler) AddBotFailingAction ¶
func (o *ErrorHandler) AddBotFailingAction(conn redis.Conn, fb *FailingBot, actionType string)
func (*ErrorHandler) AddFailingBot ¶
func (o *ErrorHandler) AddFailingBot(conn redis.Conn, fb *FailingBot)
func (*ErrorHandler) BotMigrate ¶
func (*ErrorHandler) ChatMessageHeaderFromMessage ¶
func (o *ErrorHandler) ChatMessageHeaderFromMessage(msg string) ChatMessageHeader
func (*ErrorHandler) CheckBotOwner ¶
func (o *ErrorHandler) CheckBotOwner(q dbx.Queryable, login string, accountName string)
func (*ErrorHandler) CheckBotOwnerById ¶
func (o *ErrorHandler) CheckBotOwnerById(q dbx.Queryable, botId string, accountName string)
func (*ErrorHandler) CheckFilterOwner ¶
func (o *ErrorHandler) CheckFilterOwner(q dbx.Queryable, filterId string, accountName string)
func (*ErrorHandler) CheckFilterTemplateOwner ¶
func (*ErrorHandler) CheckFilterTemplateSuiteOwner ¶
func (*ErrorHandler) CheckOwnerOfChatgroups ¶
func (*ErrorHandler) CheckOwnerOfChatusers ¶
func (*ErrorHandler) ContainsWechatMessageWithMsgId ¶
func (*ErrorHandler) CreateChatRoom ¶
func (*ErrorHandler) DeleteChatContact ¶
func (o *ErrorHandler) DeleteChatContact(q dbx.Queryable, botId string, username string)
func (*ErrorHandler) DeleteFilter ¶
func (o *ErrorHandler) DeleteFilter(q dbx.Queryable, filterId string)
func (*ErrorHandler) DeleteFilterTemplate ¶
func (o *ErrorHandler) DeleteFilterTemplate(q dbx.Queryable, templateId string)
func (*ErrorHandler) EnsureChatRoomIndexes ¶
func (o *ErrorHandler) EnsureChatRoomIndexes(db *mgo.Database)
func (*ErrorHandler) EnsureMessageIndexes ¶
func (o *ErrorHandler) EnsureMessageIndexes(db *mgo.Database)
func (*ErrorHandler) EnsuredMongoIndexes ¶
func (o *ErrorHandler) EnsuredMongoIndexes(db *mgo.Database)
func (*ErrorHandler) FailingActionCount ¶
func (*ErrorHandler) FillWechatMessageContact ¶
func (o *ErrorHandler) FillWechatMessageContact(wrapper *rpc.GRPCWrapper, message *WechatMessage, bot *Bot) error
func (*ErrorHandler) FillWechatMessagesContact ¶
func (o *ErrorHandler) FillWechatMessagesContact(wrapper *rpc.GRPCWrapper, messages []*WechatMessage, bot *Bot) error
func (*ErrorHandler) FillWechatMessagesImageSignedURL ¶
func (o *ErrorHandler) FillWechatMessagesImageSignedURL(ossBucket *oss.Bucket, messages []*WechatMessage)
func (*ErrorHandler) FindOrCreateChatGroups ¶
func (o *ErrorHandler) FindOrCreateChatGroups(q dbx.Queryable, chatgroups []*ChatGroup) []ChatGroup
func (*ErrorHandler) FindOrCreateChatUser ¶
func (*ErrorHandler) FindOrCreateChatUsers ¶
func (o *ErrorHandler) FindOrCreateChatUsers(q dbx.Queryable, chatusers []*ChatUser) []ChatUser
func (*ErrorHandler) FriendRequestToJson ¶
func (o *ErrorHandler) FriendRequestToJson(fr *FriendRequest) string
func (*ErrorHandler) GetAccountById ¶
func (o *ErrorHandler) GetAccountById(q dbx.Queryable, aid string) *Account
func (*ErrorHandler) GetAccountByName ¶
func (o *ErrorHandler) GetAccountByName(q dbx.Queryable, name string) *Account
func (*ErrorHandler) GetAccounts ¶
func (o *ErrorHandler) GetAccounts(q dbx.Queryable) []Account
func (*ErrorHandler) GetActionRequest ¶
func (o *ErrorHandler) GetActionRequest(pool *redis.Pool, arid string) *ActionRequest
func (*ErrorHandler) GetActionRequest_ ¶
func (o *ErrorHandler) GetActionRequest_(conn redis.Conn, arid string) *ActionRequest
func (*ErrorHandler) GetBotById ¶
func (o *ErrorHandler) GetBotById(q dbx.Queryable, botid string) *Bot
func (*ErrorHandler) GetBotByIdNull ¶
func (o *ErrorHandler) GetBotByIdNull(q dbx.Queryable, botid string) *Bot
func (*ErrorHandler) GetBotByLogin ¶
func (*ErrorHandler) GetBotExpandById ¶
func (o *ErrorHandler) GetBotExpandById(q dbx.Queryable, botid string) *BotExpand
func (*ErrorHandler) GetBotFailingActions ¶
func (o *ErrorHandler) GetBotFailingActions(conn redis.Conn) []interface{}
func (*ErrorHandler) GetBotsByAccountName ¶
func (o *ErrorHandler) GetBotsByAccountName(q dbx.Queryable, accountname string) []BotExpand
func (*ErrorHandler) GetChatGroupById ¶
func (o *ErrorHandler) GetChatGroupById(q dbx.Queryable, cgid string) *ChatGroup
func (*ErrorHandler) GetChatGroupByName ¶
func (*ErrorHandler) GetChatGroupByNames ¶
func (*ErrorHandler) GetChatGroupCount ¶
func (o *ErrorHandler) GetChatGroupCount(q dbx.Queryable, criteria ChatGroupCriteria) int64
func (*ErrorHandler) GetChatGroupCountWithBotId ¶
func (o *ErrorHandler) GetChatGroupCountWithBotId(q dbx.Queryable, criteria ChatGroupCriteria) int64
func (*ErrorHandler) GetChatGroupMemberByGroup ¶
func (o *ErrorHandler) GetChatGroupMemberByGroup(q dbx.Queryable, groupname string) []ChatGroupMember
func (*ErrorHandler) GetChatGroupMemberById ¶
func (o *ErrorHandler) GetChatGroupMemberById(q dbx.Queryable, gmid string) *ChatGroupMember
func (*ErrorHandler) GetChatGroups ¶
func (o *ErrorHandler) GetChatGroups(q dbx.Queryable, accountId string, criteria ChatGroupCriteria, paging utils.Paging) []ChatGroupExtend
func (*ErrorHandler) GetChatGroupsWithBotId ¶
func (o *ErrorHandler) GetChatGroupsWithBotId(q dbx.Queryable, criteria ChatGroupCriteria, paging utils.Paging) []ChatGroupExtend
func (*ErrorHandler) GetChatRoomWithId ¶
func (*ErrorHandler) GetChatRoomWithPeerId ¶
func (*ErrorHandler) GetChatRooms ¶
func (*ErrorHandler) GetChatUnreadMessagesMeta ¶
func (o *ErrorHandler) GetChatUnreadMessagesMeta(db *mgo.Database, userId string, peerId string, fromMessageId string) *UnreadMessageMeta
*
- 单聊:fromUser + toUser
- 群聊: groupId
- 两者互斥
func (*ErrorHandler) GetChatUserById ¶
func (o *ErrorHandler) GetChatUserById(q dbx.Queryable, cuid string) *ChatUser
func (*ErrorHandler) GetChatUserByName ¶
func (*ErrorHandler) GetChatUserCount ¶
func (o *ErrorHandler) GetChatUserCount(q dbx.Queryable, criteria ChatUserCriteria) int64
func (*ErrorHandler) GetChatUserCountWithBotId ¶
func (o *ErrorHandler) GetChatUserCountWithBotId(q dbx.Queryable, criteria ChatUserCriteria) int64
func (*ErrorHandler) GetChatUsers ¶
func (o *ErrorHandler) GetChatUsers(q dbx.Queryable, accountId string, criteria ChatUserCriteria, paging utils.Paging) []ChatUser
func (*ErrorHandler) GetChatUsersByNames ¶
func (*ErrorHandler) GetChatUsersWithBotId ¶
func (o *ErrorHandler) GetChatUsersWithBotId(q dbx.Queryable, criteria ChatUserCriteria, paging utils.Paging) []ChatUser
func (*ErrorHandler) GetDeviceByAccountName ¶
func (o *ErrorHandler) GetDeviceByAccountName(q dbx.Queryable, accountname string) []Device
func (*ErrorHandler) GetFailingBots ¶
func (o *ErrorHandler) GetFailingBots(conn redis.Conn) []interface{}
func (*ErrorHandler) GetFilterByAccountId ¶
func (o *ErrorHandler) GetFilterByAccountId(q dbx.Queryable, accountid string) []Filter
func (*ErrorHandler) GetFilterById ¶
func (o *ErrorHandler) GetFilterById(q dbx.Queryable, filterid string) *Filter
func (*ErrorHandler) GetFilterTemplateById ¶
func (o *ErrorHandler) GetFilterTemplateById(q dbx.Queryable, templateId string) *FilterTemplate
func (*ErrorHandler) GetFilterTemplateSuiteById ¶
func (o *ErrorHandler) GetFilterTemplateSuiteById(q dbx.Queryable, suiteId string) *FilterTemplateSuite
func (*ErrorHandler) GetFilterTemplateSuitesByAccountName ¶
func (o *ErrorHandler) GetFilterTemplateSuitesByAccountName(q dbx.Queryable, accountname string) []FilterTemplateSuite
func (*ErrorHandler) GetFilterTemplatesBySuiteId ¶
func (o *ErrorHandler) GetFilterTemplatesBySuiteId(q dbx.Queryable, suiteId string) []FilterTemplate
func (*ErrorHandler) GetFriendRequestsByLogin ¶
func (o *ErrorHandler) GetFriendRequestsByLogin(q dbx.Queryable, login string, status string) []FriendRequest
func (*ErrorHandler) GetMessagesHistories ¶
func (o *ErrorHandler) GetMessagesHistories(db *mgo.Database, userId string, peerId string, direction string, fromMessageId string) []*WechatMessage
func (*ErrorHandler) GetMomentByBotAndCode ¶
func (*ErrorHandler) GetMomentByCode ¶
func (o *ErrorHandler) GetMomentByCode(q dbx.Queryable, momentCode string) []Moment
func (*ErrorHandler) GetWechatMessageWithMsgId ¶
func (o *ErrorHandler) GetWechatMessageWithMsgId(db *mgo.Database, msgId string) *WechatMessage
func (*ErrorHandler) GetWechatMessages ¶
func (o *ErrorHandler) GetWechatMessages(query *mgo.Query) []*WechatMessage
func (*ErrorHandler) LoadCookiesFromString ¶
func (o *ErrorHandler) LoadCookiesFromString(cookiestrings []string) []*http.Cookie
func (*ErrorHandler) LoadWebTriggerCookies ¶
func (o *ErrorHandler) LoadWebTriggerCookies(pool *redis.Pool, header ChatMessageHeader, domain string) []*http.Cookie
func (*ErrorHandler) MomentCrawlRedisKey ¶
func (o *ErrorHandler) MomentCrawlRedisKey(botId string) string
func (*ErrorHandler) NewAccount ¶
func (ctx *ErrorHandler) NewAccount(name string, pass string) *Account
func (*ErrorHandler) NewActionRequest ¶
func (o *ErrorHandler) NewActionRequest(login string, actiontype string, actionbody string, status string) *ActionRequest
func (*ErrorHandler) NewChatContact ¶
func (ctx *ErrorHandler) NewChatContact(botId string, chatuserid string) *ChatContact
func (*ErrorHandler) NewChatContactGroup ¶
func (ctx *ErrorHandler) NewChatContactGroup(botId string, chatgroupid string) *ChatContactGroup
func (*ErrorHandler) NewChatContactLabel ¶
func (o *ErrorHandler) NewChatContactLabel(botId string, labelId int, label string) *ChatContactLabel
func (*ErrorHandler) NewChatGroup ¶
func (*ErrorHandler) NewChatGroupMember ¶
func (ctx *ErrorHandler) NewChatGroupMember(gid string, uid string, attendance int) *ChatGroupMember
func (*ErrorHandler) NewChatUser ¶
func (ctx *ErrorHandler) NewChatUser(username string, ctype string, nickname string) *ChatUser
func (*ErrorHandler) NewDefaultChatContactExpand ¶
func (o *ErrorHandler) NewDefaultChatContactExpand() dbx.Searchable
func (*ErrorHandler) NewDefaultChatContactGroupExpand ¶
func (o *ErrorHandler) NewDefaultChatContactGroupExpand() dbx.Searchable
func (*ErrorHandler) NewDefaultChatContactLabel ¶
func (o *ErrorHandler) NewDefaultChatContactLabel() dbx.Searchable
func (*ErrorHandler) NewDefaultChatGroup ¶
func (o *ErrorHandler) NewDefaultChatGroup() dbx.Searchable
func (*ErrorHandler) NewDefaultChatGroupMemberExpand ¶
func (o *ErrorHandler) NewDefaultChatGroupMemberExpand() dbx.Searchable
func (*ErrorHandler) NewDefaultChatUser ¶
func (o *ErrorHandler) NewDefaultChatUser() dbx.Searchable
func (*ErrorHandler) NewDefaultFriendRequest ¶
func (o *ErrorHandler) NewDefaultFriendRequest() dbx.Searchable
func (*ErrorHandler) NewDefaultMoment ¶
func (o *ErrorHandler) NewDefaultMoment() dbx.Searchable
func (*ErrorHandler) NewDevice ¶
func (o *ErrorHandler) NewDevice(name string, bottype string, accountId string) *Device
func (*ErrorHandler) NewFailingBot ¶
func (o *ErrorHandler) NewFailingBot(ar *ActionRequest) *FailingBot
func (*ErrorHandler) NewFilterTemplate ¶
func (o *ErrorHandler) NewFilterTemplate(accountId string, name string, ftsuiteId string, index int, fttype string, defaultNext int) *FilterTemplate
func (*ErrorHandler) NewFilterTemplateSuite ¶
func (o *ErrorHandler) NewFilterTemplateSuite(accountId string, name string) *FilterTemplateSuite
func (*ErrorHandler) NewFriendRequest ¶
func (o *ErrorHandler) NewFriendRequest(botId string, login string, requestlogin string, requestbody string, status string) *FriendRequest
func (*ErrorHandler) RecoverAction ¶
func (o *ErrorHandler) RecoverAction(conn redis.Conn, key string, action string)
func (*ErrorHandler) RecoverBotFailingAction ¶
func (o *ErrorHandler) RecoverBotFailingAction(pool *redis.Pool, recoverTime int64)
func (*ErrorHandler) RecoverClient ¶
func (o *ErrorHandler) RecoverClient(conn redis.Conn, key string)
func (*ErrorHandler) RecoverFailingBot ¶
func (o *ErrorHandler) RecoverFailingBot(pool *redis.Pool, recoverTime int64)
func (*ErrorHandler) RedisMatch ¶
func (o *ErrorHandler) RedisMatch(conn redis.Conn, keyPattern string) []string
func (*ErrorHandler) RedisMatchCount ¶
func (o *ErrorHandler) RedisMatchCount(conn redis.Conn, keyPattern string) int
func (*ErrorHandler) RedisMatchCountCond ¶
func (*ErrorHandler) RedisSend ¶
func (o *ErrorHandler) RedisSend(conn redis.Conn, cmd string, args ...interface{})
func (*ErrorHandler) RedisString ¶
func (o *ErrorHandler) RedisString(reply interface{}) string
func (*ErrorHandler) RedisValue ¶
func (o *ErrorHandler) RedisValue(reply interface{}) []interface{}
func (*ErrorHandler) SaveAccount ¶
func (o *ErrorHandler) SaveAccount(q dbx.Queryable, account *Account)
func (*ErrorHandler) SaveActionRequestFailLog ¶
func (o *ErrorHandler) SaveActionRequestFailLog(conn redis.Conn, ar *ActionRequest)
func (*ErrorHandler) SaveActionRequestWLimit ¶
func (o *ErrorHandler) SaveActionRequestWLimit(conn redis.Conn, apilogdb *mgo.Database, ar *ActionRequest, keytimeout, daylimit, hourlimit, minutelimit int)
func (*ErrorHandler) SaveChatContact ¶
func (o *ErrorHandler) SaveChatContact(q dbx.Queryable, chatcontact *ChatContact)
func (*ErrorHandler) SaveChatContactGroup ¶
func (o *ErrorHandler) SaveChatContactGroup(q dbx.Queryable, chatcontactgroup *ChatContactGroup)
func (*ErrorHandler) SaveChatContactLabels ¶
func (o *ErrorHandler) SaveChatContactLabels(q dbx.Queryable, chatcontactlabels []*ChatContactLabel)
func (*ErrorHandler) SaveChatGroup ¶
func (o *ErrorHandler) SaveChatGroup(q dbx.Queryable, chatgroup *ChatGroup)
func (*ErrorHandler) SaveChatGroupMember ¶
func (o *ErrorHandler) SaveChatGroupMember(q dbx.Queryable, chatGroupMember *ChatGroupMember)
func (*ErrorHandler) SaveChatUser ¶
func (o *ErrorHandler) SaveChatUser(q dbx.Queryable, chatuser *ChatUser)
func (*ErrorHandler) SaveContactByAccept ¶
func (o *ErrorHandler) SaveContactByAccept(q dbx.Queryable, clientType string, botId string, fr FriendRequest)
func (*ErrorHandler) SaveDevice ¶
func (o *ErrorHandler) SaveDevice(q dbx.Queryable, device *Device)
func (*ErrorHandler) SaveFailingActionRequest ¶
func (o *ErrorHandler) SaveFailingActionRequest(conn redis.Conn, ar *ActionRequest, actionCheck, botCheck HealthCheckConfig)
func (*ErrorHandler) SaveFilter ¶
func (o *ErrorHandler) SaveFilter(q dbx.Queryable, filter *Filter)
func (*ErrorHandler) SaveFilterTemplate ¶
func (o *ErrorHandler) SaveFilterTemplate(q dbx.Queryable, filtertemp *FilterTemplate)
func (*ErrorHandler) SaveFilterTemplateSuite ¶
func (o *ErrorHandler) SaveFilterTemplateSuite(q dbx.Queryable, ftsuite *FilterTemplateSuite)
func (*ErrorHandler) SaveFriendRequest ¶
func (o *ErrorHandler) SaveFriendRequest(q dbx.Queryable, fr *FriendRequest)
func (*ErrorHandler) SaveIgnoreChatContact ¶
func (o *ErrorHandler) SaveIgnoreChatContact(q dbx.Queryable, chatcontact *ChatContact)
func (*ErrorHandler) SaveIgnoreChatContactGroup ¶
func (o *ErrorHandler) SaveIgnoreChatContactGroup(q dbx.Queryable, chatcontactgroup *ChatContactGroup)
func (*ErrorHandler) SaveIgnoreChatContactGroups ¶
func (o *ErrorHandler) SaveIgnoreChatContactGroups(q dbx.Queryable, chatcontactgroups []*ChatContactGroup)
func (*ErrorHandler) SaveIgnoreChatContacts ¶
func (o *ErrorHandler) SaveIgnoreChatContacts(q dbx.Queryable, chatcontacts []*ChatContact)
func (*ErrorHandler) SaveIgnoreGroupMember ¶
func (o *ErrorHandler) SaveIgnoreGroupMember(q dbx.Queryable, chatGroupMember *ChatGroupMember)
func (*ErrorHandler) SaveMoment ¶
func (o *ErrorHandler) SaveMoment(q dbx.Queryable, moment *Moment)
func (*ErrorHandler) SaveMomentCrawlTail ¶
func (o *ErrorHandler) SaveMomentCrawlTail(pool *redis.Pool, botId string, momentCode string)
func (*ErrorHandler) SaveWebTriggerCookies ¶
func (o *ErrorHandler) SaveWebTriggerCookies( pool *redis.Pool, header ChatMessageHeader, domain string, cookies []*http.Cookie)
func (*ErrorHandler) SelectByCriteria ¶
func (*ErrorHandler) SpopMomentCrawlTail ¶
func (o *ErrorHandler) SpopMomentCrawlTail(pool *redis.Pool, botId string) string
func (*ErrorHandler) SyncChatContact ¶
func (o *ErrorHandler) SyncChatContact(q dbx.Queryable, botIds []string, lastId string, pagesize int64) []ChatContact
func (*ErrorHandler) UpdateActionRequest ¶
func (o *ErrorHandler) UpdateActionRequest(pool *redis.Pool, apilogdb *mgo.Database, ar *ActionRequest)
func (*ErrorHandler) UpdateActionRequest_ ¶
func (o *ErrorHandler) UpdateActionRequest_(conn redis.Conn, apilogdb *mgo.Database, ar *ActionRequest)
func (*ErrorHandler) UpdateApiLog ¶
func (o *ErrorHandler) UpdateApiLog(db *mgo.Database, ar *ActionRequest)
func (*ErrorHandler) UpdateBotFilterId ¶
func (o *ErrorHandler) UpdateBotFilterId(q dbx.Queryable, bot *Bot)
func (*ErrorHandler) UpdateBotLogin ¶
func (o *ErrorHandler) UpdateBotLogin(q dbx.Queryable, bot *Bot)
func (*ErrorHandler) UpdateBotMomentFilterId ¶
func (o *ErrorHandler) UpdateBotMomentFilterId(q dbx.Queryable, bot *Bot)
func (*ErrorHandler) UpdateChatGroup ¶
func (o *ErrorHandler) UpdateChatGroup(q dbx.Queryable, chatgroup *ChatGroup)
func (*ErrorHandler) UpdateChatRoomLastReadMsgId ¶
func (*ErrorHandler) UpdateChatUser ¶
func (o *ErrorHandler) UpdateChatUser(q dbx.Queryable, chatuser *ChatUser)
func (*ErrorHandler) UpdateFilter ¶
func (o *ErrorHandler) UpdateFilter(q dbx.Queryable, filter *Filter)
func (*ErrorHandler) UpdateFilterTemplate ¶
func (o *ErrorHandler) UpdateFilterTemplate(q dbx.Queryable, template *FilterTemplate)
func (*ErrorHandler) UpdateFilterTemplateSuite ¶
func (o *ErrorHandler) UpdateFilterTemplateSuite(q dbx.Queryable, suite *FilterTemplateSuite)
func (*ErrorHandler) UpdateFriendRequest ¶
func (o *ErrorHandler) UpdateFriendRequest(q dbx.Queryable, fr *FriendRequest)
func (*ErrorHandler) UpdateOrCreateChatGroup ¶
func (o *ErrorHandler) UpdateOrCreateChatGroup(q dbx.Queryable, chatgroup *ChatGroup)
func (*ErrorHandler) UpdateOrCreateChatGroups ¶
func (o *ErrorHandler) UpdateOrCreateChatGroups(q dbx.Queryable, chatgroups []*ChatGroup)
func (*ErrorHandler) UpdateOrCreateChatRoom ¶
func (o *ErrorHandler) UpdateOrCreateChatRoom(db *mgo.Database, botId string, peerId string)
func (*ErrorHandler) UpdateOrCreateChatUser ¶
func (o *ErrorHandler) UpdateOrCreateChatUser(q dbx.Queryable, chatuser *ChatUser)
func (*ErrorHandler) UpdateOrCreateChatUsers ¶
func (o *ErrorHandler) UpdateOrCreateChatUsers(q dbx.Queryable, chatusers []*ChatUser)
func (*ErrorHandler) UpdateOrCreateGroupMembers ¶
func (o *ErrorHandler) UpdateOrCreateGroupMembers(q dbx.Queryable, chatGroupMembers []*ChatGroupMember)
func (*ErrorHandler) UpdateWechatMessages ¶
func (o *ErrorHandler) UpdateWechatMessages(db *mgo.Database, messages []map[string]interface{})
type FailingBot ¶
type Filter ¶
type Filter struct { FilterId string `db:"filterid"` FilterTemplateId string `db:"filtertemplateid"` AccountId string `db:"accountid"` FilterName string `db:"filtername"` FilterType string `db:"filtertype"` Body sql.NullString `db:"body"` Next sql.NullString `db:"next"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
type FilterTemplate ¶
type FilterTemplate struct { FilterTemplateId string `db:"filtertemplateid"` AccountId string `db:"accountid"` FilterTemplateName string `db:"filtertemplatename"` FilterTemplateSuiteId string `db:"filtertemplatesuiteid"` Index int `db:"index"` Type string `db:"type"` DefaultNext int `db:"defaultnext"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
type FilterTemplateSuite ¶
type FilterTemplateSuite struct { FilterTemplateSuiteId string `db:"filtertemplatesuiteid"` AccountId string `db:"accountid"` FilterTemplateSuiteName string `db:"filtertemplatesuitename"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` DeleteAt mysql.NullTime `db:"deleteat"` }
type FriendRequest ¶
type FriendRequest struct { FriendRequestId string `db:"friendrequestid"` BotId string `db:"botid"` Login string `db:"login"` RequestLogin string `db:"requestlogin"` RequestBody string `db:"requestbody"` Status string `db:"status"` CreateAt mysql.NullTime `db:"createat"` UpdateAt mysql.NullTime `db:"updateat"` }
func (*FriendRequest) CriteriaAlias ¶
func (u *FriendRequest) CriteriaAlias(fieldname string) (dbx.Field, error)
func (*FriendRequest) Fields ¶
func (u *FriendRequest) Fields() []dbx.Field
func (FriendRequest) MarshalJSON ¶
func (fr FriendRequest) MarshalJSON() ([]byte, error)
func (*FriendRequest) SelectFrom ¶
func (u *FriendRequest) SelectFrom() string
type HealthCheckConfig ¶
type Moment ¶
type Moment struct { MomentId string `db:"momentid"` BotId string `db:"botid"` MomentCode string `db:"momentcode"` SendAt mysql.NullTime `db:"sendat"` ChatUserId string `db:"chatuserid"` CreateAt mysql.NullTime `db:"createat"` }
func (*Moment) SelectFrom ¶
type UnreadMessageMeta ¶
type UnreadMessageMeta struct { LatestMessage *WechatMessage `json:"latestMessage,omitempty"` Count int `json:"count"` }
type WechatFriendRequest ¶
type WechatFriendRequest struct { FromUserName string `xml:"fromusername,attr" json:"fromUserName"` EncryptUserName string `xml:"encryptusername,attr" json:"encryptUserName"` FromNickName string `xml:"fromnickname,attr" json:"fromNickName"` Content string `xml:"content,attr" json:"content"` Fullpy string `xml:"fullpy,attr" json:"fullpy"` Shortpy string `xml:"shortpy,attr" json:"shortpy"` ImageStatus string `xml:"imagestatus,attr" json:"imageStatus"` Scene string `xml:"scene,attr" json:"scene"` Country string `xml:"country,attr" json:"country"` Province string `xml:"province,attr" json:"province"` City string `xml:"city,attr" json:"city"` Sign string `xml:"sign,attr" json:"sign"` Percard string `xml:"percard,attr" json:"percard"` Sex string `xml:"sex,attr" json:"sex"` Alias string `xml:"alias,attr" json:"alias"` Weibo string `xml:"weibo,attr" json:"weibo"` Albumflag string `xml:"albumflag,attr" json:"albumflag"` Albumstyle string `xml:"albumstyle,attr" json:"albumstyle"` Albumbgimgid string `xml:"albumbgimgid,attr" json:"albumbgimgid"` Snsflag string `xml:"snsflag,attr" json:"snsflag"` Snsbgimgid string `xml:"snsbgimgid,attr" json:"snsbgimgid"` Snsbgobjectid string `xml:"snsbgobjectid,attr" json:"snsbgobjectid"` Mhash string `xml:"mhash,attr" json:"mhash"` Mfullhash string `xml:"mfullhash,attr" json:"mfullhash"` Bigheadimgurl string `xml:"bigheadimgurl,attr" json:"bigheadimgurl"` Smallheadimgurl string `xml:"smallheadimgurl,attr" json:"smallheadimgurl"` Ticket string `xml:"ticket,attr" json:"ticket"` Opcode string `xml:"opcode,attr" json:"opcode"` Googlecontact string `xml:"googlecontact,attr" json:"googlecontact"` Qrticket string `xml:"qrticket,attr" json:"qrticket"` Chatroomusername string `xml:"chatroomusername,attr" json:"chatroomusername"` Sourceusername string `xml:"sourceusername,attr" json:"sourceusername"` Sourcenickname string `xml:"sourcenickname,attr" json:"sourcenickname"` BrandList BrandList `xml:"brandlist" json:"brandlist"` Raw string `xml:"raw" json:"raw"` }
type WechatMessage ¶
type WechatMessage struct { MsgId string `json:"msgId" bson:"msgId"` MsgType int `json:"msgType" bson:"msgType"` ImageId string `json:"imageId" bson:"imageId"` ThumbnailId string `json:"thumbnailId" bson:"thumbnailId"` Content interface{} `json:"content" bson:"content"` GroupId string `json:"groupId" bson:"groupId"` Description string `json:"description" bson:"description"` FromUser string `json:"fromUser" bson:"fromUser"` MType int `json:"mType" bson:"mType"` SubType int `json:"subType" bson:"subType"` Status int `json:"status" bson:"status"` Continue int `json:"continue" bson:"continue"` Timestamp uint64 `json:"timestamp" bson:"timestamp"` ToUser string `json:"toUser" bson:"toUser"` Uin uint64 `json:"uin" bson:"uin"` MsgSource interface{} `json:"msgSource" bson:"msgSource"` UpdatedAt time.Time `json:"updateAt" bson:"updatedAt"` FromUserContact *WechatMessageContact `json:"fromUserContact,omitempty" bson:"-"` SignedUrl string `json:"signedUrl,omitempty" bson:"-"` SignedThumbnail string `json:"signedThumbnail,omitempty" bson:"-"` }
type WechatMessageContact ¶
Source Files ¶
- accounts.go
- actionrequests.go
- bots.go
- chatcontactgroups.go
- chatcontactlabels.go
- chatcontacts.go
- chatgroupmembers.go
- chatgroups.go
- chatroom.go
- chatusers.go
- devices.go
- failingbots.go
- filters.go
- filtertemplates.go
- filtertemplatesuites.go
- friendrequests.go
- message.go
- moments.go
- mongo.go
- searchcriteria.go
- webtriggercookies.go
Click to show internal directories.
Click to hide internal directories.