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
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
"github.com/hashicorp/boundary/internal/libs/crypto"
|
||||
"github.com/hashicorp/boundary/internal/oplog"
|
||||
"github.com/hashicorp/boundary/internal/types/resource"
|
||||
wrapping "github.com/hashicorp/go-kms-wrapping/v2"
|
||||
"github.com/hashicorp/go-kms-wrapping/v2/extras/structwrapping"
|
||||
kvbuilder "github.com/hashicorp/go-secure-stdlib/kv-builder"
|
||||
@@ -196,6 +197,11 @@ func (a *AuthMethod) SetTableName(n string) {
|
||||
a.tableName = n
|
||||
}
|
||||
|
||||
// GetResourceType returns the resource type of the AuthMethod
|
||||
func (a *AuthMethod) GetResourceType() resource.Type {
|
||||
return resource.AuthMethod
|
||||
}
|
||||
|
||||
// oplog will create oplog metadata for the AuthMethod.
|
||||
func (a *AuthMethod) oplog(op oplog.OpType) oplog.Metadata {
|
||||
metadata := oplog.Metadata{
|
||||
|
||||
Reference in new issue
Block a user