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 Client
- func (c *Client) Dispose() error
- func (c *Client) ForwardMessage(target string, msgid uint64) error
- func (c *Client) GetContacts() ([][5]string, error)
- func (c *Client) GetFriendList() ([]*WxUserInfo, error)
- func (c *Client) GetGroupInfo(wxid string) (*WxGroupInfo, error)
- func (c *Client) GetGroupList() ([]*WxGroupInfo, error)
- func (c *Client) GetGroupMemberNickname(group, wxid string) (string, error)
- func (c *Client) GetGroupMembers(wxid string) ([]string, error)
- func (c *Client) GetOpenIMContacts() ([][5]string, error)
- func (c *Client) GetSelf() (*WxUserInfo, error)
- func (c *Client) GetUserInfo(wxid string) (*WxUserInfo, error)
- func (c *Client) GetVoice(msgID uint64) ([]byte, error)
- func (c *Client) HookMsg(savePath string) error
- func (c *Client) IsAlive() bool
- func (c *Client) IsLogin() bool
- func (c *Client) LoginWtihQRCode() ([]byte, error)
- func (c *Client) Logout() error
- func (c *Client) SendAtText(target string, content string, mentions []string) error
- func (c *Client) SendFile(target string, path string) error
- func (c *Client) SendImage(target string, path string) error
- func (c *Client) SendText(target string, content string) error
- func (c *Client) SetVersion(version string) error
- type Manager
- func (m *Manager) Connect(mxid string, path string) error
- func (m *Manager) Disconnet(mxid string) (err error)
- func (m *Manager) Dispose()
- func (m *Manager) GetClient(mxid string) *Client
- func (m *Manager) GetFriendList(mxid string) (any, error)
- func (m *Manager) GetGroupInfo(mxid string, wxid string) (any, error)
- func (m *Manager) GetGroupList(mxid string) (any, error)
- func (m *Manager) GetGroupMemberNickname(mxid, group, wxid string) (any, error)
- func (m *Manager) GetGroupMembers(mxid string, wxid string) (any, error)
- func (m *Manager) GetSelf(mxid string) (any, error)
- func (m *Manager) GetUserInfo(mxid string, wxid string) (any, error)
- func (m *Manager) IsLogin(mxid string) (any, error)
- func (m *Manager) LoginWtihQRCode(mxid string) (any, error)
- func (m *Manager) SendMessage(mxid string, event *common.Event) (*common.Event, error)
- func (m *Manager) Serve()
- type Service
- type WechatMessage
- type WxContactResp
- type WxGetFriendListResp
- type WxGetGroupListResp
- type WxGetGroupMembersResp
- type WxGetQRCodeResp
- type WxGetSelfResp
- type WxGroupInfo
- type WxIsLoginResp
- type WxUserInfo
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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetContacts ¶
func (*Client) GetFriendList ¶
func (c *Client) GetFriendList() ([]*WxUserInfo, error)
func (*Client) GetGroupInfo ¶
func (c *Client) GetGroupInfo(wxid string) (*WxGroupInfo, error)
func (*Client) GetGroupList ¶
func (c *Client) GetGroupList() ([]*WxGroupInfo, error)
func (*Client) GetGroupMemberNickname ¶
func (*Client) GetOpenIMContacts ¶
func (*Client) GetSelf ¶
func (c *Client) GetSelf() (*WxUserInfo, error)
func (*Client) GetUserInfo ¶
func (c *Client) GetUserInfo(wxid string) (*WxUserInfo, error)
func (*Client) LoginWtihQRCode ¶
func (*Client) SendAtText ¶
func (*Client) SetVersion ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(config *common.Configure, f func(string, *WechatMessage)) *Manager
func (*Manager) GetGroupInfo ¶
func (*Manager) GetGroupMemberNickname ¶
func (*Manager) GetGroupMembers ¶
func (*Manager) SendMessage ¶
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"` }
type WxContactResp ¶
type WxGetFriendListResp ¶
type WxGetFriendListResp struct { Data []*WxUserInfo `json:"data"` Result string `json:"result"` }
type WxGetGroupListResp ¶
type WxGetGroupListResp struct { Data []*WxGroupInfo `json:"data"` Result string `json:"result"` }
type WxGetGroupMembersResp ¶
type WxGetQRCodeResp ¶
type WxGetSelfResp ¶
type WxGetSelfResp struct { Data WxUserInfo `json:"data"` Result string `json:"result"` }
type WxGroupInfo ¶
type WxIsLoginResp ¶
Click to show internal directories.
Click to hide internal directories.