chatbothub

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: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddContact               string = "AddContact"
	DeleteContact            string = "DeleteContact"
	AcceptUser               string = "AcceptUser"
	SendTextMessage          string = "SendTextMessage"
	SendAppMessage           string = "SendAppMessage"
	SendImageMessage         string = "SendImageMessage"
	SendImageResourceMessage string = "SendImageResourceMessage"
	CreateRoom               string = "CreateRoom"
	AddRoomMember            string = "AddRoomMember"
	InviteRoomMember         string = "InviteRoomMember"
	GetRoomMembers           string = "GetRoomMembers"
	DeleteRoomMember         string = "DeleteRoomMember"
	SetRoomAnnouncement      string = "SetRoomAnnouncement"
	SetRoomName              string = "SetRoomName"
	GetRoomQRCode            string = "GetRoomQRCode"
	GetContactQRCode         string = "GetContactQRCode"
	GetContact               string = "GetContact"
	CheckContact             string = "CheckContact"
	SearchContact            string = "SearchContact"
	SyncContact              string = "SyncContact"
	SnsTimeline              string = "SnsTimeline"
	SnsUserPage              string = "SnsUserPage"
	SnsGetObject             string = "SnsGetObject"
	SnsComment               string = "SnsComment"
	SnsLike                  string = "SnsLike"
	SnsUpload                string = "SnsUpload"
	SnsobjectOP              string = "SnsobjectOP"
	SnsSendMoment            string = "SnsSendMoment"
	GetLabelList             string = "GetLabelList"
	AddLabel                 string = "AddLabel"
	DeleteLabel              string = "DeleteLabel"
	SetLabel                 string = "SetLabel"
	GetRequestToken          string = "GetRequestToken"
	RequestUrl               string = "RequestUrl"
)
View Source
const (
	WECHATBOT    string = "WECHATBOT"
	WECHATMACPRO string = "WECHATMACPRO"
	QQBOT        string = "QQBOT"
)
View Source
const (
	PING                 string = "PING"
	PONG                 string = "PONG"
	REGISTER             string = "REGISTER"
	LOGIN                string = "LOGIN"
	LOGOUT               string = "LOGOUT"
	SHUTDOWN             string = "SHUTDOWN"
	LOGINSCAN            string = "LOGINSCAN"
	LOGINDONE            string = "LOGINDONE"
	LOGINFAILED          string = "LOGINFAILED"
	LOGOUTDONE           string = "LOGOUTDONE"
	BOTMIGRATE           string = "BOTMIGRATE"
	UPDATETOKEN          string = "UPDATETOKEN"
	MESSAGE              string = "MESSAGE"
	IMAGEMESSAGE         string = "IMAGEMESSAGE"
	EMOJIMESSAGE         string = "EMOJIMESSAGE"
	STATUSMESSAGE        string = "STATUSMESSAGE"
	FRIENDREQUEST        string = "FRIENDREQUEST"
	CONTACTINFO          string = "CONTACTINFO"
	GROUPINFO            string = "GROUPINFO"
	CONTACTSYNCDONE      string = "CONTACTSYNCDONE"
	BOTACTION            string = "BOTACTION"
	ACTIONREPLY          string = "ACTIONREPLY"
	WEBSHORTCALL         string = "WEBSHORTCALL"
	WEBSHORTCALLRESPONSE string = "WEBSHORTCALLRESPONSE"
	ROOMJOIN             string = "ROOMJOIN"
	USERACCEPTED         string = "USERACCEPTED"
)
View Source
const (
	WECHATBASEFILTER   string = "WechatBaseFilter"
	WECHATMOMENTFILTER string = "WechatMomentFilter"
	PLAINFILTER        string = "PlainFilter"
	FLUENTFILTER       string = "FluentFilter"
	REGEXROUTER        string = "RegexRouter"
	KVROUTER           string = "KVRouter"
	WEBTRIGGER         string = "WebTrigger"
)
View Source
const (
	Subscribe   StreamingActionType = 1
	UnSubscribe StreamingActionType = 2

	Message StreamingResourceType = 1
	Moment  StreamingResourceType = 2
)
View Source
const WeAppXmlTemp string = `` /* 1221-byte string literal not displayed */
View Source
const WeEmojiXmlTemp string = `` /* 423-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewBotsInfo

func NewBotsInfo(bot *ChatBot) *pb.BotsInfo

Types

type ActionParam

type ActionParam struct {
	Name         string
	FromName     string
	HasDefault   bool
	DefaultValue interface{}
	Type         string
}

func NewActionParam

func NewActionParam(name string, hasdefault bool, defaultvalue string) ActionParam

func NewActionParamCName

func NewActionParamCName(name string, fromName string, hasdefault bool, defaultvalue string) ActionParam

func NewActionParamFloat

func NewActionParamFloat(name string, hasdefault bool, defaultvalue float64) ActionParam

type BaseFilter

type BaseFilter struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

func NewBaseFilter

func NewBaseFilter(filterId string, filterName string, filterType string) BaseFilter

func (*BaseFilter) String

func (f *BaseFilter) String() string

type BranchTag

type BranchTag struct {
	Key   string
	Value string
}

type ChatBot

type ChatBot struct {
	ClientId   string        `json:"clientId"`
	ClientType string        `json:"clientType"`
	Name       string        `json:"name"`
	StartAt    int64         `json:"startAt"`
	LastPing   int64         `json:"lastPing"`
	Login      string        `json:"login"`
	NotifyUrl  string        `json:"notifyurl"`
	LoginInfo  LoginInfo     `json:"loginInfo"`
	Status     ChatBotStatus `json:"status"`
	BotId      string        `json:"botId"`
	ScanUrl    string        `json:"scanUrl"`
	// contains filtered or unexported fields
}

func NewChatBot

func NewChatBot() *ChatBot

func (*ChatBot) AcceptUser

func (bot *ChatBot) AcceptUser(actionType string, arId string, body string) error

func (*ChatBot) AddContact

func (bot *ChatBot) AddContact(actionType string, arId string, body string) error

func (*ChatBot) AddLabel

func (bot *ChatBot) AddLabel(actionType string, arId string, body string) error

func (*ChatBot) AddRoomMember

func (bot *ChatBot) AddRoomMember(actionType string, arId string, body string) error

func (*ChatBot) BotAction

func (bot *ChatBot) BotAction(arId string, actionType string, body string) error

func (*ChatBot) CheckContact

func (bot *ChatBot) CheckContact(actionType string, arId string, body string) error

func (*ChatBot) CreateRoom

func (bot *ChatBot) CreateRoom(actionType string, arId string, body string) error

func (*ChatBot) DeleteContact

func (bot *ChatBot) DeleteContact(actionType string, arId string, body string) error

func (*ChatBot) DeleteLabel

func (bot *ChatBot) DeleteLabel(actionType string, arId string, body string) error

func (*ChatBot) DeleteRoomMember

func (bot *ChatBot) DeleteRoomMember(actionType string, arId string, body string) error

func (*ChatBot) Error

func (bot *ChatBot) Error(err error, msg string, v ...interface{})

func (*ChatBot) GetContact

func (bot *ChatBot) GetContact(actionType string, arId string, body string) error

func (*ChatBot) GetContactQRCode

func (bot *ChatBot) GetContactQRCode(actionType string, arId string, body string) error

func (*ChatBot) GetLabelList

func (bot *ChatBot) GetLabelList(actionType string, arId string, body string) error

func (*ChatBot) GetRequestToken

func (bot *ChatBot) GetRequestToken(actionType string, arId string, body string) error

func (*ChatBot) GetRoomMembers

func (bot *ChatBot) GetRoomMembers(actionType string, arId string, body string) error

func (*ChatBot) GetRoomQRCode

func (bot *ChatBot) GetRoomQRCode(actionType string, arId string, body string) error

func (*ChatBot) Info

func (bot *ChatBot) Info(msg string, v ...interface{})

func (*ChatBot) InviteRoomMember

func (bot *ChatBot) InviteRoomMember(actionType string, arId string, body string) error

func (*ChatBot) RequestUrl

func (bot *ChatBot) RequestUrl(actionType string, arId string, body string) error

func (*ChatBot) SearchContact

func (bot *ChatBot) SearchContact(actionType string, arId string, body string) error

func (*ChatBot) SendAppMessage

func (bot *ChatBot) SendAppMessage(actionType string, arId string, body string) error

func (*ChatBot) SendImageMessage

func (bot *ChatBot) SendImageMessage(actionType string, arId string, body string) error

func (*ChatBot) SendImageResourceMessage

func (bot *ChatBot) SendImageResourceMessage(actionType string, arId string, body string) error

func (*ChatBot) SendTextMessage

func (bot *ChatBot) SendTextMessage(actionType string, arId string, body string) error

func (*ChatBot) SetLabel

func (bot *ChatBot) SetLabel(actionType string, arId string, body string) error

func (*ChatBot) SetRoomAnnouncement

func (bot *ChatBot) SetRoomAnnouncement(actionType string, arId string, body string) error

func (*ChatBot) SetRoomName

func (bot *ChatBot) SetRoomName(actionType string, arId string, body string) error

func (*ChatBot) SnsComment

func (bot *ChatBot) SnsComment(actionType string, arId string, body string) error

func (*ChatBot) SnsGetObject

func (bot *ChatBot) SnsGetObject(actionType string, arId string, body string) error

func (*ChatBot) SnsLike

func (bot *ChatBot) SnsLike(actionType string, arId string, body string) error

func (*ChatBot) SnsSendMoment

func (bot *ChatBot) SnsSendMoment(actionType string, arId string, body string) error

func (*ChatBot) SnsTimeline

func (bot *ChatBot) SnsTimeline(actionType string, arId string, body string) error

func (*ChatBot) SnsUpload

func (bot *ChatBot) SnsUpload(actionType string, arId string, body string) error

func (*ChatBot) SnsUserPage

func (bot *ChatBot) SnsUserPage(actionType string, arId string, body string) error

func (*ChatBot) SnsobjectOP

func (bot *ChatBot) SnsobjectOP(actionType string, arId string, body string) error

func (*ChatBot) SyncContact

func (bot *ChatBot) SyncContact(actionType string, arId string, body string) error

func (*ChatBot) WebNotifyRequest

func (bot *ChatBot) WebNotifyRequest(baseurl string, event string, body string) *httpx.RestfulRequest

type ChatBotStatus

type ChatBotStatus int32
const (
	BeginNew            ChatBotStatus = 0
	BeginRegistered     ChatBotStatus = 1
	LoggingPrepared     ChatBotStatus = 100
	LoggingChallenged   ChatBotStatus = 150
	LoggingFailed       ChatBotStatus = 151
	LoggingStaging      ChatBotStatus = 190
	WorkingLoggedIn     ChatBotStatus = 200
	ShuttingdownDone    ChatBotStatus = 404
	FailingDisconnected ChatBotStatus = 500
)

func (ChatBotStatus) String

func (status ChatBotStatus) String() string

type ChatHub

type ChatHub struct {
	Config     ChatHubConfig
	Webhost    string
	Webport    string
	WebBaseUrl string

	WebSecretPhrase string
	// contains filtered or unexported fields
}

func (*ChatHub) BotAction

func (hub *ChatHub) BotAction(ctx context.Context, req *pb.BotActionRequest) (*pb.BotActionReply, error)

func (*ChatHub) BotFilter

func (hub *ChatHub) BotFilter(
	ctx context.Context, req *pb.BotFilterRequest) (*pb.OperationReply, error)

func (*ChatHub) BotLogin

func (hub *ChatHub) BotLogin(ctx context.Context, req *pb.BotLoginRequest) (*pb.BotLoginReply, error)

func (*ChatHub) BotLogout

func (hub *ChatHub) BotLogout(ctx context.Context, req *pb.BotLogoutRequest) (*pb.OperationReply, error)

func (*ChatHub) BotMomentFilter

func (hub *ChatHub) BotMomentFilter(
	ctx context.Context, req *pb.BotFilterRequest) (*pb.OperationReply, error)

func (*ChatHub) BotShutdown

func (hub *ChatHub) BotShutdown(ctx context.Context, req *pb.BotLogoutRequest) (*pb.OperationReply, error)

func (*ChatHub) CreateFilterByType

func (hub *ChatHub) CreateFilterByType(
	filterId string, filterName string, filterType string) (Filter, error)

func (*ChatHub) DropBot

func (hub *ChatHub) DropBot(clientid string)

func (*ChatHub) DropStreamingNode

func (hub *ChatHub) DropStreamingNode(clientid string)

func (*ChatHub) Error

func (ctx *ChatHub) Error(err error, msg string, v ...interface{})

func (*ChatHub) EventTunnel

func (hub *ChatHub) EventTunnel(tunnel pb.ChatBotHub_EventTunnelServer) error

func (*ChatHub) FilterCreate

func (hub *ChatHub) FilterCreate(
	ctx context.Context, req *pb.FilterCreateRequest) (*pb.OperationReply, error)

func (*ChatHub) FilterFill

func (hub *ChatHub) FilterFill(
	ctx context.Context, req *pb.FilterFillRequest) (*pb.FilterFillReply, error)

func (*ChatHub) FilterNext

func (hub *ChatHub) FilterNext(
	ctx context.Context, req *pb.FilterNextRequest) (*pb.OperationReply, error)

func (*ChatHub) GetAvailableBot

func (hub *ChatHub) GetAvailableBot(bottype string) *ChatBot

func (*ChatHub) GetBot

func (hub *ChatHub) GetBot(clientid string) *ChatBot

func (*ChatHub) GetBotById

func (hub *ChatHub) GetBotById(botId string) *ChatBot

func (*ChatHub) GetBotByLogin

func (hub *ChatHub) GetBotByLogin(login string) *ChatBot

func (*ChatHub) GetBots

func (hub *ChatHub) GetBots(ctx context.Context, req *pb.BotsRequest) (*pb.BotsReply, error)

func (*ChatHub) GetFilter

func (hub *ChatHub) GetFilter(filterId string) Filter

func (*ChatHub) GetStreamingNode

func (hub *ChatHub) GetStreamingNode(clientid string) *StreamingNode

func (*ChatHub) Info

func (ctx *ChatHub) Info(msg string, v ...interface{})

func (*ChatHub) RouterBranch

func (hub *ChatHub) RouterBranch(
	ctx context.Context, req *pb.RouterBranchRequest) (*pb.OperationReply, error)

func (*ChatHub) Serve

func (hub *ChatHub) Serve()

func (*ChatHub) SetBot

func (hub *ChatHub) SetBot(clientid string, thebot *ChatBot)

func (*ChatHub) SetFilter

func (hub *ChatHub) SetFilter(filterId string, thefilter Filter)

func (*ChatHub) SetStreamingNode

func (hub *ChatHub) SetStreamingNode(clientid string, snode *StreamingNode)

func (*ChatHub) StreamingCtrl

func (hub *ChatHub) StreamingCtrl(ctx context.Context, req *pb.StreamingCtrlRequest) (*pb.OperationReply, error)

func (*ChatHub) StreamingTunnel

func (hub *ChatHub) StreamingTunnel(tunnel pb.ChatBotHub_StreamingTunnelServer) error

func (*ChatHub) WebShortCallResponse

func (hub *ChatHub) WebShortCallResponse(ctx context.Context, req *pb.EventReply) (*pb.OperationReply, error)

type ChatHubConfig

type ChatHubConfig struct {
	Host   string
	Port   string
	Fluent utils.FluentConfig
	Redis  utils.RedisConfig

	Mongo    utils.MongoConfig
	Oss      utils.OssConfig
	Rabbitmq utils.RabbitMQConfig
}

type ErrorHandler

type ErrorHandler struct {
	domains.ErrorHandler
}

func (*ErrorHandler) CommonActionDispatch

func (o *ErrorHandler) CommonActionDispatch(bot *ChatBot, arId string, body string, actionType string, params []ActionParam)

func (*ErrorHandler) FindFromLines

func (o *ErrorHandler) FindFromLines(lines []string, target string) bool

func (*ErrorHandler) ReplaceWechatMsgSource

func (o *ErrorHandler) ReplaceWechatMsgSource(body map[string]interface{}) map[string]interface{}

func (*ErrorHandler) SendAction

func (o *ErrorHandler) SendAction(bot *ChatBot, arId string, actionType string, body string)

type Filter

type Filter interface {
	Fill(string) error
	Next(Filter) error
}

type FluentFilter

type FluentFilter struct {
	BaseFilter

	NextFilter Filter `json:"next"`
	// contains filtered or unexported fields
}

func NewFluentFilter

func NewFluentFilter(filterId string, filterName string, logger *fluent.Fluent, tag string) *FluentFilter

func (*FluentFilter) Fill

func (f *FluentFilter) Fill(msg string) error

func (*FluentFilter) Next

func (f *FluentFilter) Next(filter Filter) error

func (*FluentFilter) String

func (f *FluentFilter) String() string

type KVRouter

type KVRouter struct {
	BaseFilter
	NextFilter map[string]map[string]Filter `json:"next"`

	DefaultNextFilter Filter `json:"defaultNext"`
	// contains filtered or unexported fields
}

func NewKVRouter

func NewKVRouter(filterId string, filterName string) *KVRouter

func (*KVRouter) Branch

func (f *KVRouter) Branch(tag BranchTag, filter Filter) error

func (*KVRouter) Fill

func (f *KVRouter) Fill(msg string) error

func (*KVRouter) Next

func (f *KVRouter) Next(filter Filter) error

func (*KVRouter) String

func (f *KVRouter) String() string

type LoginBody

type LoginBody struct {
	BotId     string `json:"botId"`
	Login     string `json:"login"`
	Password  string `json:"password"`
	LoginInfo string `json:"loginInfo"`
}

type LoginInfo

type LoginInfo struct {
	WxData          string        `json:"wxData,omitempty"`
	Token           string        `json:"token,omitempty"`
	Alias           string        `json:"alias,omitempty"`
	LongServerList  []interface{} `json:"LongServerList,omitempty"`
	ShortServerList []interface{} `json:"ShortServerList,omitempty"`
}

type PlainFilter

type PlainFilter struct {
	BaseFilter

	NextFilter Filter `json:"next"`
	// contains filtered or unexported fields
}

func NewPlainFilter

func NewPlainFilter(filterId string, filterName string, logger *log.Logger) *PlainFilter

func (*PlainFilter) Fill

func (f *PlainFilter) Fill(msg string) error

func (*PlainFilter) Next

func (f *PlainFilter) Next(filter Filter) error

func (*PlainFilter) String

func (f *PlainFilter) String() string

type RegexRouter

type RegexRouter struct {
	BaseFilter
	NextFilter map[string]Filter `json:"next"`

	DefaultNextFilter Filter `json:"defaultNext"`
	// contains filtered or unexported fields
}

func NewRegexRouter

func NewRegexRouter(filterId string, filterName string) *RegexRouter

func (*RegexRouter) Branch

func (f *RegexRouter) Branch(tag BranchTag, filter Filter) error

func (*RegexRouter) Fill

func (f *RegexRouter) Fill(msg string) error

func (*RegexRouter) Next

func (f *RegexRouter) Next(filter Filter) error

func (*RegexRouter) String

func (f *RegexRouter) String() string

type Router

type Router interface {
	Filter
	Branch(tag BranchTag, filter Filter) error
}

type StreamingActionType

type StreamingActionType int32

type StreamingNode

type StreamingNode struct {
	NodeId   string         `json:"streamingNodeId"`
	NodeType string         `json:"streamingNodeType"`
	StartAt  utils.JSONTime `json:"startAt"`
	LastPing utils.JSONTime `json:"lastPingAt"`

	SubBots map[string]int `json:"subBots"`
	// contains filtered or unexported fields
}

func NewStreamingNode

func NewStreamingNode() *StreamingNode

func (*StreamingNode) SendMsg

func (s *StreamingNode) SendMsg(eventType string, botId string, botClientId string, botClientType string, msgbody string) error

func (*StreamingNode) Sub

func (s *StreamingNode) Sub(botIds []string)

func (*StreamingNode) UnSub

func (s *StreamingNode) UnSub(botIds []string)

type StreamingResourceType

type StreamingResourceType int32

type WebAction

type WebAction struct {
	Url    string `json:"url"`
	Method string `json:"method"`
}

type WebTrigger

type WebTrigger struct {
	BaseFilter
	NextFilter Filter    `json:"next"`
	Action     WebAction `json:"action"`
	// contains filtered or unexported fields
}

func NewWebTrigger

func NewWebTrigger(client *http.Client, filterId string, filterName string) *WebTrigger

func (*WebTrigger) Fill

func (f *WebTrigger) Fill(msg string) error

func (*WebTrigger) Next

func (f *WebTrigger) Next(filter Filter) error

func (*WebTrigger) String

func (f *WebTrigger) String() string

type WechatAppAttach

type WechatAppAttach struct {
	TotalLen       string `json:"totallen"`
	AttachId       string `json:"attachid"`
	Emoticonmd5    string `json:"emoticonmd5"`
	FileExt        string `json:"fileext"`
	CdnThumbUrl    string `json:"cdnthumburl"`
	CdnThumbMd5    string `json:"cdnthumbmd5"`
	CdnThumbLength string `json:"cdnthumblength"`
	CdnThumbWidth  string `json:"cdnthumbwidth"`
	CdnThumbHeight string `json:"cdnthumbheight"`
	CdnThumbAeskey string `json:"cdnthumbaeskey"`
	Aeskey         string `json:"aeskey"`
	EncryVer       string `json:"encryver"`
	FileKey        string `json:"filekey"`
}

type WechatAppInfo

type WechatAppInfo struct {
	AppName string `json:"appname"`
	Version string `json:"version"`
}

type WechatAppMsg

type WechatAppMsg struct {
	Attributions      WechatAppMsgAttributions `json:"$"`
	Title             string                   `json:"title"`
	Des               string                   `json:"des"`
	Action            string                   `json:"action"`
	Type              string                   `json:"type"`
	ShowType          string                   `json:"showtype"`
	SoundType         string                   `json:"soundtype"`
	MediaTagName      string                   `json:"mediatagname"`
	MessageExt        string                   `json:"messageext"`
	MessageAction     string                   `json:"messageaction"`
	Content           string                   `json:"content"`
	ContentAttr       string                   `json:"contentattr"`
	Url               string                   `json:"url"`
	LowUrl            string                   `json:"lowurl"`
	DataUrl           string                   `json:"dataurl"`
	LowDataUrl        string                   `json:"lowdataurl"`
	ExtInfo           string                   `json:"extinfo"`
	SourceUserName    string                   `json:"sourceusername"`
	SourceDisplayName string                   `json:"sourcedisplayname"`
	ThumbUrl          string                   `json:"thumburl"`
	Md5               string                   `json:"md5"`
	StatExtStr        string                   `json:"statextstr"`
	WeAppInfo         WechatWeAppInfo          `json:"weappinfo"`
	AppAttach         WechatAppAttach          `json:"appattach"`
}

type WechatAppMsgAttributions

type WechatAppMsgAttributions struct {
	Appid  string `json:"appid"`
	Sdkver string `json:"sdkver"`
}

type WechatBaseFilter

type WechatBaseFilter struct {
	BaseFilter
	NextFilter Filter `json:"next"`
}

func NewWechatBaseFilter

func NewWechatBaseFilter(filterId string, filterName string) *WechatBaseFilter

func (*WechatBaseFilter) Fill

func (f *WechatBaseFilter) Fill(msg string) error

func (*WechatBaseFilter) Next

func (f *WechatBaseFilter) Next(filter Filter) error

func (*WechatBaseFilter) String

func (f *WechatBaseFilter) String() string

type WechatEmoji

type WechatEmoji struct {
	Attributions WechatEmojiAttributions `json:"$"`
}

type WechatEmojiAttributions

type WechatEmojiAttributions struct {
	FromUserName      string `json:"fromusername"`
	ToUserName        string `json:"tousername"`
	Type              string `json:"type"`
	IdBuffer          string `json:"idbuffer"`
	Md5               string `json:"md5"`
	Len               string `json:"len"`
	ProductId         string `json:"productid"`
	AndroidMd5        string `json:"androidmd5"`
	AndroidLen        string `json:"androidlen"`
	S60V3Md5          string `json:"s60v3md5"`
	S60V3Len          string `json:"s60v3len"`
	S60v5Md5          string `json:"s60v5md5"`
	S60v5Len          string `json:"s60v5len"`
	CdnUrl            string `json:"cdnurl"`
	DesignerId        string `json:"designerid"`
	ThumbUrl          string `json:"thumburl"`
	EncryptUrl        string `json:"encrypturl"`
	AesKey            string `json:"aeskey"`
	ExternUrl         string `json:"externurl"`
	ExternMd5         string `json:"externmd5"`
	Width             string `json:"width"`
	Height            string `json:"height"`
	TpUrl             string `json:"tpurl"`
	TpAuthKey         string `json:"tpauthkey"`
	AttachedText      string `json:"attachedtext"`
	AttachedTextColor string `json:"attachedtextcolor"`
	LenSid            string `json:"lensid"`
}

type WechatMacproFriendRequest

type WechatMacproFriendRequest struct {
	ContactId string `json:"contactId"`
	Alias     string `json:alias`
	NickName  string `json:nickname`
	Hello     string `json:"hello"`
	Id        string `json:"id"`
	Stranger  string `json:"stranger"`
	Ticket    string `json:"ticket"`
	Timestamp int64  `json:"timestamp"`
	Type      int    `json:"type"`
}

type WechatMomentFilter

type WechatMomentFilter struct {
	BaseFilter
	NextFilter Filter `json:"next"`
}

func NewWechatMomentFilter

func NewWechatMomentFilter(filterId string, filterName string) *WechatMomentFilter

func (*WechatMomentFilter) Fill

func (f *WechatMomentFilter) Fill(msg string) error

func (*WechatMomentFilter) Next

func (f *WechatMomentFilter) Next(filter Filter) error

func (*WechatMomentFilter) String

func (f *WechatMomentFilter) String() string

type WechatMsg

type WechatMsg struct {
	AppInfo      WechatAppInfo `json:"appinfo"`
	AppMsg       WechatAppMsg  `json:"appmsg"`
	Emoji        WechatEmoji   `json:"emoji"`
	FromUserName string        `json:"fromusername"`
	Scene        string        `json:"scene"`
	CommentUrl   string        `json:"commenturl"`
}

type WechatMsgSource

type WechatMsgSource struct {
	AtUserList  string `xml:"atuserlist" json:"atUserList"`
	Silence     int    `xml:"silence" json:"silence"`
	MemberCount int    `xml:"membercount" json:"memberCount"`
}

type WechatWeAppInfo

type WechatWeAppInfo struct {
	UserName       string `json:"username"`
	AppId          string `json:"appid"`
	Type           string `json:"type"`
	Version        string `json:"version"`
	WeAppIconUrl   string `json:"weappiconurl"`
	PagePath       string `json:"pagepath"`
	ShareId        string `json:"shareId"`
	AppServiceType string `json:"appservicetype"`
}

Jump to

Keyboard shortcuts

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