summaryrefslogtreecommitdiff
path: root/pkg/rpc/ability_handler.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-02 10:34:41 -0600
committermo khan <mo@mokhan.ca>2025-04-02 10:34:41 -0600
commit60b090e16fdd0f65e7be40ade81cae7ab818b0ea (patch)
tree08f6a5c5bd002177535567408e1100027ff9f1a0 /pkg/rpc/ability_handler.go
parentc75ceda92ce98c654747457c4fdfd32766487653 (diff)
refactor: rename handler to service
Diffstat (limited to 'pkg/rpc/ability_handler.go')
-rw-r--r--pkg/rpc/ability_handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/rpc/ability_handler.go b/pkg/rpc/ability_handler.go
index 973e1db..bf299da 100644
--- a/pkg/rpc/ability_handler.go
+++ b/pkg/rpc/ability_handler.go
@@ -7,15 +7,15 @@ import (
"gitlab.com/mokhax/spike/pkg/policies"
)
-type AbilityHandler struct {
+type AbilityService struct {
UnimplementedAbilityServer
}
-func NewAbilityHandler() *AbilityHandler {
- return &AbilityHandler{}
+func NewAbilityService() *AbilityService {
+ return &AbilityService{}
}
-func (h *AbilityHandler) Allowed(ctx context.Context, req *AllowRequest) (*AllowReply, error) {
+func (h *AbilityService) Allowed(ctx context.Context, req *AllowRequest) (*AllowReply, error) {
ok := policies.Allowed(cedar.Request{
Principal: cedar.NewEntityUID("User", cedar.String(req.Subject)),
Action: cedar.NewEntityUID("Action", cedar.String(req.Permission)),