Skip to content

Commit 8e0b0e0

Browse files
break: use uint32 for page_size
1 parent 0aa4eea commit 8e0b0e0

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

scw/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Client struct {
3030
defaultOrganizationID *string
3131
defaultRegion *Region
3232
defaultZone *Zone
33-
defaultPageSize *int32
33+
defaultPageSize *uint32
3434
}
3535

3636
func defaultOptions() []ClientOption {
@@ -114,7 +114,7 @@ func (c *Client) GetDefaultZone() (Zone, bool) {
114114
// GetDefaultPageSize return the default page size of the client.
115115
// This value can be set in the client option
116116
// WithDefaultPageSize(). Be aware this value can be empty.
117-
func (c *Client) GetDefaultPageSize() (int32, bool) {
117+
func (c *Client) GetDefaultPageSize() (uint32, bool) {
118118
if c.defaultPageSize != nil {
119119
return *c.defaultPageSize, true
120120
}

scw/client_option.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,23 @@ func WithDefaultZone(zone Zone) ClientOption {
140140
// WithDefaultPageSize client option overrides the default page size of the SDK.
141141
//
142142
// It will be used as the default value of the page_size field in all requests made with this client.
143-
func WithDefaultPageSize(pageSize int32) ClientOption {
143+
func WithDefaultPageSize(pageSize uint32) ClientOption {
144144
return func(s *settings) {
145145
s.defaultPageSize = &pageSize
146146
}
147147
}
148148

149149
// settings hold the values of all client options
150150
type settings struct {
151-
apiURL string
152-
token auth.Auth
153-
userAgent string
154-
httpClient httpClient
155-
insecure bool
151+
apiURL string
152+
token auth.Auth
153+
userAgent string
154+
httpClient httpClient
155+
insecure bool
156156
defaultOrganizationID *string
157-
defaultRegion *Region
158-
defaultZone *Zone
159-
defaultPageSize *int32
157+
defaultRegion *Region
158+
defaultZone *Zone
159+
defaultPageSize *uint32
160160
}
161161

162162
func newSettings() *settings {

0 commit comments

Comments
 (0)