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

Consistency in list functions #107

Open
m4dcoder opened this issue Apr 22, 2022 · 1 comment
Open

Consistency in list functions #107

m4dcoder opened this issue Apr 22, 2022 · 1 comment

Comments

@m4dcoder
Copy link

Looking at the following list functions, there are some inconsistencies in the input args. Some have filters while others not. Some filter use specific struct while another uses separate args. Most of the args start with limit and offset but then ListServicesByApplicationId starts with appId.

  • ListDelegates(limit int, offset int)
  • ListDelegatesWithFilters(limit int, offset int, name string, status graphql.DelegateStatus, delegateType graphql.DelegateType)
  • ListCloudProviders(limit int, offset int)
  • ListApplications(limit int, offset int)
  • ListServices(limit int, offset int, filters []*graphql.ServiceFilter)
  • ListServicesByApplicationId(appId string, limit int, offset int)

Like to propose the following changes.

  • ListServicesByApplicationId(limit int, offset int, appId string)
  • ListDelegatesWithFilters(limit int, offset int, filters[]*graphql.DelegateFilter)
@micahlmartin
Copy link
Contributor

@m4dcoder yeah this all makes sense. Until I added the ListServices I hadn't figured out how to do the filters properly. Now that the pattern is established it should be easier to add this to the other functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants