digitalocean/godo được TopGit xếp vào nhóm dự án backend, với 1.5k sao trên GitHub, viết chủ yếu bằng Go. DigitalOcean Go API client
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Godo is a Go client library for accessing the DigitalOcean V2 API.
You can view the client API docs here: http://godoc.org/github.com/digitalocean/godo
You can view DigitalOcean API docs here: https://docs.digitalocean.com/reference/api/api-reference/
🚀 New in v1.191.0 — AI & Inference support
godo now ships first-class support for DigitalOcean's
Gradient AI Platform: chat
completions (with streaming), image generation, embeddings, batch inference,
model listing, and more — all from the same Client. Jump to
AI & Inference to get started.
A PAT created with full access scope, or a Gradient Model Access Key.
If you only have a limited-scope PAT, infrastructure calls will work but
inference calls will fail with 401. Create a new PAT with full access, or use
a Model Access Key instead.
// Either credential works with godo.NewFromToken:
client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) // full-access PAT
client := godo.NewFromToken(os.Getenv("MODEL_ACCESS_KEY")) // Gradient model access key
If you need to provide a context.Context to your new client, you should use godo.NewClient to manually construct a client instead.
AI & Inference
Talk to models on DigitalOcean's Gradient AI Platform with the same godo.Client.
The Serverless Inference API is available at https://inference.do-ai.run/. Use a DigitalOcean PAT with full access scope or a Gradient Model Access Key — see the credentials note above.
Chat completion
completion, _, err := client.Chat.Completions.New(ctx, &godo.ChatCompletionNewParams{
Model: "llama3.3-70b-instruct",
Messages: []godo.ChatCompletionMessage{
godo.UserMessage("Write me a haiku"),
},
})
List models
page, _, err := client.Models.List(ctx)
for _, m := range page.Data {
fmt.Println(m.ID)
}
Image generation
image, _, err := client.ImageGenerations.Generate(ctx, &godo.ImageGenerateParams{
Model: "stable-diffusion-3.5-large",
Prompt: "A friendly cartoon shark typing on a laptop at a sunny beach",
N: 1,
})
For streaming, embeddings, messages, responses, async invocations, batch inference, agent inference, and full runnable programs, see examples/serverless-inference/ and examples/agent-inference/.
If a list of items is paginated by the API, you must request pages individually. For example, to fetch all Droplets:
func DropletList(ctx context.Context, client *godo.Client) ([]godo.Droplet, error) {
// create a list to hold our droplets
list := []godo.Droplet{}
// create options. initially, these will be blank
opt := &godo.ListOptions{}
for {
droplets, resp, err := client.Droplets.List(ctx, opt)
if err != nil {
return nil, err
}
// append the current page's droplets to our list
list = append(list, droplets...)
// if we are at the last page, break out the for loop
if resp.Links == nil || resp.Links.IsLastPage() {
break
}
page, err := resp.Links.CurrentPage()
if err != nil {
return nil, err
}
// set the page we want for the next request
opt.Page = page + 1
}
return list, nil
}
Some endpoints offer token based pagination. For example, to fetch all Registry Repositories:
func ListRepositoriesV2(ctx context.Context, client *godo.Client, registryName string) ([]*godo.RepositoryV2, error) {
// create a list to hold our registries
list := []*godo.RepositoryV2{}
// create options. initially, these will be blank
opt := &godo.TokenListOptions{}
for {
repositories, resp, err := client.Registry.ListRepositoriesV2(ctx, registryName, opt)
if err != nil {
return nil, err
}
// append the current page's registries to our list
list = append(list, repositories...)
// if we are at the last page, break out the for loop
if resp.Links == nil || resp.Links.IsLastPage() {
break
}
// grab the next page token
nextPageToken, err := resp.Links.NextPageToken()
if err != nil {
return nil, err
}
// provide the next page token for the next request
opt.Token = nextPageToken
}
return list, nil
}
Automatic Retries and Exponential Backoff
The Godo client can be configured to use automatic retries and exponentional backoff for requests that fail with 429 or 500-level response codes via go-retryablehttp. To configure Godo to enable usage of go-retryablehttp, the RetryConfig.RetryMax must be set.
digitalocean/godo có 1.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/digitalocean/godo. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
digitalocean/godo có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho digitalocean/godo. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
digitalocean/godo còn đang phát triển không?
Commit gần nhất trên digitalocean/godo là 16 ngày trước (theo timestamp GitHub). Repo có 384 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
digitalocean/godo là gì?
digitalocean/godo (digitalocean/godo) là dự án Go trên GitHub. Theo mô tả gốc: DigitalOcean Go API client
digitalocean/godo so với các dự án Backend khác thế nào?
digitalocean/godo được TopGit xếp vào nhóm Backend, với 1.5k sao GitHub và viết bằng Go. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc thêm về digitalocean/godo ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/digitalocean/godo là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về godo?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về godo.