Skip to content
Ona Docs

ListGateways

client.Gateways.List(ctx, params) (*GatewaysPage[Gateway], error)
POST/gitpod.v1.GatewayService/ListGateways

ListGateways

ParametersExpand Collapse
params GatewayListParams
Token param.Field[string]Optional

Query param

PageSize param.Field[int64]Optional

Query param

maximum100
minimum0
ReturnsExpand Collapse
type Gateway struct{…}

Gateway represents a system gateway that provides access to services

Name string

name is the human-readable name of the gateway. name is unique across all gateways.

URL string

url of the gateway

Region stringOptional

region is the geographical region where the gateway is located

ListGateways

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  page, err := client.Gateways.List(context.TODO(), gitpod.GatewayListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "gateways": [
    {
      "name": "name",
      "url": "url",
      "region": "region"
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}
Returns Examples
{
  "gateways": [
    {
      "name": "name",
      "url": "url",
      "region": "region"
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}