From 20ef0d92694465ac86b550df139e8366a0a2b4fa Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 22 Jul 2025 17:35:49 -0600 Subject: feat: connect to spicedb --- .../github.com/authzed/spicedb/pkg/spiceerrors/util.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vendor/github.com/authzed/spicedb/pkg/spiceerrors/util.go (limited to 'vendor/github.com/authzed/spicedb/pkg/spiceerrors/util.go') diff --git a/vendor/github.com/authzed/spicedb/pkg/spiceerrors/util.go b/vendor/github.com/authzed/spicedb/pkg/spiceerrors/util.go new file mode 100644 index 0000000..744e41b --- /dev/null +++ b/vendor/github.com/authzed/spicedb/pkg/spiceerrors/util.go @@ -0,0 +1,18 @@ +package spiceerrors + +import ( + "maps" +) + +type WithMetadata interface { + DetailsMetadata() map[string]string +} + +// CombineMetadata combines the metadata found on an existing error with that given. +func CombineMetadata(withMetadata WithMetadata, metadata map[string]string) map[string]string { + clone := maps.Clone(withMetadata.DetailsMetadata()) + for key, value := range metadata { + clone[key] = value + } + return clone +} -- cgit v1.2.3