Skip to content

Commit

Permalink
Remove common parameters defined already
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Freudl <[email protected]>
  • Loading branch information
freudl committed May 23, 2024
1 parent 0a3e48c commit 61eb1ee
Show file tree
Hide file tree
Showing 30 changed files with 94 additions and 175 deletions.
19 changes: 8 additions & 11 deletions client/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ type AppClient commonClient
type AppListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
SpaceGUIDs Filter `qs:"space_guids"`
Stacks Filter `qs:"stacks"`
LifecycleType resource.LifecycleType `qs:"lifecycle_type"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`

Include resource.AppIncludeType `qs:"include"`
GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
SpaceGUIDs Filter `qs:"space_guids"`
Stacks Filter `qs:"stacks"`

LifecycleType resource.LifecycleType `qs:"lifecycle_type"`
Include resource.AppIncludeType `qs:"include"`
}

// NewAppListOptions creates new options to pass to list
Expand Down
5 changes: 2 additions & 3 deletions client/app_usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ type AppUsageClient commonClient
type AppUsageListOptions struct {
*ListOptions

AfterGUID string `qs:"after_guid"`
GUIDs Filter `qs:"guids"`
CreatedAts TimestampFilter `qs:"created_ats"`
AfterGUID string `qs:"after_guid"`
GUIDs Filter `qs:"guids"`
}

// NewAppUsageOptions creates new options to pass to list
Expand Down
2 changes: 0 additions & 2 deletions client/audit_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ type AuditEventListOptions struct {
TargetGUIDs ExclusionFilter `qs:"target_guids"` // list of target guids to filter by
OrganizationGUIDs Filter `qs:"organization_guids"`
SpaceGUIDs Filter `qs:"space_guids"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
}

// NewAuditEventListOptions creates new options to pass to list
Expand Down
7 changes: 2 additions & 5 deletions client/buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ type BuildpackClient commonClient
type BuildpackListOptions struct {
*ListOptions

Names Filter `qs:"names"` // list of buildpack names to filter by
Stacks Filter `qs:"stacks"` // list of stack names to filter by
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
Names Filter `qs:"names"` // list of buildpack names to filter by
Stacks Filter `qs:"stacks"` // list of stack names to filter by
}

// NewBuildpackListOptions creates new options to pass to list
Expand Down
11 changes: 4 additions & 7 deletions client/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ type DeploymentClient commonClient
type DeploymentListOptions struct {
*ListOptions

AppGUIDs Filter `qs:"app_guids"`
States Filter `qs:"states"`
StatusReasons Filter `qs:"status_reasons"`
StatusValues Filter `qs:"status_values"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
AppGUIDs Filter `qs:"app_guids"`
States Filter `qs:"states"`
StatusReasons Filter `qs:"status_reasons"`
StatusValues Filter `qs:"status_values"`
}

// NewDeploymentListOptions creates new options to pass to list
Expand Down
9 changes: 3 additions & 6 deletions client/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ type DomainClient commonClient
type DomainListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
}

// NewDomainListOptions creates new options to pass to list
Expand Down
13 changes: 5 additions & 8 deletions client/droplet.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ type DropletClient commonClient
type DropletListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"` // list of droplet guids to filter by
States Filter `qs:"states"` // list of droplet states to filter by
AppGUIDs Filter `qs:"app_guids"` // list of app guids to filter by
SpaceGUIDs Filter `qs:"space_guids"` // list of space guids to filter by
OrganizationGUIDs Filter `qs:"organization_guids"` // list of organization guids to filter by
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"` // list of droplet guids to filter by
States Filter `qs:"states"` // list of droplet states to filter by
AppGUIDs Filter `qs:"app_guids"` // list of app guids to filter by
SpaceGUIDs Filter `qs:"space_guids"` // list of space guids to filter by
OrganizationGUIDs Filter `qs:"organization_guids"` // list of organization guids to filter by
}

// NewDropletListOptions creates new options to pass to list
Expand Down
1 change: 0 additions & 1 deletion client/feature_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type FeatureFlagClient commonClient
// FeatureFlagListOptions list filters
type FeatureFlagListOptions struct {
*ListOptions
UpdatedAts TimestampFilter `qs:"updated_ats"`
}

// NewFeatureFlagListOptions creates new options to pass to list
Expand Down
9 changes: 3 additions & 6 deletions client/isolation_segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ type IsolationSegmentClient commonClient
type IsolationSegmentListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
}

// NewIsolationSegmentOptions creates new options to pass to list
Expand Down
7 changes: 2 additions & 5 deletions client/organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ type OrganizationClient commonClient
type OrganizationListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"` // list of organization guids to filter by
Names Filter `qs:"names"` // list of organization names to filter by
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"` // list of organization guids to filter by
Names Filter `qs:"names"` // list of organization names to filter by
}

