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: Inspect policies in the store #47

Merged
merged 3 commits into from
Apr 8, 2024
Merged

Conversation

oguzhand95
Copy link
Member

To prevent name conflicts between function names of the type InspectPoliciesOption func(*requestv1.InspectPoliciesRequest) and type ListPoliciesOption func(*requestv1.ListPoliciesRequest), I prefixed the formers' function names with InspectPoliciesWith. I am not sure if this is a good idea or not.

@oguzhand95 oguzhand95 self-assigned this Apr 4, 2024
Copy link
Contributor

@charithe charithe left a comment

Choose a reason for hiding this comment

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

Since both ListPolicies and InspectPolicies have the same set of filtering options, it'd better to introduce a new type called FilterOptions and share that with both functions. We should be able to add a type alias for ListPoliciesOption = FilterOptions to avoid breaking existing clients.

Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
cerbos/model.go Outdated Show resolved Hide resolved
Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
@oguzhand95 oguzhand95 merged commit 00afe19 into cerbos:main Apr 8, 2024
6 checks passed
@oguzhand95 oguzhand95 deleted the inspect branch April 8, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants