internal/boundary: add GetResourceType to Resource
The resource type method is used to automatically create refresh tokens from a resource when that resource is the last item returned in a page. This also renames the iam domain ResourceType method to GetResourceType to align with the new method.
This commit is contained in:
1 parent
5cded25c8d
commit
0d39456418
36 files changed
+184
-21
No files matched your search
@@ -7,6 +7,7 @@ package boundary
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/boundary/internal/db/timestamp"
|
||||
"github.com/hashicorp/boundary/internal/types/resource"
|
||||
)
|
||||
|
||||
// An Entity is an object distinguished by its identity, rather than its
|
||||
@@ -24,11 +25,12 @@ type Aggregate interface {
|
||||
GetUpdateTime() *timestamp.Timestamp
|
||||
}
|
||||
|
||||
// A Resource is an aggregate with a name and description.
|
||||
// A Resource is an aggregate with a name, description, and resource type.
|
||||
type Resource interface {
|
||||
Aggregate
|
||||
GetName() string
|
||||
GetDescription() string
|
||||
GetResourceType() resource.Type
|
||||
}
|
||||
|
||||
// AuthzProtectedEntity is used by some functions (primarily
|
||||
|
||||
Reference in new issue
Block a user