Go SDK
Official Go SDK with context support
Installation
go get github.com/bycoded/bycloud-goQuick Start
Here's a quick example to get you started with the Go SDK:
package mainimport ("context""fmt""github.com/bycoded/bycloud-go")func main() {// Initialize the clientclient := bycloud.New(bycloud.WithToken("YOUR_ACCESS_TOKEN"))ctx := context.Background()// List all instancesinstances, err := client.Compute.ListInstances(ctx)if err != nil {panic(err)}fmt.Println(instances)// Create a new instancenewInstance, err := client.Compute.CreateInstance(ctx, &bycloud.CreateInstanceParams{Name: "my-instance",FlavorID: "c1.medium",ImageID: "ubuntu-22.04",})if err != nil {panic(err)}fmt.Println(newInstance)}
Features
- Full coverage of the ByCloud API
- Automatic request signing and authentication
- Built-in error handling and retries
- Strongly typed responses