// NewOrganizationListOptions creates new options to pass to list
Expand Down
8 changes: 3 additions & 5 deletions client/organization_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ type OrganizationQuotaClient commonClient
type OrganizationQuotaListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"`
Names Filter `qs:"names"`
OrganizationGUIDs Filter `qs:"organization_guids"`
}

// NewOrganizationQuotaListOptions creates new options to pass to list
Expand Down
15 changes: 6 additions & 9 deletions client/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ type PackageClient commonClient
type PackageListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"` // list of package guids to filter by
States Filter `qs:"states"` // list of package states to filter by
Types Filter `qs:"types"` // list of package types to filter by, docker or bits
AppGUIDs Filter `qs:"app_guids"` // list of app guids to filter by
SpaceGUIDs Filter `qs:"space_guids"` // list of space guids to filter by
OrganizationGUIDs Filter `qs:"organization_guids"` // list of organization guids to filter by
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"` // list of package guids to filter by
States Filter `qs:"states"` // list of package states to filter by
Types Filter `qs:"types"` // list of package types to filter by, docker or bits
AppGUIDs Filter `qs:"app_guids"` // list of app guids to filter by
SpaceGUIDs Filter `qs:"space_guids"` // list of space guids to filter by
OrganizationGUIDs Filter `qs:"organization_guids"` // list of organization guids to filter by
}

// NewPackageListOptions creates new options to pass to list
Expand Down
13 changes: 5 additions & 8 deletions client/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ type ProcessClient commonClient
type ProcessListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"`
Types Filter `qs:"types"`
AppGUIDs Filter `qs:"app_guids"`
SpaceGUIDs Filter `qs:"space_guids"`
OrganizationGUIDs Filter `qs:"organization_guids"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"`
Types Filter `qs:"types"`
AppGUIDs Filter `qs:"app_guids"`
SpaceGUIDs Filter `qs:"space_guids"`
OrganizationGUIDs Filter `qs:"organization_guids"`
}

// NewProcessOptions creates new options to pass to list
Expand Down
5 changes: 1 addition & 4 deletions client/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ type RevisionClient commonClient
type RevisionListOptions struct {
*ListOptions

Versions Filter `qs:"versions"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
Versions Filter `qs:"versions"`
}

// NewRevisionListOptions creates new options to pass to list
Expand Down
12 changes: 5 additions & 7 deletions client/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ type RoleClient commonClient
type RoleListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"` // list of role guids to filter by
Types Filter `qs:"types"` // list of role types to filter by
OrganizationGUIDs Filter `qs:"organization_guids"` // list of organization guids to filter by
SpaceGUIDs Filter `qs:"space_guids"` // list of space guids to filter by
UserGUIDs Filter `qs:"user_guids"` // list of user guids to filter by
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"` // list of role guids to filter by
Types Filter `qs:"types"` // list of role types to filter by
OrganizationGUIDs Filter `qs:"organization_guids"` // list of organization guids to filter by
SpaceGUIDs Filter `qs:"space_guids"` // list of space guids to filter by
UserGUIDs Filter `qs:"user_guids"` // list of user guids to filter by

Include resource.RoleIncludeType `qs:"include"`
}
Expand Down
9 changes: 3 additions & 6 deletions client/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ type RouteListOptions struct {
OrganizationGUIDs Filter `qs:"organization_guids"`
ServiceInstanceGUIDs Filter `qs:"service_instance_guids"`

Hosts Filter `qs:"hosts"`
Paths Filter `qs:"paths"`
Ports Filter `qs:"ports"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
Hosts Filter `qs:"hosts"`
Paths Filter `qs:"paths"`
Ports Filter `qs:"ports"`

Include resource.RouteIncludeType `qs:"include"`
}
Expand Down
3 changes: 0 additions & 3 deletions client/security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ type SecurityGroupListOptions struct {

GloballyEnabledRunning *bool `qs:"globally_enabled_running"` // If true, only include the security groups that are enabled for running
GloballyEnabledStaging *bool `qs:"globally_enabled_staging"` // If true, only include the security groups that are enabled for staging

CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
}

// NewSecurityGroupListOptions creates new options to pass to list
Expand Down
7 changes: 2 additions & 5 deletions client/service_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ type ServiceBrokerClient commonClient
type ServiceBrokerListOptions struct {
*ListOptions

SpaceGUIDs Filter `qs:"space_guids"`
Names Filter `qs:"names"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
SpaceGUIDs Filter `qs:"space_guids"`
Names Filter `qs:"names"`
}

// NewServiceBrokerListOptions creates new options to pass to list
Expand Down
5 changes: 1 addition & 4 deletions client/service_credential_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ type ServiceCredentialBindingListOptions struct {
Type Filter `qs:"type"` // list of service credential binding types to filter by, app or key
GUIDs Filter `qs:"guids"` // list of service route binding guids to filter by

LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
Include resource.ServiceCredentialBindingIncludeType `qs:"include"`
Include resource.ServiceCredentialBindingIncludeType `qs:"include"`
}

