domains

package
v0.0.0-...-d22cea1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

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"`
}

func (*Account) SetAvatar

func (account *Account) SetAvatar(avatar string)

func (*Account) SetEmail

func (account *Account) SetEmail(email string)

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 BrandList

type BrandList struct {
	Count int    `xml:"count,attr" json:"count"`
	Ver   string `xml:"ver,attr" json:"ver"`
}

type ChatContact

type ChatContact struct {
	ChatContactId string         `db:"chatcontactid"`
	BotId         string         `db:"botid"`
	ChatUserId    string         `db:"chatuserid"`
	CreateAt      mysql.NullTime `db:"createat"`
	UpdateAt      mysql.NullTime `db:"updateat"`
	DeleteAt      mysql.NullTime `db:"deleteat"`
}

type ChatContactExpand

type ChatContactExpand struct {
	BotId string `db:"botid"`
	ChatUser
}

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 ChatContactGroup struct {
	ChatContactGroupId string         `db:"chatcontactgroupid"`
	BotId              string         `db:"botid"`
	ChatGroupId        string         `db:"chatgroupid"`
	CreateAt           mysql.NullTime `db:"createat"`
	UpdateAt           mysql.NullTime `db:"updateat"`
	DeleteAt           mysql.NullTime `db:"deleteat"`
}

type ChatContactGroupExpand

type ChatContactGroupExpand struct {
	BotId string `db:"botid"`
	ChatGroup
}

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 (cc *ChatGroup) CriteriaAlias(fieldname string) (dbx.Field, error)

func (*ChatGroup) Fields

func (g *ChatGroup) Fields() []dbx.Field

func (*ChatGroup) SelectFrom

func (g *ChatGroup) SelectFrom() string

func (*ChatGroup) SetAlias

func (chatgroup *ChatGroup) SetAlias(alias string)

func (*ChatGroup) SetAvatar

func (chatgroup *ChatGroup) SetAvatar(avatar string)

func (*ChatGroup) SetExt

func (chatgroup *ChatGroup) SetExt(ext string)

func (*ChatGroup) SetLastMsgId

func (chatgroup *ChatGroup) SetLastMsgId(msgId string)

func (*ChatGroup) SetLastSendAt

func (chatgroup *ChatGroup) SetLastSendAt(sendAt time.Time)

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 ChatMessageHeader struct {
	FromUser string `json:"fromUser"`
	ToUser   string `json:"toUser"`
	GroupId  string `json:"groupId"`
}

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 (u *ChatUser) CriteriaAlias(fieldname string) (dbx.Field, error)

func (*ChatUser) Fields

func (u *ChatUser) Fields() []dbx.Field

func (*ChatUser) SelectFrom

func (u *ChatUser) SelectFrom() string

func (*ChatUser) SetAlias

func (chatuser *ChatUser) SetAlias(alias string)

func (*ChatUser) SetAvatar

func (chatuser *ChatUser) SetAvatar(avatar string)

func (*ChatUser) SetCity

func (chatuser *ChatUser) SetCity(city string)

func (*ChatUser) SetCountry

func (chatuser *ChatUser) SetCountry(country string)

func (*ChatUser) SetExt

func (chatuser *ChatUser) SetExt(ext string)

func (*ChatUser) SetLabel

func (chatuser *ChatUser) SetLabel(label string)

func (*ChatUser) SetLastMsgId

func (chatuser *ChatUser) SetLastMsgId(msgId string)

func (*ChatUser) SetLastSendAt

func (chatuser *ChatUser) SetLastSendAt(sendAt time.Time)

func (*ChatUser) SetProvince

func (chatuser *ChatUser) SetProvince(province string)

func (*ChatUser) SetRemark

func (chatuser *ChatUser) SetRemark(remark string)

func (*ChatUser) SetSignature

func (chatuser *ChatUser) SetSignature(signature string)

type ChatUserCriteria

type ChatUserCriteria struct {
	UserName sql.NullString
	NickName sql.NullString
	Type     sql.NullString
	BotId    sql.NullString
}

type Device

type Device struct {
	DeviceId    string         `db:"deviceid"`
	DeviceName  string         `db:"devicename"`
	AccountId   string         `db:"accountid"`
	ChatbotType string         `db:"chatbottype"`
	CreateAt    mysql.NullTime `db:"createat"`
	UpdateAt    mysql.NullTime `db:"updateat"`
	DeleteAt    mysql.NullTime `db:"deleteat"`
}

type ErrorHandler

type ErrorHandler struct {
	dbx.ErrorHandler
}

func (*ErrorHandler) AccountValidate

func (o *ErrorHandler) AccountValidate(q dbx.Queryable, name string, pass string) bool

func (*ErrorHandler) AccountValidateSecret

func (o *ErrorHandler) AccountValidateSecret(q dbx.Queryable, name string, secret string) bool

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 (o *ErrorHandler) ActionRequestCountByTime(conn redis.Conn, keyPattern string, checkTimeout int64) int

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 (o *ErrorHandler) BotMigrate(q dbx.Queryable, botId string, login string) string

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 (o *ErrorHandler) CheckFilterTemplateOwner(q dbx.Queryable, filterTemplateId string, accountName string) bool

