Documentation ¶
Index ¶
- Constants
- type Accounts
- type BotsInfo
- type ChatGroupMemberVO
- type ChatGroupVO
- type ChatUserVO
- type ContactInfoDispatcher
- type ContactParser
- type ContactProcessInfo
- type ContactRawInfo
- type ErrorHandler
- func (o *ErrorHandler) BackEndError(ctx *WebServer)
- func (ctx *ErrorHandler) BotAction(w *rpc.GRPCWrapper, req *pb.BotActionRequest) *pb.BotActionReply
- func (ctx *ErrorHandler) BotLogin(w *rpc.GRPCWrapper, req *pb.BotLoginRequest) *pb.BotLoginReply
- func (ctx *ErrorHandler) BotLogout(w *rpc.GRPCWrapper, req *pb.BotLogoutRequest) *pb.OperationReply
- func (ctx *ErrorHandler) BotShutdown(w *rpc.GRPCWrapper, req *pb.BotLogoutRequest) *pb.OperationReply
- func (o *ErrorHandler) CreateAndRunAction(web *WebServer, ar *domains.ActionRequest) *pb.BotActionReply
- func (o *ErrorHandler) CreateFilterChain(ctx *WebServer, tx dbx.Queryable, wrapper *rpc.GRPCWrapper, filterId string)
- func (ctx *ErrorHandler) GetBots(w *rpc.GRPCWrapper, req *pb.BotsRequest) *pb.BotsReply
- func (o *ErrorHandler) GetRateLimit(actionType string) (int, int, int)
- func (o *ErrorHandler) WebError(w http.ResponseWriter)
- type FilterTemplate
- type FilterTemplateSuite
- type FilterVO
- type GithubOAuthConfig
- type ProcessGroupInfo
- type ProcessUserInfo
- type WebConfig
- type WebServer
- func (ctx *WebServer) Error(err error, msg string, v ...interface{})
- func (server *WebServer) GetBot(_ context.Context, req *pb.GetBotRequest) (*pb.GetBotResponse, error)
- func (server *WebServer) GetBotChatRoom(ctx context.Context, request *pb.GetBotChatRoomRequest) (*pb.GetBotChatRoomResponse, error)
- func (server *WebServer) GetBotChatRooms(ctx context.Context, request *pb.GetBotChatRoomsRequest) (*pb.GetBotChatRoomsResponse, error)
- func (web *WebServer) GetChatMessage(w http.ResponseWriter, r *http.Request)
- func (server *WebServer) GetChatUser(_ context.Context, req *pb.GetChatUserRequest) (*pb.GetChatUserResponse, error)
- func (server *WebServer) GetChatUserSync(_ context.Context, req *pb.GetChatUserSyncRequest) (*pb.GetChatUserResponse, error)
- func (ctx *WebServer) Info(msg string, v ...interface{})
- func (web *WebServer) NewGRPCWrapper() (*rpc.GRPCWrapper, error)
- func (web *WebServer) NotifyWechatBotCrawlTimeline(w http.ResponseWriter, r *http.Request)
- func (web *WebServer) NotifyWechatBotsCrawlTimeline(w http.ResponseWriter, r *http.Request)
- func (web *WebServer) NotifyWechatBotsCrawlTimelineTail(w http.ResponseWriter, r *http.Request)
- func (web *WebServer) ProcessContactsServe()
- func (web *WebServer) Search(w http.ResponseWriter, r *http.Request)
- func (web *WebServer) SearchMessage(w http.ResponseWriter, r *http.Request)
- func (server *WebServer) Serve()
- func (web *WebServer) UpdateAccounts() error
- func (server *WebServer) UpdateBotChatRoom(ctx context.Context, request *pb.UpdateBotChatRoomRequest) (*pb.UpdateBotChatRoomResponse, error)
- func (server *WebServer) ValidateToken(_ context.Context, req *pb.ValidateTokenRequest) (*pb.ValidateTokenResponse, error)
- type WechatContactInfo
- type WechatGroupInfo
- type WechatGroupMember
Constants ¶
View Source
const ( SDK string = "SDK" USER string = "USER" STREAMING string = "STREAMING" SDKCODE string = "sdkbearer" SDKCHILDCODE string = "childbearer" REFRESHCODE string = "refresh" )
View Source
const SyncGroupMembersIntervalSeconds float64 = 3600
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotsInfo ¶
type BotsInfo struct { pb.BotsInfo BotName string `json:"botName"` //BotId string `json:"botId"` FilterId string `json:"filterId"` MomentFilterId string `json:"momentFilterId"` WxaappId string `json:"wxaappId"` Callback string `json:"callback"` CreateAt *utils.JSONTime `json:"createAt"` UpdateAt *utils.JSONTime `json:"updateAt"` DeleteAt *utils.JSONTime `json:"deleteAt,omitempty"` ChatUserVO }
type ChatGroupMemberVO ¶
type ChatGroupVO ¶
type ChatGroupVO struct { ChatGroupId string `json:"chatGroupId"` GroupName string `json:"groupName"` Type string `json:"type"` Alias string `json:"alias"` NickName string `json:"nickname"` Owner string `json:"owner"` OwnerDetail *ChatUserVO `json:"ownerDetail` Avatar string `json:"avatar"` MemberCount int `json:"memberCount"` MaxMemberCount int `json:"maxMemberCount"` LastSendAt utils.JSONTime `json:"lastSendAt"` CreateAt utils.JSONTime `json:"createAt"` UpdateAt utils.JSONTime `json:"updateAt"` }
type ChatUserVO ¶
type ChatUserVO struct { ChatUserId string `json:"chatuserId"` UserName string `json:"username"` NickName string `json:"nickname"` Type string `json:"type"` Alias string `json:"alias"` Avatar string `json:"avatar"` Sex int `json:"sex"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` Signature string `json:"signature"` Remark string `json:"remark"` Label string `json:"label"` LastSendAt utils.JSONTime `json:"lastsendat"` CuCreateAt utils.JSONTime `json:"cu_createat"` CuUpdateAt utils.JSONTime `json:"cu_updateat"` }
type ContactInfoDispatcher ¶
type ContactInfoDispatcher struct {
// contains filtered or unexported fields
}
type ContactParser ¶
type ContactParser struct {
// contains filtered or unexported fields
}
func NewContactParser ¶
func NewContactParser() *ContactParser
type ContactProcessInfo ¶
type ContactProcessInfo struct {
// contains filtered or unexported fields
}
type ContactRawInfo ¶
type ContactRawInfo struct {
// contains filtered or unexported fields
}
type ErrorHandler ¶
type ErrorHandler struct {
domains.ErrorHandler
}
func (*ErrorHandler) BackEndError ¶
func (o *ErrorHandler) BackEndError(ctx *WebServer)
func (*ErrorHandler) BotAction ¶
func (ctx *ErrorHandler) BotAction(w *rpc.GRPCWrapper, req *pb.BotActionRequest) *pb.BotActionReply
func (*ErrorHandler) BotLogin ¶
func (ctx *ErrorHandler) BotLogin(w *rpc.GRPCWrapper, req *pb.BotLoginRequest) *pb.BotLoginReply
func (*ErrorHandler) BotLogout ¶
func (ctx *ErrorHandler) BotLogout(w *rpc.GRPCWrapper, req *pb.BotLogoutRequest) *pb.OperationReply
func (*ErrorHandler) BotShutdown ¶
func (ctx *ErrorHandler) BotShutdown(w *rpc.GRPCWrapper, req *pb.BotLogoutRequest) *pb.OperationReply
func (*ErrorHandler) CreateAndRunAction ¶
func (o *ErrorHandler) CreateAndRunAction(web *WebServer, ar *domains.ActionRequest) *pb.BotActionReply
func (*ErrorHandler) CreateFilterChain ¶
func (o *ErrorHandler) CreateFilterChain( ctx *WebServer, tx dbx.Queryable, wrapper *rpc.GRPCWrapper, filterId string)
func (*ErrorHandler) GetBots ¶
func (ctx *ErrorHandler) GetBots(w *rpc.GRPCWrapper, req *pb.BotsRequest) *pb.BotsReply
func (*ErrorHandler) GetRateLimit ¶
func (o *ErrorHandler) GetRateLimit(actionType string) (int, int, int)
func (*ErrorHandler) WebError ¶
func (o *ErrorHandler) WebError(w http.ResponseWriter)
type FilterTemplate ¶
type FilterTemplateSuite ¶
type GithubOAuthConfig ¶
type ProcessGroupInfo ¶
type ProcessGroupInfo struct {
// contains filtered or unexported fields
}
type ProcessUserInfo ¶
type ProcessUserInfo struct {
// contains filtered or unexported fields
}
type WebConfig ¶
type WebConfig struct { Host string Port string GrpcPort string Baseurl string Redis utils.RedisConfig Fluent utils.FluentConfig Messagedb utils.MongoConfig Apilogdb utils.MongoConfig Rabbitmq utils.RabbitMQConfig SecretPhrase string Database utils.DatabaseConfig Sentry string GithubOAuth GithubOAuthConfig AllowOrigin []string ActionHealthCheck domains.HealthCheckConfig BotHealthCheck domains.HealthCheckConfig ActionTimeout int }
type WebServer ¶
type WebServer struct { Config WebConfig Hubport string Hubhost string // contains filtered or unexported fields }
func (*WebServer) GetBot ¶
func (server *WebServer) GetBot(_ context.Context, req *pb.GetBotRequest) (*pb.GetBotResponse, error)
func (*WebServer) GetBotChatRoom ¶
func (server *WebServer) GetBotChatRoom(ctx context.Context, request *pb.GetBotChatRoomRequest) (*pb.GetBotChatRoomResponse, error)
func (*WebServer) GetBotChatRooms ¶
func (server *WebServer) GetBotChatRooms(ctx context.Context, request *pb.GetBotChatRoomsRequest) (*pb.GetBotChatRoomsResponse, error)
func (*WebServer) GetChatMessage ¶
func (web *WebServer) GetChatMessage(w http.ResponseWriter, r *http.Request)
func (*WebServer) GetChatUser ¶
func (server *WebServer) GetChatUser(_ context.Context, req *pb.GetChatUserRequest) (*pb.GetChatUserResponse, error)
func (*WebServer) GetChatUserSync ¶
func (server *WebServer) GetChatUserSync(_ context.Context, req *pb.GetChatUserSyncRequest) (*pb.GetChatUserResponse, error)
func (*WebServer) NewGRPCWrapper ¶
func (web *WebServer) NewGRPCWrapper() (*rpc.GRPCWrapper, error)
func (*WebServer) NotifyWechatBotCrawlTimeline ¶
func (web *WebServer) NotifyWechatBotCrawlTimeline(w http.ResponseWriter, r *http.Request)
func (*WebServer) NotifyWechatBotsCrawlTimeline ¶
func (web *WebServer) NotifyWechatBotsCrawlTimeline(w http.ResponseWriter, r *http.Request)
func (*WebServer) NotifyWechatBotsCrawlTimelineTail ¶
func (web *WebServer) NotifyWechatBotsCrawlTimelineTail(w http.ResponseWriter, r *http.Request)
func (*WebServer) ProcessContactsServe ¶
func (web *WebServer) ProcessContactsServe()
func (*WebServer) SearchMessage ¶
func (web *WebServer) SearchMessage(w http.ResponseWriter, r *http.Request)
func (*WebServer) UpdateAccounts ¶
func (*WebServer) UpdateBotChatRoom ¶
func (server *WebServer) UpdateBotChatRoom(ctx context.Context, request *pb.UpdateBotChatRoomRequest) (*pb.UpdateBotChatRoomResponse, error)
func (*WebServer) ValidateToken ¶
func (server *WebServer) ValidateToken(_ context.Context, req *pb.ValidateTokenRequest) (*pb.ValidateTokenResponse, error)
type WechatContactInfo ¶
type WechatContactInfo struct { Id int `json:"id"` MType int `json:"mType"` MsgType int `json:"msgType"` Continue int `json:"continue"` Status int `json:"Status"` Source int `json:"source"` Uin int64 `json:"uin"` UserName string `json:"userName"` Alias string `json:"alias"` NickName string `json:"nickName"` PyInitial string `json:"pyInitial"` QuanPin string `json:"quanPin"` Stranger string `json:"stranger"` BigHead string `json:"bigHead"` SmallHead string `json:"smallHead"` BitMask int64 `json:"bitMask"` BitValue int64 `json:"bitValue"` ImageFlag int `json:"imageFlag"` Sex int `json:"sex"` Intro string `json:"intro"` Country string `json:"country"` Provincia string `json:"provincia"` City string `json:"city"` Label string `json:"label"` Remark string `json:"remark"` RemarkPyInitial string `json:"remarkPyInitial"` RemarkQuanPin string `json:"remarkQuanPin"` Level int `json:"level"` Signature string `json:"signature"` ChatRoomId int64 `json:"chatroomId"` ChatRoomOwner string `json:"chatroomOwner"` Member []string `json:"member"` MaxMemberCount int `json:"maxMemberCount"` MemberCount int `json:"memberCount"` }
type WechatGroupInfo ¶
Click to show internal directories.
Click to hide internal directories.