From cb83063323ddb39096ccd7cf9327e86b33578328 Mon Sep 17 00:00:00 2001 From: Gaius Date: Mon, 21 Aug 2023 16:55:42 +0800 Subject: [PATCH] feat: change max PerPage to 10000000 Signed-off-by: Gaius --- manager/types/application.go | 2 +- manager/types/cluster.go | 2 +- manager/types/config.go | 2 +- manager/types/job.go | 2 +- manager/types/model.go | 2 +- manager/types/oauth.go | 2 +- manager/types/persional_access_token.go | 2 +- manager/types/scheduler.go | 2 +- manager/types/scheduler_cluster.go | 2 +- manager/types/seed_peer.go | 2 +- manager/types/seed_peer_cluster.go | 2 +- manager/types/user.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manager/types/application.go b/manager/types/application.go index 56f2251019f..8ed35fb3aba 100644 --- a/manager/types/application.go +++ b/manager/types/application.go @@ -39,7 +39,7 @@ type UpdateApplicationRequest struct { type GetApplicationsQuery struct { Name string `form:"name" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } type PriorityConfig struct { diff --git a/manager/types/cluster.go b/manager/types/cluster.go index b46d0a2d59f..99bc66a0c30 100644 --- a/manager/types/cluster.go +++ b/manager/types/cluster.go @@ -90,5 +90,5 @@ type GetClusterResponse struct { type GetClustersQuery struct { Name string `form:"name" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } diff --git a/manager/types/config.go b/manager/types/config.go index b24de88fc9f..0bda8375b88 100644 --- a/manager/types/config.go +++ b/manager/types/config.go @@ -44,5 +44,5 @@ type GetConfigsQuery struct { Value string `form:"value" binding:"omitempty"` UserID uint `form:"user_id" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } diff --git a/manager/types/job.go b/manager/types/job.go index 234b2fb0032..b0c2fbbe120 100644 --- a/manager/types/job.go +++ b/manager/types/job.go @@ -40,7 +40,7 @@ type GetJobsQuery struct { State string `form:"state" binding:"omitempty,oneof=PENDING RECEIVED STARTED RETRY SUCCESS FAILURE"` UserID uint `form:"user_id" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } type CreatePreheatJobRequest struct { diff --git a/manager/types/model.go b/manager/types/model.go index 143b559c037..80178fa615b 100644 --- a/manager/types/model.go +++ b/manager/types/model.go @@ -52,7 +52,7 @@ type GetModelsQuery struct { Version string `json:"version" binding:"omitempty"` SchedulerID uint `json:"scheduler_id" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } type ModelEvaluation struct { diff --git a/manager/types/oauth.go b/manager/types/oauth.go index 270f667ac20..f78fcf075eb 100644 --- a/manager/types/oauth.go +++ b/manager/types/oauth.go @@ -38,7 +38,7 @@ type UpdateOauthRequest struct { type GetOauthsQuery struct { Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` Name string `form:"name" binding:"omitempty,oneof=github google"` ClientID string `form:"client_id" binding:"omitempty"` } diff --git a/manager/types/persional_access_token.go b/manager/types/persional_access_token.go index 5fbf07a913d..f77fda3ee6f 100644 --- a/manager/types/persional_access_token.go +++ b/manager/types/persional_access_token.go @@ -55,5 +55,5 @@ type GetPersonalAccessTokensQuery struct { State string `form:"state" binding:"omitempty,oneof=active inactive"` UserID uint `form:"user_id" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } diff --git a/manager/types/scheduler.go b/manager/types/scheduler.go index 6f86ba04ca7..35c2bc20c3f 100644 --- a/manager/types/scheduler.go +++ b/manager/types/scheduler.go @@ -55,7 +55,7 @@ type UpdateSchedulerRequest struct { type GetSchedulersQuery struct { Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` Hostname string `form:"host_name" binding:"omitempty"` IDC string `form:"idc" binding:"omitempty"` Location string `form:"location" binding:"omitempty"` diff --git a/manager/types/scheduler_cluster.go b/manager/types/scheduler_cluster.go index c4c3e2ef6f0..7ccef86792a 100644 --- a/manager/types/scheduler_cluster.go +++ b/manager/types/scheduler_cluster.go @@ -48,7 +48,7 @@ type UpdateSchedulerClusterRequest struct { type GetSchedulerClustersQuery struct { Name string `form:"name" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } type SchedulerClusterConfig struct { diff --git a/manager/types/seed_peer.go b/manager/types/seed_peer.go index 6cc8b9bdd00..cc7475647c4 100644 --- a/manager/types/seed_peer.go +++ b/manager/types/seed_peer.go @@ -54,6 +54,6 @@ type GetSeedPeersQuery struct { ObjectStoragePort int32 `form:"object_storage_port" binding:"omitempty"` SeedPeerClusterID uint `form:"seed_peer_cluster_id" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` State string `form:"state" binding:"omitempty,oneof=active inactive"` } diff --git a/manager/types/seed_peer_cluster.go b/manager/types/seed_peer_cluster.go index 6bb1341c1c1..8d59800ce72 100644 --- a/manager/types/seed_peer_cluster.go +++ b/manager/types/seed_peer_cluster.go @@ -45,7 +45,7 @@ type UpdateSeedPeerClusterRequest struct { type GetSeedPeerClustersQuery struct { Name string `form:"name" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } type SeedPeerClusterConfig struct { diff --git a/manager/types/user.go b/manager/types/user.go index bc35b458870..d78432631ad 100644 --- a/manager/types/user.go +++ b/manager/types/user.go @@ -34,7 +34,7 @@ type GetUsersQuery struct { Location string `form:"location" binding:"omitempty"` State string `form:"state" binding:"omitempty"` Page int `form:"page" binding:"omitempty,gte=1"` - PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"` + PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"` } type SignInRequest struct {