// NewServiceCredentialBindingListOptions creates new options to pass to list
Expand Down
4 changes: 0 additions & 4 deletions client/service_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ type ServiceInstanceListOptions struct {
OrganizationGUIDs Filter `qs:"organization_guids"`
ServicePlanGUIDs Filter `qs:"service_plan_guids"`
ServicePlanNames Filter `qs:"service_plan_names"`

LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
}

// NewServiceInstanceListOptions creates new options to pass to list
Expand Down
15 changes: 6 additions & 9 deletions client/service_offering.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ type ServiceOfferingClient commonClient
type ServiceOfferingListOptions struct {
*ListOptions

Names Filter `qs:"names"`
ServiceBrokerGUIDs Filter `qs:"service_broker_guids"`
ServiceBrokerNames Filter `qs:"service_broker_names"`
SpaceGUIDs Filter `qs:"space_guids"`
OrganizationGUIDs Filter `qs:"organization_guids"`
Available *bool `qs:"available"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
Names Filter `qs:"names"`
ServiceBrokerGUIDs Filter `qs:"service_broker_guids"`
ServiceBrokerNames Filter `qs:"service_broker_names"`
SpaceGUIDs Filter `qs:"space_guids"`
OrganizationGUIDs Filter `qs:"organization_guids"`
Available *bool `qs:"available"`
}

// NewServiceOfferingListOptions creates new options to pass to list
Expand Down
22 changes: 10 additions & 12 deletions client/service_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ type ServicePlanClient commonClient
type ServicePlanListOptions struct {
*ListOptions

Names Filter `qs:"names"`
BrokerCatalogIDs Filter `qs:"broker_catalog_ids"`
SpaceGUIDs Filter `qs:"space_guids"`
OrganizationGUIDs Filter `qs:"organization_guids"`
ServiceBrokerGUIDs Filter `qs:"service_broker_guids"`
ServiceBrokerNames Filter `qs:"service_broker_names"`
ServiceOfferingGUIDs Filter `qs:"service_offering_guids"`
ServiceOfferingNames Filter `qs:"service_offering_names"`
ServiceInstanceGUIDs Filter `qs:"service_instance_guids"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
Names Filter `qs:"names"`
BrokerCatalogIDs Filter `qs:"broker_catalog_ids"`
SpaceGUIDs Filter `qs:"space_guids"`
OrganizationGUIDs Filter `qs:"organization_guids"`
ServiceBrokerGUIDs Filter `qs:"service_broker_guids"`
ServiceBrokerNames Filter `qs:"service_broker_names"`
ServiceOfferingGUIDs Filter `qs:"service_offering_guids"`
ServiceOfferingNames Filter `qs:"service_offering_names"`
ServiceInstanceGUIDs Filter `qs:"service_instance_guids"`
Available *bool `qs:"available"`

Include resource.ServicePlanIncludeType `qs:"include"`
}
Expand Down
11 changes: 4 additions & 7 deletions client/service_route_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ type ServiceRouteBindingClient commonClient
type ServiceRouteBindingListOptions struct {
*ListOptions

GUIDs Filter `qs:"guids"`
RouteGUIDs Filter `qs:"route_guids"`
ServiceInstanceGUIDs Filter `qs:"service_instance_guids"`
ServiceInstanceNames Filter `qs:"service_instance_names"`
LabelSel LabelSelector `qs:"label_selector"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
GUIDs Filter `qs:"guids"`
RouteGUIDs Filter `qs:"route_guids"`
ServiceInstanceGUIDs Filter `qs:"service_instance_guids"`
ServiceInstanceNames Filter `qs:"service_instance_names"`

Include resource.ServiceRouteBindingIncludeType `qs:"include"`
}
Expand Down
10 changes: 4 additions & 6 deletions client/service_usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ type ServiceUsageClient commonClient
type ServiceUsageListOptions struct {
*ListOptions

AfterGUID string `qs:"after_guid"`
GUIDs Filter `qs:"guids"`
ServiceInstanceTypes Filter `qs:"service_instance_types"`
ServiceOfferingGUIDs Filter `qs:"service_offering_guids"`
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
AfterGUID string `qs:"after_guid"`
GUIDs Filter `qs:"guids"`
ServiceInstanceTypes Filter `qs:"service_instance_types"`
ServiceOfferingGUIDs Filter `qs:"service_offering_guids"`
}

// NewServiceUsageOptions creates new options to pass to list
Expand Down
2 changes: 0 additions & 2 deletions client/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ type SidecarClient commonClient
// SidecarListOptions list filters
type SidecarListOptions struct {
*ListOptions
CreatedAts TimestampFilter `qs:"created_ats"`
UpdatedAts TimestampFilter `qs:"updated_ats"`
}

// NewSidecarListOptions creates new options to pass to list
Expand Down
Loading

0 comments on commit 61eb1ee

Please sign in to comment.