logo
0
0
Login
fix: 修复一个结构体大小写问题

License: MIT

go-cnb is a Go client library for accessing the CNB API.

This SDK is generated by cnb-sdk-generator

Installation

go get cnb.cool/cnb/sdk/go-cnb # Get the latest tag version of go-cnb go get cnb.cool/cnb/sdk/go-cnb@v1.0.0 # Get a specific tag version of go-cnb go get cnb.cool/cnb/sdk/go-cnb@master # [Not recommended] Get the latest commit from master branch

Usage

import "cnb.cool/cnb/sdk/go-cnb/cnb"

Create a CNB Client, then use various services to access CNB APIs.

client, _ = cnb.NewClient(nil).WithAuthToken("...your cnb token...").WithURLs("...cnb base url...") repo, rsp, err := client.Repositories.GetRepo(ctx, repoName)

For URLs requiring authentication, you can apply for a TOKEN with appropriate permissions in CNB's Personal Settings -> Access Tokens. The BaseURL rule is api. prefix plus the main domain, such as https://api.cnb.cool/

Projects

The following excellent projects are built upon this project to enrich the CNB ecosystem: