Skip to content

Commit

Permalink
feat: change per_page to 1000 (#2576)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jul 26, 2023
1 parent 96ec90e commit 55cb752
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}
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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}
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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type CreatePreheatJobRequest 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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
Name string `form:"name" binding:"omitempty,oneof=github google"`
ClientID string `form:"client_id" binding:"omitempty"`
}
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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

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=50"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type SignInRequest struct {
Expand Down

0 comments on commit 55cb752

Please sign in to comment.