Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No pagination options for ListOriginCertificates #1478

Open
2 tasks done
Demonsthere opened this issue Jan 17, 2024 · 0 comments
Open
2 tasks done

No pagination options for ListOriginCertificates #1478

Demonsthere opened this issue Jan 17, 2024 · 0 comments

Comments

@Demonsthere
Copy link

Demonsthere commented Jan 17, 2024

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cloudflare-go version

0.80.0 and 0.86.0

Go environment

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/whoami/Library/Caches/go-build'
GOENV='/Users/whoami/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/whoami/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/whoami/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/opt/go/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/whoami/github/ory/cloud/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/cb/tjw9rzkd0y95s9xwkm4gfwlw0000gq/T/go-build195787705=/tmp/go-build -gno-record-gcc-switches -fno-common'

Expected output

When calling ListOriginCACertificates I would prefer to be able to get a list of all certificates, or be able to go page-by-page.

Actual output

When calling ListOriginCACertificates there is no option to add pagination options, which results in only getting 20 results from the API. The ListParams only supports zoneID

Code demonstrating the issue

# client is a wrapper for cloudflare.API
certs, err := client.API.ListOriginCACertificates(ctx, cloudflare.ListOriginCertificatesParams{ZoneID: client.ZoneID})
if err != nil {
    cmd.PrintErrf("Could not list certificates: %v\n", err)
    return err
}
cmd.Printf("Certs: %d", len(certs))

Steps to reproduce

  1. Create some sample certs (+20)
  2. List them in the API
  3. Only get first 20 results

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant