Skip to content

Commit 93addaa

Browse files
committed
Update 2.10.0
1 parent bc311d7 commit 93addaa

File tree

6 files changed

+66
-50
lines changed

6 files changed

+66
-50
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.0
1+
2.10.0

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/formalco/go-sdk/v2
22

3-
go 1.23
3+
go 1.24
44

55
require github.com/dave/jennifer v1.7.1

sdk/client.go

Lines changed: 0 additions & 15 deletions
This file was deleted.

sdk/go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module github.com/formalco/go-sdk/sdk/v2
22

3-
go 1.23
3+
go 1.24.0
44

5-
require buf.build/gen/go/formal/core/connectrpc/go v1.18.1-20250910185804-029448314944.1
5+
require buf.build/gen/go/formal/core/connectrpc/go v1.19.1-20251210011536-5930ff8d805c.2
66

77
require (
8-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250717185734-6c6e0d3c608e.1 // indirect
9-
buf.build/gen/go/formal/core/protocolbuffers/go v1.36.9-20250910185804-029448314944.1 // indirect
10-
buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.9-20241220201140-4c5ba75caaf8.1 // indirect
11-
connectrpc.com/connect v1.18.1 // indirect
8+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20240920164238-5a7b106cbb87.1 // indirect
9+
buf.build/gen/go/formal/core/protocolbuffers/go v1.36.10-20251210011536-5930ff8d805c.1 // indirect
10+
buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.10-20240617172850-a48fcebcf8f1.1 // indirect
11+
connectrpc.com/connect v1.19.1 // indirect
1212
google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 // indirect
13-
google.golang.org/protobuf v1.36.9 // indirect
13+
google.golang.org/protobuf v1.36.10 // indirect
1414
)

sdk/go.sum

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250717185734-6c6e0d3c608e.1 h1:u98oQG8CHYBrOWrYdqbyNpKz4Pw02ssv03DsTInnXn8=
2-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250717185734-6c6e0d3c608e.1/go.mod h1:aY3zbkNan5F+cGm9lITDP6oxJIwu0dn9KjJuJjWaHkg=
3-
buf.build/gen/go/formal/core/connectrpc/go v1.18.1-20250910185804-029448314944.1 h1:PiM7nXqHl3JWPDVVB4KJHVsMeJhq0YhYnfkQ4vCiNXI=
4-
buf.build/gen/go/formal/core/connectrpc/go v1.18.1-20250910185804-029448314944.1/go.mod h1:Keo6xK26OtzIkB0riDRtSD90JuEi3L8+aKQ0tQBTTlw=
5-
buf.build/gen/go/formal/core/protocolbuffers/go v1.36.9-20250910185804-029448314944.1 h1:IAuwN/R6D5s9USjPHAv57yT5XkBpfNsHhDeZ51+xZ3c=
6-
buf.build/gen/go/formal/core/protocolbuffers/go v1.36.9-20250910185804-029448314944.1/go.mod h1:ETcJWjUm2dnU9DiajKYn0qVRiks69Wp4aeyuh6ltmmE=
7-
buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.9-20241220201140-4c5ba75caaf8.1 h1:BXq2wBGqfVg7ywjTCsj/bkxiZsoCmJPe+aJd1avZ2Zo=
8-
buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.9-20241220201140-4c5ba75caaf8.1/go.mod h1:cyGdcqucRZliu5beS9fw4NIPM0Rb22Jvy5IFLNox2Qs=
9-
connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw=
10-
connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8=
11-
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
12-
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
13-
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
14-
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
15-
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
16-
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
1+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20240920164238-5a7b106cbb87.1 h1:XdZDjy9+d96CZwVMuSr3qy+FJfu7IUza4QKSfwc2o9k=
2+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20240920164238-5a7b106cbb87.1/go.mod h1:fUl8CEN/6ZAMk6bP8ahBJPUJw7rbp+j4x+wCcYi2IG4=
3+
buf.build/gen/go/formal/core/connectrpc/go v1.19.1-20251210011536-5930ff8d805c.2 h1:Xoljms7lgthVlXQG7p8H5ErqPRjC7hzZUpof+eWwN8M=
4+
buf.build/gen/go/formal/core/connectrpc/go v1.19.1-20251210011536-5930ff8d805c.2/go.mod h1:xZSdrBrC8YAQm+lGsRMk15AXfN3qoSnohs8g5NBsQkE=
5+
buf.build/gen/go/formal/core/protocolbuffers/go v1.36.10-20251210011536-5930ff8d805c.1 h1:LqFatiPoqTIZON+tcMGNHM2LRkDYLSYJuQSrrwAqHAs=
6+
buf.build/gen/go/formal/core/protocolbuffers/go v1.36.10-20251210011536-5930ff8d805c.1/go.mod h1:6qE/DBzUbtHkfASbILQBZpTTMU++ShXeHGtBMuf3uZg=
7+
buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.10-20240617172850-a48fcebcf8f1.1 h1:gt6IvHP9aUG4vKAjWaT++3SGws5i2Q14qciSAlNOui4=
8+
buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.10-20240617172850-a48fcebcf8f1.1/go.mod h1:Dkpdum4mgWWBTG5nDVJPCDdaqFh34tucP6RulxhdOjs=
9+
connectrpc.com/connect v1.19.1 h1:R5M57z05+90EfEvCY1b7hBxDVOUl45PrtXtAV2fOC14=
10+
connectrpc.com/connect v1.19.1/go.mod h1:tN20fjdGlewnSFeZxLKb0xwIZ6ozc3OQs2hTXy4du9w=
11+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
12+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
1713
google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 h1:A2ni10G3UlplFrWdCDJTl7D7mJ7GSRm37S+PDimaKRw=
1814
google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287/go.mod h1:iYONQfRdizDB8JJBybql13nArx91jcUk7zCXEsOofM4=
19-
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
20-
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
15+
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
16+
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=

