summaryrefslogtreecommitdiff
path: root/app/domain/identifiable.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-23 11:50:42 -0600
committermo khan <mo@mokhan.ca>2025-07-23 11:50:42 -0600
commit944ef4ca499fe27a57d4cd3c21bccb99508526ca (patch)
tree3c929141ee07fc2a4f2c2b825630cb2ad3121b44 /app/domain/identifiable.go
parent8a1b03afb949a5a3be6a78e9b2c88d2e48643f46 (diff)
refactor: Update RequirePermission middleware to connect to spicedb CheckPermission API
Diffstat (limited to 'app/domain/identifiable.go')
-rw-r--r--app/domain/identifiable.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/domain/identifiable.go b/app/domain/identifiable.go
index 06bec07..190f20c 100644
--- a/app/domain/identifiable.go
+++ b/app/domain/identifiable.go
@@ -1,11 +1,15 @@
package domain
-import "github.com/xlgmokha/x/pkg/x"
+import (
+ v1 "github.com/authzed/authzed-go/proto/authzed/api/v1"
+ "github.com/xlgmokha/x/pkg/x"
+)
type Identifiable interface {
GetID() ID
SetID(id ID) error
ToGID() string
+ ToObjectReference() *v1.ObjectReference
}
func WithID[T Identifiable](id ID) x.Configure[T] {