From 50c8ec9c54deb70115e2d88e86d2e272ad83e7cc Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Thu, 12 Jun 2025 05:07:27 +0000 Subject: [PATCH] Add more options to carry RBAC info of Route Signed-off-by: Prabhjot Singh Sethi --- model/route.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/model/route.go b/model/route.go index 62c940b..3f31732 100644 --- a/model/route.go +++ b/model/route.go @@ -12,8 +12,11 @@ import ( // Route represents an HTTP route with a URL and HTTP method. // The Method field uses the custom MethodType defined in the route package. type Route struct { - Url string // The URL path for the route (e.g., "/api/v1/resource") - Method route.MethodType // The HTTP method for the route (e.g., route.GET, route.POST) + Url string // The URL path for the route (e.g., "/api/v1/resource") + Method route.MethodType // The HTTP method for the route (e.g., route.GET, route.POST) + Resource string // name of the resource represented by route + Verb string // Action of verb corresponding to this API + Scopes []string // Scope for the resource, with top level scope being first in the list and so on, empty slice indicates no scope or tenant level access } // NewRoute creates a new Route instance from a URL and HTTP method string.