Documentation
¶
Index ¶
- Constants
- Variables
- func GetBytes(url string) ([]byte, error)
- func HTTPGetReadCloser(url string) (io.ReadCloser, error)
- func LoadDriver() syscall.Handle
- func NewGzipReadCloser(reader io.ReadCloser) (io.ReadCloser, error)
- type Bot
- type ContactResp
- type GetGroupMembersResp
- type GetQRCodeResp
- type GetSelfResp
- type GroupInfo
- type IsLoginResp
- type LimbService
- type UserInfo
- type WechatClient
- func (c *WechatClient) Dispose() error
- func (c *WechatClient) ForwardMessage(target string, msgid uint64) error
- func (c *WechatClient) GetContacts() ([][5]string, error)
- func (c *WechatClient) GetFriendList() ([]*UserInfo, error)
- func (c *WechatClient) GetGroupInfo(wxid string) (*GroupInfo, error)
- func (c *WechatClient) GetGroupList() ([]*GroupInfo, error)
- func (c *WechatClient) GetGroupMemberNickname(group, wxid string) (string, error)
- func (c *WechatClient) GetGroupMembers(wxid string) ([]string, error)
- func (c *WechatClient) GetOpenIMContacts() ([][5]string, error)
- func (c *WechatClient) GetSelf() (*UserInfo, error)
- func (c *WechatClient) GetUserInfo(wxid string) (*UserInfo, error)
- func (c *WechatClient) GetVoice(msgID uint64) ([]byte, error)
- func (c *WechatClient) HookMsg(savePath string) error
- func (c *WechatClient) IsAlive() bool
- func (c *WechatClient) IsLogin() bool
- func (c *WechatClient) LoginWtihQRCode() ([]byte, error)
- func (c *WechatClient) Logout() error
- func (c *WechatClient) SendAtText(target string, content string, mentions []string) error
- func (c *WechatClient) SendFile(target string, path string) error
- func (c *WechatClient) SendImage(target string, path string) error
- func (c *WechatClient) SendText(target string, content string) error
- func (c *WechatClient) SetVersion(version string) error
- type WechatMessage
Constants ¶
View Source
const ( CLIENT_API_URL = "http://127.0.0.1:%d/api/?type=%d" WECHAT_IS_LOGIN = 0 WECHAT_GET_SELF_INFO = 1 WECHAT_MSG_SEND_TEXT = 2 WECHAT_MSG_SEND_AT = 3 WECHAT_MSG_SEND_IMAGE = 5 WECHAT_MSG_SEND_FILE = 6 WECHAT_MSG_START_HOOK = 9 WECHAT_MSG_START_IMAGE_HOOK = 11 WECHAT_MSG_START_VOICE_HOOK = 13 WECHAT_CONTACT_GET_LIST = 15 WECHAT_CHATROOM_GET_MEMBER_LIST = 25 WECHAT_CHATROOM_GET_MEMBER_NICKNAME = 26 WECHAT_DATABASE_GET_HANDLES = 32 WECHAT_DATABASE_QUERY = 34 WECHAT_SET_VERSION = 35 WECHAT_MSG_FORWARD_MESSAGE = 40 WECHAT_GET_QROCDE_IMAGE = 41 WECHAT_LOGOUT = 44 DB_MICRO_MSG = "MicroMsg.db" DB_OPENIM_CONTACT = "OpenIMContact.db" DB_MEDIA_MSG = "MediaMSG0.db" )
Variables ¶
View Source
var (
UserAgent = "" /* 130-byte string literal not displayed */
)
Functions ¶
func HTTPGetReadCloser ¶
func HTTPGetReadCloser(url string) (io.ReadCloser, error)
func LoadDriver ¶
func NewGzipReadCloser ¶
func NewGzipReadCloser(reader io.ReadCloser) (io.ReadCloser, error)
Types ¶
type ContactResp ¶
type GetGroupMembersResp ¶
type GetQRCodeResp ¶
type GetSelfResp ¶
type IsLoginResp ¶
type LimbService ¶
type LimbService struct {
// contains filtered or unexported fields
}
func NewLimbService ¶
func NewLimbService(config *common.Configure) *LimbService
func (*LimbService) Start ¶
func (ls *LimbService) Start()
func (*LimbService) Stop ¶
func (ls *LimbService) Stop()
type WechatClient ¶
type WechatClient struct {
// contains filtered or unexported fields
}
func NewWechatClient ¶
func NewWechatClient(config *common.Configure) *WechatClient
func (*WechatClient) Dispose ¶
func (c *WechatClient) Dispose() error
func (*WechatClient) ForwardMessage ¶
func (c *WechatClient) ForwardMessage(target string, msgid uint64) error
func (*WechatClient) GetContacts ¶
func (c *WechatClient) GetContacts() ([][5]string, error)
func (*WechatClient) GetFriendList ¶
func (c *WechatClient) GetFriendList() ([]*UserInfo, error)
func (*WechatClient) GetGroupInfo ¶
func (c *WechatClient) GetGroupInfo(wxid string) (*GroupInfo, error)
func (*WechatClient) GetGroupList ¶
func (c *WechatClient) GetGroupList() ([]*GroupInfo, error)
func (*WechatClient) GetGroupMemberNickname ¶
func (c *WechatClient) GetGroupMemberNickname(group, wxid string) (string, error)
func (*WechatClient) GetGroupMembers ¶
func (c *WechatClient) GetGroupMembers(wxid string) ([]string, error)
func (*WechatClient) GetOpenIMContacts ¶
func (c *WechatClient) GetOpenIMContacts() ([][5]string, error)
func (*WechatClient) GetSelf ¶
func (c *WechatClient) GetSelf() (*UserInfo, error)
func (*WechatClient) GetUserInfo ¶
func (c *WechatClient) GetUserInfo(wxid string) (*UserInfo, error)
func (*WechatClient) HookMsg ¶
func (c *WechatClient) HookMsg(savePath string) error
func (*WechatClient) IsAlive ¶
func (c *WechatClient) IsAlive() bool
func (*WechatClient) IsLogin ¶
func (c *WechatClient) IsLogin() bool
func (*WechatClient) LoginWtihQRCode ¶
func (c *WechatClient) LoginWtihQRCode() ([]byte, error)
func (*WechatClient) Logout ¶
func (c *WechatClient) Logout() error
func (*WechatClient) SendAtText ¶
func (c *WechatClient) SendAtText(target string, content string, mentions []string) error
func (*WechatClient) SendText ¶
func (c *WechatClient) SendText(target string, content string) error
func (*WechatClient) SetVersion ¶
func (c *WechatClient) SetVersion(version string) error
type WechatMessage ¶
type WechatMessage struct { PID int `json:"pid"` MsgID uint64 `json:"msgid"` Time string `json:"time"` Timestamp int64 `json:"timestamp"` WxID string `json:"wxid"` Sender string `json:"sender"` Self string `json:"self"` IsSendMsg int8 `json:"isSendMsg"` IsSendByPhone int8 `json:"isSendByPhone"` MsgType int `json:"type"` Message string `json:"message"` FilePath string `json:"filepath"` Thumbnail string `json:"thumb_path"` ExtraInfo string `json:"extrainfo"` }
Click to show internal directories.
Click to hide internal directories.