wechat

module
Version: v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT

README

Go Wechat

Go Doc Production Ready License

Installation

go get -u -v github.com/strugglerx/wechat

suggested using go.mod:

require github.com/strugglerx/wechat

Usage


appid := "xx"
secret := "xx"

//sample
app := miniapp.New(appid,secret)

//hook
var cacheToken utils.Token
app := New(appid,secret, func(appidAndAccessToken ...string) *utils.Token {
    if contextToken,err := utils.ExtractAppidAndAccessToken(appidAndAccessToken...);err == nil{
        // write token logic
        cacheToken.Token = contextToken.Token
        cacheToken.UpdateTime =  int(time.Now().Unix())
        return &cacheToken
    }
    //read token logic
    return &cacheToken
    })

//To Do

License

Go Wechat is licensed under the MIT License, 100% free and open-source, forever.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL