Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change max PerPage to 10000000 #2653

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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