Skip to content

Commit

Permalink
feat: change max PerPage to 10000000 (#2653)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Aug 21, 2023
1 parent bf6e08b commit 35da7a7
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion manager/types/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manager/types/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion manager/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion manager/types/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manager/types/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manager/types/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion manager/types/persional_access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion manager/types/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion manager/types/scheduler_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manager/types/seed_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion manager/types/seed_peer_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manager/types/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 35da7a7

Please sign in to comment.