func (*ErrorHandler) CheckFilterTemplateSuiteOwner

func (o *ErrorHandler) CheckFilterTemplateSuiteOwner(q dbx.Queryable, suiteId string, accountName string) bool

func (*ErrorHandler) CheckOwnerOfChatgroups

func (o *ErrorHandler) CheckOwnerOfChatgroups(q dbx.Queryable, accountName string, ids []string) []string

func (*ErrorHandler) CheckOwnerOfChatusers

func (o *ErrorHandler) CheckOwnerOfChatusers(q dbx.Queryable, accountName string, ids []string) []string

func (*ErrorHandler) ContainsWechatMessageWithMsgId

func (o *ErrorHandler) ContainsWechatMessageWithMsgId(db *mgo.Database, msgId string) (bool, error)

func (*ErrorHandler) CreateChatRoom

func (o *ErrorHandler) CreateChatRoom(db *mgo.Database, botId string, peerId string) *pb.ChatRoom

func (*ErrorHandler) DeleteBot

func (o *ErrorHandler) DeleteBot(q dbx.Queryable, botId string)

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 (o *ErrorHandler) FailingActionCount(conn redis.Conn, keyPattern string, checkTimeout int64) int

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 (o *ErrorHandler) FindOrCreateChatUser(q dbx.Queryable, ctype string, chatusername string) *ChatUser

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 (o *ErrorHandler) GetBotByLogin(q dbx.Queryable, login string, accountId string) *Bot

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 (o *ErrorHandler) GetChatGroupByName(q dbx.Queryable, ctype string, groupname string) *ChatGroup

func (*ErrorHandler) GetChatGroupByNames

func (o *ErrorHandler) GetChatGroupByNames(q dbx.Queryable, ctype string, groupnames []string) []ChatGroup

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 (o *ErrorHandler) GetChatRoomWithId(db *mgo.Database, roomId string) *pb.ChatRoom

func (*ErrorHandler) GetChatRoomWithPeerId

func (o *ErrorHandler) GetChatRoomWithPeerId(db *mgo.Database, botId string, peerId string) *pb.ChatRoom

func (*ErrorHandler) GetChatRooms

func (o *ErrorHandler) GetChatRooms(db *mgo.Database, botIds []string, chatType string, fromRoomId string, limit int32) []*pb.ChatRoom

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 (o *ErrorHandler) GetChatUserByName(q dbx.Queryable, ctype string, username string) *ChatUser

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 (o *ErrorHandler) GetChatUsersByNames(q dbx.Queryable, ctype string, chatusernames []string) []ChatUser

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 (o *ErrorHandler) GetMomentByBotAndCode(q dbx.Queryable, botId string, momentCode string) *Moment

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) NewBot

func (o *ErrorHandler) NewBot(name string, bottype string, accountId string, login string) *Bot

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 (ctx *ErrorHandler) NewChatGroup(groupname string, ctype string, nickname string, owner string, membercount int, maxmembercount int) *ChatGroup

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) NewFilter

func (o *ErrorHandler) NewFilter(
	name string, filterType string, templateId string, accountId string) *Filter

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) NewMoment

func (o *ErrorHandler) NewMoment(
	botId string, momentCode string, sendAt int, chatUserId string) *Moment

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) RedisDo

func (o *ErrorHandler) RedisDo(conn redis.Conn, timeout time.Duration,
	cmd string, args ...interface{}) interface{}

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 (o *ErrorHandler) RedisMatchCountCond(conn redis.Conn, keyPattern string, cmp func(redis.Conn, string) bool) int

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) SaveBot

func (o *ErrorHandler) SaveBot(q dbx.Queryable, bot *Bot)

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 (o *ErrorHandler) SelectByCriteria(
	q dbx.Queryable, accountId string, query string, domain string) ([]interface{}, utils.Paging)

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) UpdateBot

func (o *ErrorHandler) UpdateBot(q dbx.Queryable, bot *Bot)

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 (o *ErrorHandler) UpdateChatRoomLastReadMsgId(db *mgo.Database, botId string, peerId string, msgId string)

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 FailingBot struct {
	ClientType string         `json:"clientType"`
	ClientId   string         `json:"clientId"`
	Login      string         `json:"login"`
	FailAt     utils.JSONTime `json:"-"`
}

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 HealthCheckConfig struct {
	FailingCount int     `yaml:"failingCount"`
	FailingRate  float64 `yaml:"failingRate"`
	CheckTime    int64   `yaml:"checkTime"`
	RecoverTime  int64   `yaml:"recoverTime"`
}

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) CriteriaAlias

func (m *Moment) CriteriaAlias(fieldname string) (dbx.Field, error)

func (*Moment) Fields

func (m *Moment) Fields() []dbx.Field

func (*Moment) SelectFrom

func (m *Moment) SelectFrom() string

type MsgSource

type MsgSource struct {
	Silence     uint64 `json:"silence" bson:"silence"`
	AtUserList  string `json:"atUserList" bson:"atUserList"`
	MemberCount uint64 `json:"memberCount" bson:"memberCount"`
}

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

type WechatMessageContact struct {
	NickName string `json:"nickName"`
	Avatar   string `json:"avatar"`
	WxId     string `json:"wxId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL