go_wechat

package module
v0.0.0-...-4478dd3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: GPL-3.0 Imports: 5 Imported by: 2

README

微信网页版API简易操作封装

使用方法

golang 版本要求 1.12+

1. 简单测试

参看examples目录实例

2. 集成到项目
# 下载
go get -u github.com/oliverCJ/go-wechat

# 参考examples实例

项目实例

https://github.com/oliverCJ/wechat-terminal

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContactInit

func ContactInit(loginService *services.LoginService) (*services.InitService, error)

初始化信息,联系人等

func GetChatList

func GetChatList() []services.Member

获取聊天列表

func GetCloseChan

func GetCloseChan() <-chan bool

获取关闭通道操作符

func GetCloseOpChan

func GetCloseOpChan() chan<- bool

获取可操作的关闭通道操作符

func GetContact

func GetContact() services.ContactList

获取联系人列表

func GetGlobalMemberMap

func GetGlobalMemberMap() map[string]services.TinyMemberInfo

获取全局用户mao

func GetMPSubscribeMsgList

func GetMPSubscribeMsgList() []services.MPSubscribeMsg

获取订阅消息

func GetReadChan

func GetReadChan() <-chan services.Message

获取读取消息通道操作符

func GetSendChan

func GetSendChan() chan<- services.SendMessage

获取发送通道操作符

func GetSendRespChan

func GetSendRespChan() <-chan services.SendMessageResp

获取发送消息响应通道操作符

func GetUserInfo

func GetUserInfo() services.User

获取登录用户信息

func GetWeChat

func GetWeChat() *weChat

func Login

func Login() (*services.LoginService, error)

登录

func MsgInit

func MsgInit(initService *services.InitService) (*services.MsgServices, error)

func New

func New() *weChat

func SetCacheHistory

func SetCacheHistory(set bool)

TODO 设置是否保存历史记录

func SetCryptConf

func SetCryptConf(conf *global.CryptConf)

func SetHoReload

func SetHoReload(set bool)

设置是否热重启

func SetLog

func SetLog(logLevel string, logOutChan chan string, logFile *os.File)

设置日志级别

func SetRootPath

func SetRootPath(dir string)

设置日志存储根目录

func Start

func Start() error

func Stop

func Stop()

Types

This section is empty.

Directories

Path Synopsis
constants
ignore +build
ignore +build

Jump to

Keyboard shortcuts

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