package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Plans.ListStorage(ctx)
if err != nil {
log.Fatal(err)
}
if res.StoragePlans != nil {
// handle response
}
}{
"data": [
{
"id": "plan_MLGXPdWgdnNWk",
"type": "storage_plans",
"attributes": {
"name": "Filesystem",
"regions": [
{
"name": "United States",
"locations": [
"DAL"
],
"pricing": {
"USD": {
"month": 0.12
},
"BRL": {
"month": 0.68
}
}
}
]
}
}
]
}package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Plans.ListStorage(ctx)
if err != nil {
log.Fatal(err)
}
if res.StoragePlans != nil {
// handle response
}
}{
"data": [
{
"id": "plan_MLGXPdWgdnNWk",
"type": "storage_plans",
"attributes": {
"name": "Filesystem",
"regions": [
{
"name": "United States",
"locations": [
"DAL"
],
"pricing": {
"USD": {
"month": 0.12
},
"BRL": {
"month": 0.68
}
}
}
]
}
}
]
}Was this page helpful?