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

✨ Binding: add filter builder. #463

Merged
merged 10 commits into from
Jul 28, 2023
Merged

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jul 27, 2023

Add support for building filter queries.

Example:

filter = binding.Filter{}
filter.And("name").Eq("Elmer")
filter.And("age").Gt(10)
filter.And("height").Lt(44)
filter.And("weight").LtEq(150)
filter.And("hair").NotEq("blond")
filter.And("pet").Like("Rov*")
filter.And("friend").Eq(Any{"Sam","Ed"})
p := filter.Param()
client.Get(path, object, p)

Adds binding.RuleSet.Find() needed by analyzer addon to get rulesets for labels.
Example:

filter.And("labels").Eq(labels)

jortel added 9 commits July 27, 2023 12:26
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
@jortel jortel marked this pull request as ready for review July 27, 2023 21:50
Signed-off-by: Jeff Ortel <jortel@redhat.com>
@jortel jortel requested a review from mansam July 28, 2023 04:02
Copy link
Member

@aufi aufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants