Skip to content

Commit 0ea1f23

Browse files
authored
chore(k8s): switch total_count to uint64 (#2062)
1 parent 9dfdabf commit 0ea1f23

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

api/k8s/v1/k8s_sdk.go

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,26 +1362,26 @@ type ListClusterAvailableTypesResponse struct {
13621362
ClusterTypes []*ClusterType `json:"cluster_types"`
13631363

13641364
// TotalCount: total number of types.
1365-
TotalCount uint32 `json:"total_count"`
1365+
TotalCount uint64 `json:"total_count"`
13661366
}
13671367

13681368
// UnsafeGetTotalCount should not be used
13691369
// Internal usage only
1370-
func (r *ListClusterAvailableTypesResponse) UnsafeGetTotalCount() uint32 {
1370+
func (r *ListClusterAvailableTypesResponse) UnsafeGetTotalCount() uint64 {
13711371
return r.TotalCount
13721372
}
13731373

13741374
// UnsafeAppend should not be used
13751375
// Internal usage only
1376-
func (r *ListClusterAvailableTypesResponse) UnsafeAppend(res interface{}) (uint32, error) {
1376+
func (r *ListClusterAvailableTypesResponse) UnsafeAppend(res interface{}) (uint64, error) {
13771377
results, ok := res.(*ListClusterAvailableTypesResponse)
13781378
if !ok {
13791379
return 0, errors.New("%T type cannot be appended to type %T", res, r)
13801380
}
13811381

13821382
r.ClusterTypes = append(r.ClusterTypes, results.ClusterTypes...)
1383-
r.TotalCount += uint32(len(results.ClusterTypes))
1384-
return uint32(len(results.ClusterTypes)), nil
1383+
r.TotalCount += uint64(len(results.ClusterTypes))
1384+
return uint64(len(results.ClusterTypes)), nil
13851385
}
13861386

13871387
// ListClusterAvailableVersionsRequest: list cluster available versions request.
@@ -1414,29 +1414,29 @@ type ListClusterTypesRequest struct {
14141414
// ListClusterTypesResponse: list cluster types response.
14151415
type ListClusterTypesResponse struct {
14161416
// TotalCount: total number of cluster-types.
1417-
TotalCount uint32 `json:"total_count"`
1417+
TotalCount uint64 `json:"total_count"`
14181418

14191419
// ClusterTypes: paginated returned cluster-types.
14201420
ClusterTypes []*ClusterType `json:"cluster_types"`
14211421
}
14221422

14231423
// UnsafeGetTotalCount should not be used
14241424
// Internal usage only
1425-
func (r *ListClusterTypesResponse) UnsafeGetTotalCount() uint32 {
1425+
func (r *ListClusterTypesResponse) UnsafeGetTotalCount() uint64 {
14261426
return r.TotalCount
14271427
}
14281428

14291429
// UnsafeAppend should not be used
14301430
// Internal usage only
1431-
func (r *ListClusterTypesResponse) UnsafeAppend(res interface{}) (uint32, error) {
1431+
func (r *ListClusterTypesResponse) UnsafeAppend(res interface{}) (uint64, error) {
14321432
results, ok := res.(*ListClusterTypesResponse)
14331433
if !ok {
14341434
return 0, errors.New("%T type cannot be appended to type %T", res, r)
14351435
}
14361436

14371437
r.ClusterTypes = append(r.ClusterTypes, results.ClusterTypes...)
1438-
r.TotalCount += uint32(len(results.ClusterTypes))
1439-
return uint32(len(results.ClusterTypes)), nil
1438+
r.TotalCount += uint64(len(results.ClusterTypes))
1439+
return uint64(len(results.ClusterTypes)), nil
14401440
}
14411441

14421442
// ListClustersRequest: list clusters request.
@@ -1477,29 +1477,29 @@ type ListClustersRequest struct {
14771477
// ListClustersResponse: list clusters response.
14781478
type ListClustersResponse struct {
14791479
// TotalCount: total number of clusters.
1480-
TotalCount uint32 `json:"total_count"`
1480+
TotalCount uint64 `json:"total_count"`
14811481

14821482
// Clusters: paginated returned clusters.
14831483
Clusters []*Cluster `json:"clusters"`
14841484
}
14851485

14861486
// UnsafeGetTotalCount should not be used
14871487
// Internal usage only
1488-
func (r *ListClustersResponse) UnsafeGetTotalCount() uint32 {
1488+
func (r *ListClustersResponse) UnsafeGetTotalCount() uint64 {
14891489
return r.TotalCount
14901490
}
14911491

14921492
// UnsafeAppend should not be used
14931493
// Internal usage only
1494-
func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint32, error) {
1494+
func (r *ListClustersResponse) UnsafeAppend(res interface{}) (uint64, error) {
14951495
results, ok := res.(*ListClustersResponse)
14961496
if !ok {
14971497
return 0, errors.New("%T type cannot be appended to type %T", res, r)
14981498
}
14991499

15001500
r.Clusters = append(r.Clusters, results.Clusters...)
1501-
r.TotalCount += uint32(len(results.Clusters))
1502-
return uint32(len(results.Clusters)), nil
1501+
r.TotalCount += uint64(len(results.Clusters))
1502+
return uint64(len(results.Clusters)), nil
15031503
}
15041504

15051505
// ListNodesRequest: list nodes request.
@@ -1534,29 +1534,29 @@ type ListNodesRequest struct {
15341534
// ListNodesResponse: list nodes response.
15351535
type ListNodesResponse struct {
15361536
// TotalCount: total number of nodes.
1537-
TotalCount uint32 `json:"total_count"`
1537+
TotalCount uint64 `json:"total_count"`
15381538

15391539
// Nodes: paginated returned nodes.
15401540
Nodes []*Node `json:"nodes"`
15411541
}
15421542

15431543
// UnsafeGetTotalCount should not be used
15441544
// Internal usage only
1545-
func (r *ListNodesResponse) UnsafeGetTotalCount() uint32 {
1545+
func (r *ListNodesResponse) UnsafeGetTotalCount() uint64 {
15461546
return r.TotalCount
15471547
}
15481548

15491549
// UnsafeAppend should not be used
15501550
// Internal usage only
1551-
func (r *ListNodesResponse) UnsafeAppend(res interface{}) (uint32, error) {
1551+
func (r *ListNodesResponse) UnsafeAppend(res interface{}) (uint64, error) {
15521552
results, ok := res.(*ListNodesResponse)
15531553
if !ok {
15541554
return 0, errors.New("%T type cannot be appended to type %T", res, r)
15551555
}
15561556

15571557
r.Nodes = append(r.Nodes, results.Nodes...)
1558-
r.TotalCount += uint32(len(results.Nodes))
1559-
return uint32(len(results.Nodes)), nil
1558+
r.TotalCount += uint64(len(results.Nodes))
1559+
return uint64(len(results.Nodes)), nil
15601560
}
15611561

15621562
// ListPoolsRequest: list pools request.
@@ -1588,29 +1588,29 @@ type ListPoolsRequest struct {
15881588
// ListPoolsResponse: list pools response.
15891589
type ListPoolsResponse struct {
15901590
// TotalCount: total number of pools that exists for the cluster.
1591-
TotalCount uint32 `json:"total_count"`
1591+
TotalCount uint64 `json:"total_count"`
15921592

15931593
// Pools: paginated returned pools.
15941594
Pools []*Pool `json:"pools"`
15951595
}
15961596

15971597
// UnsafeGetTotalCount should not be used
15981598
// Internal usage only
1599-
func (r *ListPoolsResponse) UnsafeGetTotalCount() uint32 {
1599+
func (r *ListPoolsResponse) UnsafeGetTotalCount() uint64 {
16001600
return r.TotalCount
16011601
}
16021602

16031603
// UnsafeAppend should not be used
16041604
// Internal usage only
1605-
func (r *ListPoolsResponse) UnsafeAppend(res interface{}) (uint32, error) {
1605+
func (r *ListPoolsResponse) UnsafeAppend(res interface{}) (uint64, error) {
16061606
results, ok := res.(*ListPoolsResponse)
16071607
if !ok {
16081608
return 0, errors.New("%T type cannot be appended to type %T", res, r)
16091609
}
16101610

16111611
r.Pools = append(r.Pools, results.Pools...)
1612-
r.TotalCount += uint32(len(results.Pools))
1613-
return uint32(len(results.Pools)), nil
1612+
r.TotalCount += uint64(len(results.Pools))
1613+
return uint64(len(results.Pools)), nil
16141614
}
16151615

16161616
// ListVersionsRequest: list versions request.

0 commit comments

Comments
 (0)