Skip to content

Commit 4acf0ca

Browse files
authored
feat(sdk): DSPX-2754 add DynamicValueMapping service client wrapper (#3635)
### Proposed Changes * Add the `sdkconnect` client wrapper for the new `DynamicValueMappingService` and register it on the SDK. * Bump `protocol/go` to **v0.34.0** (released from #3580), which carries the `policy/dynamicvaluemapping` package. This is the **sdk** step of the DSPX-2754 consumer split. Sequencing: 1. `protocol/go` protos + generated code (#3580) — merged, released as v0.34.0. 2. **sdk** wrapper (this PR) — depends on protocol/go v0.34.0. 3. service consumer (#3568) — depends on this sdk release; will bump `sdk` once it is released. ### Checklist - [ ] I have added or updated unit tests - [x] I have added or updated documentation (generated wrapper) ### Testing Instructions - `cd sdk && GOWORK=off go build ./... && GOWORK=off GOFLAGS=-mod=mod go mod tidy` (clean) - `make connect-wrapper-generate` produces no diff ### Related - Jira: https://virtru.atlassian.net/browse/DSPX-2754 - protocol PR: #3580 (merged) · consumer PR: #3568 (depends on this) Signed-off-by: Krish Suchak <suchak.krish@gmail.com>
1 parent fe7f787 commit 4acf0ca

5 files changed

Lines changed: 79 additions & 3 deletions

File tree

sdk/codegen/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ var clientsToGenerateList = []runner.ClientsToGenerate{
6666
GrpcClientInterface: "SubjectMappingServiceClient",
6767
GrpcPackagePath: "github.com/opentdf/platform/protocol/go/policy/subjectmapping",
6868
},
69+
{
70+
GrpcClientInterface: "DynamicValueMappingServiceClient",
71+
GrpcPackagePath: "github.com/opentdf/platform/protocol/go/policy/dynamicvaluemapping",
72+
},
6973
{
7074
GrpcClientInterface: "UnsafeServiceClient",
7175
GrpcPackagePath: "github.com/opentdf/platform/protocol/go/policy/unsafe",

sdk/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3
1212
github.com/lestrrat-go/jwx/v2 v2.1.6
1313
github.com/opentdf/platform/lib/ocrypto v0.12.0
14-
github.com/opentdf/platform/protocol/go v0.33.1
14+
github.com/opentdf/platform/protocol/go v0.34.0
1515
github.com/stretchr/testify v1.11.1
1616
github.com/xeipuuv/gojsonschema v1.2.0
1717
golang.org/x/oauth2 v0.36.0

sdk/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNB
5050
github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
5151
github.com/opentdf/platform/lib/ocrypto v0.12.0 h1:N449KWy7VdMO0JwfsrG0kM6Uy8VrEnVvBciwzRHwnlg=
5252
github.com/opentdf/platform/lib/ocrypto v0.12.0/go.mod h1:51UTmAWO6C8ghuMXiktpn63N+fLUQxY6zo8D65Ly0wQ=
53-
github.com/opentdf/platform/protocol/go v0.33.1 h1:nLg5D++Oo1hlgPD6nR+AchnfpkZeOQFGzJMz2MmJM4U=
54-
github.com/opentdf/platform/protocol/go v0.33.1/go.mod h1:6A0vQJ5D4ZTLReWAp8Y/7jTFzlYCmL/IfMJWDHZS6M0=
53+
github.com/opentdf/platform/protocol/go v0.34.0 h1:HJstzUyOnbE8c39UIAf3ASkjkkqLEMxy/D0oiUWuzSA=
54+
github.com/opentdf/platform/protocol/go v0.34.0/go.mod h1:6A0vQJ5D4ZTLReWAp8Y/7jTFzlYCmL/IfMJWDHZS6M0=
5555
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5656
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
5757
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=

sdk/sdk.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ type SDK struct {
9696
RegisteredResources sdkconnect.RegisteredResourcesServiceClient
9797
ResourceMapping sdkconnect.ResourceMappingServiceClient
9898
SubjectMapping sdkconnect.SubjectMappingServiceClient
99+
DynamicValueMapping sdkconnect.DynamicValueMappingServiceClient
99100
Unsafe sdkconnect.UnsafeServiceClient
100101
KeyManagement sdkconnect.KeyManagementServiceClient
101102
wellknownConfiguration sdkconnect.WellKnownServiceClient
@@ -229,6 +230,7 @@ func New(platformEndpoint string, opts ...Option) (*SDK, error) {
229230
RegisteredResources: sdkconnect.NewRegisteredResourcesServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),
230231
ResourceMapping: sdkconnect.NewResourceMappingServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),
231232
SubjectMapping: sdkconnect.NewSubjectMappingServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),
233+
DynamicValueMapping: sdkconnect.NewDynamicValueMappingServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),
232234
Unsafe: sdkconnect.NewUnsafeServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),
233235
KeyAccessServerRegistry: sdkconnect.NewKeyAccessServerRegistryServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),
234236
Authorization: sdkconnect.NewAuthorizationServiceClientConnectWrapper(platformConn.Client, platformConn.Endpoint, platformConn.Options...),

sdk/sdkconnect/dynamicvaluemapping.go

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)