sdk/sdk.go

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,59 +12,94 @@ const (
1212

1313
type FormalSDK struct {
1414
ConnectorServiceClient corev1connect.ConnectorServiceClient
15+
GraphServiceClient corev1connect.GraphServiceClient
1516
GroupServiceClient corev1connect.GroupServiceClient
1617
IntegrationBIServiceClient corev1connect.IntegrationBIServiceClient
1718
IntegrationCloudServiceClient corev1connect.IntegrationCloudServiceClient
1819
IntegrationDataCatalogServiceClient corev1connect.IntegrationDataCatalogServiceClient
1920
IntegrationsLogServiceClient corev1connect.IntegrationsLogServiceClient
2021
IntegrationMDMServiceClient corev1connect.IntegrationMDMServiceClient
21-
IntegrationMfaServiceClient corev1connect.IntegrationMfaServiceClient
2222
InventoryServiceClient corev1connect.InventoryServiceClient
2323
LogsServiceClient corev1connect.LogsServiceClient
24-
MonitorsServiceClient corev1connect.MonitorsServiceClient
2524
PermissionsServiceClient corev1connect.PermissionsServiceClient
2625
PoliciesServiceClient corev1connect.PoliciesServiceClient
2726
PolicyDataLoaderServiceClient corev1connect.PolicyDataLoaderServiceClient
2827
ResourceServiceClient corev1connect.ResourceServiceClient
2928
SatelliteServiceClient corev1connect.SatelliteServiceClient
29+
ScenarioMonitoringServiceClient corev1connect.ScenarioMonitoringServiceClient
3030
SessionsServiceClient corev1connect.SessionsServiceClient
3131
SidecarServiceClient corev1connect.SidecarServiceClient
3232
SpaceServiceClient corev1connect.SpaceServiceClient
33-
TrackersServiceClient corev1connect.TrackersServiceClient
3433
UserServiceClient corev1connect.UserServiceClient
34+
WorkflowServiceClient corev1connect.WorkflowServiceClient
3535
}
3636

3737
func New(apiKey string) *FormalSDK {
38-
return NewWithUrl(apiKey, FORMAL_HOST_URL)
38+
httpClient := &http.Client{Transport: &transport{
39+
apiKey: apiKey,
40+
underlyingTransport: http.DefaultTransport,
41+
}}
42+
return &FormalSDK{
43+
ConnectorServiceClient: corev1connect.NewConnectorServiceClient(httpClient, FORMAL_HOST_URL),
44+
GraphServiceClient: corev1connect.NewGraphServiceClient(httpClient, FORMAL_HOST_URL),
45+
GroupServiceClient: corev1connect.NewGroupServiceClient(httpClient, FORMAL_HOST_URL),
46+
IntegrationBIServiceClient: corev1connect.NewIntegrationBIServiceClient(httpClient, FORMAL_HOST_URL),
47+
IntegrationCloudServiceClient: corev1connect.NewIntegrationCloudServiceClient(httpClient, FORMAL_HOST_URL),
48+
IntegrationDataCatalogServiceClient: corev1connect.NewIntegrationDataCatalogServiceClient(httpClient, FORMAL_HOST_URL),
49+
IntegrationMDMServiceClient: corev1connect.NewIntegrationMDMServiceClient(httpClient, FORMAL_HOST_URL),
50+
IntegrationsLogServiceClient: corev1connect.NewIntegrationsLogServiceClient(httpClient, FORMAL_HOST_URL),
51+
InventoryServiceClient: corev1connect.NewInventoryServiceClient(httpClient, FORMAL_HOST_URL),
52+
LogsServiceClient: corev1connect.NewLogsServiceClient(httpClient, FORMAL_HOST_URL),
53+
PermissionsServiceClient: corev1connect.NewPermissionsServiceClient(httpClient, FORMAL_HOST_URL),
54+
PoliciesServiceClient: corev1connect.NewPoliciesServiceClient(httpClient, FORMAL_HOST_URL),
55+
PolicyDataLoaderServiceClient: corev1connect.NewPolicyDataLoaderServiceClient(httpClient, FORMAL_HOST_URL),
56+
ResourceServiceClient: corev1connect.NewResourceServiceClient(httpClient, FORMAL_HOST_URL),
57+
SatelliteServiceClient: corev1connect.NewSatelliteServiceClient(httpClient, FORMAL_HOST_URL),
58+
ScenarioMonitoringServiceClient: corev1connect.NewScenarioMonitoringServiceClient(httpClient, FORMAL_HOST_URL),
59+
SessionsServiceClient: corev1connect.NewSessionsServiceClient(httpClient, FORMAL_HOST_URL),
60+
SidecarServiceClient: corev1connect.NewSidecarServiceClient(httpClient, FORMAL_HOST_URL),
61+
SpaceServiceClient: corev1connect.NewSpaceServiceClient(httpClient, FORMAL_HOST_URL),
62+
UserServiceClient: corev1connect.NewUserServiceClient(httpClient, FORMAL_HOST_URL),
63+
WorkflowServiceClient: corev1connect.NewWorkflowServiceClient(httpClient, FORMAL_HOST_URL),
64+
}
3965
}
4066

4167
func NewWithUrl(apiKey string, url string) *FormalSDK {
4268
httpClient := &http.Client{Transport: &transport{
4369
apiKey: apiKey,
44-
apiVersion: "2025-02-24",
4570
underlyingTransport: http.DefaultTransport,
4671
}}
4772
return &FormalSDK{
4873
ConnectorServiceClient: corev1connect.NewConnectorServiceClient(httpClient, url),
74+
GraphServiceClient: corev1connect.NewGraphServiceClient(httpClient, url),
4975
GroupServiceClient: corev1connect.NewGroupServiceClient(httpClient, url),
5076
IntegrationBIServiceClient: corev1connect.NewIntegrationBIServiceClient(httpClient, url),
5177
IntegrationCloudServiceClient: corev1connect.NewIntegrationCloudServiceClient(httpClient, url),
5278
IntegrationDataCatalogServiceClient: corev1connect.NewIntegrationDataCatalogServiceClient(httpClient, url),
5379
IntegrationMDMServiceClient: corev1connect.NewIntegrationMDMServiceClient(httpClient, url),
54-
IntegrationMfaServiceClient: corev1connect.NewIntegrationMfaServiceClient(httpClient, url),
5580
IntegrationsLogServiceClient: corev1connect.NewIntegrationsLogServiceClient(httpClient, url),
5681
InventoryServiceClient: corev1connect.NewInventoryServiceClient(httpClient, url),
5782
LogsServiceClient: corev1connect.NewLogsServiceClient(httpClient, url),
58-
MonitorsServiceClient: corev1connect.NewMonitorsServiceClient(httpClient, url),
5983
PermissionsServiceClient: corev1connect.NewPermissionsServiceClient(httpClient, url),
6084
PoliciesServiceClient: corev1connect.NewPoliciesServiceClient(httpClient, url),
6185
PolicyDataLoaderServiceClient: corev1connect.NewPolicyDataLoaderServiceClient(httpClient, url),
6286
ResourceServiceClient: corev1connect.NewResourceServiceClient(httpClient, url),
6387
SatelliteServiceClient: corev1connect.NewSatelliteServiceClient(httpClient, url),
88+
ScenarioMonitoringServiceClient: corev1connect.NewScenarioMonitoringServiceClient(httpClient, url),
6489
SessionsServiceClient: corev1connect.NewSessionsServiceClient(httpClient, url),
6590
SidecarServiceClient: corev1connect.NewSidecarServiceClient(httpClient, url),
6691
SpaceServiceClient: corev1connect.NewSpaceServiceClient(httpClient, url),
67-
TrackersServiceClient: corev1connect.NewTrackersServiceClient(httpClient, url),
6892
UserServiceClient: corev1connect.NewUserServiceClient(httpClient, url),
93+
WorkflowServiceClient: corev1connect.NewWorkflowServiceClient(httpClient, url),
6994
}
7095
}
96+
97+
type transport struct {
98+
underlyingTransport http.RoundTripper
99+
apiKey string
100+
}
101+
102+
func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {
103+
req.Header.Add("X-Api-Key", t.apiKey)
104+
return t.underlyingTransport.RoundTrip(req)
105+
}

0 commit comments

Comments
 (0)