houseme a8f7a24ff6 feat: improve comment and upgrade golang version 1.16 (#604) 3 éve
..
README.md 8e81a416c5 Adaptation of new go-redis components (#546) 4 éve
cloudfunction.go a8f7a24ff6 feat: improve comment and upgrade golang version 1.16 (#604) 3 éve
database.go a8f7a24ff6 feat: improve comment and upgrade golang version 1.16 (#604) 3 éve
file.go a8f7a24ff6 feat: improve comment and upgrade golang version 1.16 (#604) 3 éve
tcb.go 96c1f98944 [feature] Format the code and improve Mini Program authorization to o… (#473) 4 éve

README.md

小程序-云开发 SDK

Tencent Cloud Base 文档

使用说明

初始化配置

//使用memcache保存access_token,也可选择redis或自定义cache
memCache=cache.NewMemcache("127.0.0.1:11211")

//配置小程序参数
config := &wechat.Config{
    AppID:     "your app id",
    AppSecret: "your app secret",
    Cache:     memCache,
}
wc := wechat.NewWechat(config)
wcTcb := wc.GetTcb()

举例

触发云函数

res, err := wcTcb.InvokeCloudFunction("test-xxxx", "add", `{"a":1,"b":2}`)
if err != nil {
    panic(err)
}

更多使用方法参考PKG.DEV