Categorygithub.com/dongzeli95/tcb-openapi-go
modulepackage
0.3.0
Repository: https://github.com/dongzeli95/tcb-openapi-go.git
Documentation: pkg.go.dev

# README

kaylyu/tcb-openapi-go

Cloudbase Open API development sdk written in Golang

快速开始

import github.com/dongzeli95/tcb-openapi-go

示例

tcb := tcb.NewTcb(&config.Config{
    EnvId:     "",                              //云开发环境ID
    Timeout:   time.Duration(15) * time.Second, //请求超时
    LogPrefix: "tcb",                           //日志头
    Debug:     false,                           //接口是否开启DEBUG
    SecretId:"",                                //腾讯云密钥SecretId
    SecretKey:"",                               //腾讯云密钥SecretKey
})

//根据文档ID查找对应云数据库表中记录
fmt.Println(client.GetDatabase().GetDocument("users", "124444", 10, 0, nil, nil))

//调用云函数
fmt.Println(tcb.GetFunction().Invoke("test_func", map[string]interface{}{
    "data": map[string]interface{}{
        "path":       "/ping",
        "httpMethod": "GET",
        "body":       "",
    },
}))

支持

  • 云函数
  • 文件存储
  • 数据库 示例

License

MIT

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

创建实例 */.

# Structs

Tcb 实例 */.