From ad59afff3e9a41117717e6c285435903b23f1bdc Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 23 Apr 2024 15:27:41 +0200 Subject: [PATCH] fix starting page index --- cloudconnexa/connectors.go | 2 +- cloudconnexa/dns_records.go | 2 +- cloudconnexa/hosts.go | 2 +- cloudconnexa/ip_services.go | 2 +- cloudconnexa/networks.go | 2 +- cloudconnexa/routes.go | 2 +- cloudconnexa/user_groups.go | 2 +- cloudconnexa/users.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cloudconnexa/connectors.go b/cloudconnexa/connectors.go index d1daec4..96ea9ba 100644 --- a/cloudconnexa/connectors.go +++ b/cloudconnexa/connectors.go @@ -55,7 +55,7 @@ func (c *ConnectorsService) GetByPage(page int, pageSize int) (ConnectorPageResp func (c *ConnectorsService) List() ([]Connector, error) { var allConnectors []Connector - page := 1 + page := 0 pageSize := 10 for { diff --git a/cloudconnexa/dns_records.go b/cloudconnexa/dns_records.go index f12dd74..11237fd 100644 --- a/cloudconnexa/dns_records.go +++ b/cloudconnexa/dns_records.go @@ -49,7 +49,7 @@ func (c *DNSRecordsService) GetByPage(page int, pageSize int) (DnsRecordPageResp func (c *DNSRecordsService) GetDnsRecord(recordId string) (*DnsRecord, error) { pageSize := 10 - page := 1 + page := 0 for { response, err := c.GetByPage(page, pageSize) diff --git a/cloudconnexa/hosts.go b/cloudconnexa/hosts.go index e219ac0..672e6f4 100644 --- a/cloudconnexa/hosts.go +++ b/cloudconnexa/hosts.go @@ -50,7 +50,7 @@ func (c *HostsService) GetHostsByPage(page int, size int) (HostPageResponse, err func (c *HostsService) List() ([]Host, error) { var allHosts []Host pageSize := 10 - page := 1 + page := 0 for { response, err := c.GetHostsByPage(page, pageSize) diff --git a/cloudconnexa/ip_services.go b/cloudconnexa/ip_services.go index 2081a2b..411a327 100644 --- a/cloudconnexa/ip_services.go +++ b/cloudconnexa/ip_services.go @@ -75,7 +75,7 @@ func (c *IPServicesService) GetIPByPage(page int, pageSize int) (IPServicePageRe func (c *IPServicesService) List() ([]IPService, error) { var allIPServices []IPService - page := 1 + page := 0 pageSize := 10 for { diff --git a/cloudconnexa/networks.go b/cloudconnexa/networks.go index 77244ef..de8b30b 100644 --- a/cloudconnexa/networks.go +++ b/cloudconnexa/networks.go @@ -64,7 +64,7 @@ func (c *NetworksService) GetByPage(page int, size int) (NetworkPageResponse, er func (c *NetworksService) List() ([]Network, error) { var allNetworks []Network pageSize := 10 - page := 1 + page := 0 for { response, err := c.GetByPage(page, pageSize) diff --git a/cloudconnexa/routes.go b/cloudconnexa/routes.go index b4b469e..e3c20bb 100644 --- a/cloudconnexa/routes.go +++ b/cloudconnexa/routes.go @@ -51,7 +51,7 @@ func (c *RoutesService) GetByPage(networkId string, page int, size int) (RoutePa func (c *RoutesService) List(networkId string) ([]Route, error) { var allRoutes []Route pageSize := 10 - page := 1 + page := 0 for { response, err := c.GetByPage(networkId, page, pageSize) diff --git a/cloudconnexa/user_groups.go b/cloudconnexa/user_groups.go index 450da9b..03b6f16 100644 --- a/cloudconnexa/user_groups.go +++ b/cloudconnexa/user_groups.go @@ -52,7 +52,7 @@ func (c *UserGroupsService) GetByPage(page int, pageSize int) (UserGroupPageResp func (c *UserGroupsService) List() ([]UserGroup, error) { var allUserGroups []UserGroup pageSize := 10 - page := 1 + page := 0 for { response, err := c.GetByPage(page, pageSize) diff --git a/cloudconnexa/users.go b/cloudconnexa/users.go index 62b7fc6..cd1d2f4 100644 --- a/cloudconnexa/users.go +++ b/cloudconnexa/users.go @@ -62,7 +62,7 @@ func (c *UsersService) GetByPage(page int, pageSize int) (UserPageResponse, erro func (c *UsersService) List(username string, role string) (*User, error) { pageSize := 10 - page := 1 + page := 0 for { response, err := c.GetByPage(page, pageSize)