From 940c6a86af142fa8f0d822719ff8cf9522dedd4f Mon Sep 17 00:00:00 2001 From: Geoff Greer Date: Wed, 7 May 2025 11:58:53 -0700 Subject: [PATCH 1/2] Show new partial sync data. --- buf.gen.yaml | 13 +- cmd/baton/syncs.go | 10 +- go.mod | 2 +- go.sum | 4 +- pb/baton/v1/outputs.pb.go | 601 ++++++------------ pb/baton/v1/outputs.pb.validate.go | 38 +- pb/c1/connector/v2/entitlement.pb.go | 129 ++-- pb/c1/connector/v2/entitlement.pb.validate.go | 6 +- pb/c1/connector/v2/entitlement_grpc.pb.go | 34 +- pb/c1/connector/v2/grant.pb.go | 243 ++----- pb/c1/connector/v2/grant.pb.validate.go | 14 +- pb/c1/connector/v2/grant_grpc.pb.go | 68 +- pb/c1/connector/v2/resource.pb.go | 261 +++----- pb/c1/connector/v2/resource.pb.validate.go | 14 +- pb/c1/connector/v2/resource_grpc.pb.go | 62 +- pkg/output/console.go | 4 +- proto/baton/v1/outputs.proto | 2 + .../pb/c1/connector/v2/connector.pb.go | 85 +-- .../pb/c1/connector/v2/event_feed.pb.go | 216 +++++-- .../c1/connector/v2/event_feed.pb.validate.go | 212 ++++++ .../pb/c1/connector/v2/resource.pb.go | 430 +++++++++---- .../c1/connector/v2/resource.pb.validate.go | 367 +++++++++++ .../pb/c1/connector/v2/resource_grpc.pb.go | 100 +++ .../baton-sdk/pb/c1/reader/v2/sync.pb.go | 184 +++--- .../pb/c1/reader/v2/sync.pb.validate.go | 4 + .../pkg/connectorstore/connectorstore.go | 1 + .../baton-sdk/pkg/dotc1z/assets.go | 4 + .../baton-sdk/pkg/dotc1z/c1file.go | 5 +- .../baton-sdk/pkg/dotc1z/entitlements.go | 4 + .../baton-sdk/pkg/dotc1z/grants.go | 4 + .../baton-sdk/pkg/dotc1z/resouce_types.go | 4 + .../baton-sdk/pkg/dotc1z/resources.go | 4 + .../baton-sdk/pkg/dotc1z/sql_helpers.go | 11 +- .../baton-sdk/pkg/dotc1z/sync_runs.go | 162 ++++- .../baton-sdk/pkg/pagination/generic_bag.go | 118 ++++ .../baton-sdk/pkg/pagination/pagination.go | 193 ++++++ .../conductorone/baton-sdk/pkg/sdk/version.go | 2 +- .../baton-sdk/pkg/uhttp/pagination.go | 99 +++ .../baton-sdk/pkg/uhttp/transport.go | 30 + .../baton-sdk/pkg/uhttp/wrapper.go | 6 + vendor/modules.txt | 3 +- 41 files changed, 2432 insertions(+), 1321 deletions(-) create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go create mode 100644 vendor/github.com/conductorone/baton-sdk/pkg/uhttp/pagination.go diff --git a/buf.gen.yaml b/buf.gen.yaml index 57f4e484..e3c3d6e7 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,16 +1,13 @@ -version: v1 +version: v2 plugins: - - remote: buf.build/protocolbuffers/plugins/go:v1.28.0-1 + - remote: buf.build/protocolbuffers/go:v1.36.4 out: pb opt: paths=source_relative - - remote: buf.build/grpc/plugins/go:v1.2.0-1 + - remote: buf.build/grpc/go:v1.5.1 out: pb opt: - paths=source_relative - require_unimplemented_servers=false - - remote: buf.build/jirkad/plugins/protoc-gen-validate:v0.6.7 + - remote: buf.build/bufbuild/validate-go:v1.2.1 out: pb - opt: - - lang=go - - paths=source_relative - + opt: paths=source_relative diff --git a/cmd/baton/syncs.go b/cmd/baton/syncs.go index b0a4e1a0..343aa545 100644 --- a/cmd/baton/syncs.go +++ b/cmd/baton/syncs.go @@ -67,10 +67,12 @@ func runSyncList(cmd *cobra.Command, args []string) error { endTime = timestamppb.New(*sr.EndedAt) } syncRuns = append(syncRuns, &v1.SyncOutput{ - Id: sr.ID, - StartedAt: startTime, - EndedAt: endTime, - SyncToken: sr.SyncToken, + Id: sr.ID, + StartedAt: startTime, + EndedAt: endTime, + SyncToken: sr.SyncToken, + SyncType: string(sr.Type), + ParentSyncId: sr.ParentSyncID, }) } diff --git a/go.mod b/go.mod index 4730e28b..a34cdae9 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/conductorone/baton go 1.23.6 require ( - github.com/conductorone/baton-sdk v0.2.94 + github.com/conductorone/baton-sdk v0.3.0 github.com/envoyproxy/protoc-gen-validate v1.2.1 github.com/gin-gonic/contrib v0.0.0-20250113154928-93b827325fec github.com/gin-gonic/gin v1.10.0 diff --git a/go.sum b/go.sum index d07af539..6f35bdf3 100644 --- a/go.sum +++ b/go.sum @@ -72,8 +72,8 @@ github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCy github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/conductorone/baton-sdk v0.2.94 h1:tF8z+Dnu2Q6ro67gYS0JabIi1MIihypo0+RjlWgI5jI= -github.com/conductorone/baton-sdk v0.2.94/go.mod h1:nUgHSAf9P0lfamti5NlOSpeh1t99UNzMjIwf0I7n4/g= +github.com/conductorone/baton-sdk v0.3.0 h1:vUQMR01ivMQ3xBmLmCIg7GY5nbrPUnaBOWZntLx85+s= +github.com/conductorone/baton-sdk v0.3.0/go.mod h1:nUgHSAf9P0lfamti5NlOSpeh1t99UNzMjIwf0I7n4/g= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= diff --git a/pb/baton/v1/outputs.pb.go b/pb/baton/v1/outputs.pb.go index 41d8a9e6..fb11960e 100644 --- a/pb/baton/v1/outputs.pb.go +++ b/pb/baton/v1/outputs.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0-devel +// protoc-gen-go v1.36.4 // protoc (unknown) // source: baton/v1/outputs.proto @@ -13,6 +13,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -23,22 +24,19 @@ const ( ) type ResourceDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Created []*v2.Resource `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` + Deleted []*v2.Resource `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` + Modified []*v2.Resource `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"` unknownFields protoimpl.UnknownFields - - Created []*v2.Resource `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` - Deleted []*v2.Resource `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` - Modified []*v2.Resource `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceDiff) Reset() { *x = ResourceDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceDiff) String() string { @@ -49,7 +47,7 @@ func (*ResourceDiff) ProtoMessage() {} func (x *ResourceDiff) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86,22 +84,19 @@ func (x *ResourceDiff) GetModified() []*v2.Resource { } type EntitlementDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Created []*v2.Entitlement `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` + Deleted []*v2.Entitlement `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` + Modified []*v2.Entitlement `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"` unknownFields protoimpl.UnknownFields - - Created []*v2.Entitlement `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` - Deleted []*v2.Entitlement `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` - Modified []*v2.Entitlement `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EntitlementDiff) Reset() { *x = EntitlementDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementDiff) String() string { @@ -112,7 +107,7 @@ func (*EntitlementDiff) ProtoMessage() {} func (x *EntitlementDiff) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,22 +144,19 @@ func (x *EntitlementDiff) GetModified() []*v2.Entitlement { } type GrantDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Created []*v2.Grant `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` + Deleted []*v2.Grant `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` + Modified []*v2.Grant `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"` unknownFields protoimpl.UnknownFields - - Created []*v2.Grant `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` - Deleted []*v2.Grant `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` - Modified []*v2.Grant `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantDiff) Reset() { *x = GrantDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantDiff) String() string { @@ -175,7 +167,7 @@ func (*GrantDiff) ProtoMessage() {} func (x *GrantDiff) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,22 +204,19 @@ func (x *GrantDiff) GetModified() []*v2.Grant { } type C1ZDiffOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resources *ResourceDiff `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"` + Entitlements *EntitlementDiff `protobuf:"bytes,2,opt,name=entitlements,proto3" json:"entitlements,omitempty"` + Grants *GrantDiff `protobuf:"bytes,3,opt,name=grants,proto3" json:"grants,omitempty"` unknownFields protoimpl.UnknownFields - - Resources *ResourceDiff `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"` - Entitlements *EntitlementDiff `protobuf:"bytes,2,opt,name=entitlements,proto3" json:"entitlements,omitempty"` - Grants *GrantDiff `protobuf:"bytes,3,opt,name=grants,proto3" json:"grants,omitempty"` + sizeCache protoimpl.SizeCache } func (x *C1ZDiffOutput) Reset() { *x = C1ZDiffOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *C1ZDiffOutput) String() string { @@ -238,7 +227,7 @@ func (*C1ZDiffOutput) ProtoMessage() {} func (x *C1ZDiffOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,20 +264,17 @@ func (x *C1ZDiffOutput) GetGrants() *GrantDiff { } type ResourceTypeOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` unknownFields protoimpl.UnknownFields - - ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceTypeOutput) Reset() { *x = ResourceTypeOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceTypeOutput) String() string { @@ -299,7 +285,7 @@ func (*ResourceTypeOutput) ProtoMessage() {} func (x *ResourceTypeOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,22 +308,19 @@ func (x *ResourceTypeOutput) GetResourceType() *v2.ResourceType { } type ResourceOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resource *v2.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + ResourceType *v2.ResourceType `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + Parent *v2.Resource `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` unknownFields protoimpl.UnknownFields - - Resource *v2.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - ResourceType *v2.ResourceType `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Parent *v2.Resource `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceOutput) Reset() { *x = ResourceOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceOutput) String() string { @@ -348,7 +331,7 @@ func (*ResourceOutput) ProtoMessage() {} func (x *ResourceOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,22 +368,19 @@ func (x *ResourceOutput) GetParent() *v2.Resource { } type EntitlementOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` + Resource *v2.Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + ResourceType *v2.ResourceType `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` unknownFields protoimpl.UnknownFields - - Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` - Resource *v2.Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - ResourceType *v2.ResourceType `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EntitlementOutput) Reset() { *x = EntitlementOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementOutput) String() string { @@ -411,7 +391,7 @@ func (*EntitlementOutput) ProtoMessage() {} func (x *EntitlementOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,24 +428,21 @@ func (x *EntitlementOutput) GetResourceType() *v2.ResourceType { } type GrantOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"` + Entitlement *v2.Entitlement `protobuf:"bytes,2,opt,name=entitlement,proto3" json:"entitlement,omitempty"` + Resource *v2.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + ResourceType *v2.ResourceType `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + Principal *v2.Resource `protobuf:"bytes,5,opt,name=principal,proto3" json:"principal,omitempty"` unknownFields protoimpl.UnknownFields - - Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"` - Entitlement *v2.Entitlement `protobuf:"bytes,2,opt,name=entitlement,proto3" json:"entitlement,omitempty"` - Resource *v2.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` - ResourceType *v2.ResourceType `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Principal *v2.Resource `protobuf:"bytes,5,opt,name=principal,proto3" json:"principal,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantOutput) Reset() { *x = GrantOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantOutput) String() string { @@ -476,7 +453,7 @@ func (*GrantOutput) ProtoMessage() {} func (x *GrantOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,22 +504,19 @@ func (x *GrantOutput) GetPrincipal() *v2.Resource { } type ResourceAccessOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + Resource *v2.Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Entitlements []*v2.Entitlement `protobuf:"bytes,3,rep,name=entitlements,proto3" json:"entitlements,omitempty"` unknownFields protoimpl.UnknownFields - - ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Resource *v2.Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - Entitlements []*v2.Entitlement `protobuf:"bytes,3,rep,name=entitlements,proto3" json:"entitlements,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceAccessOutput) Reset() { *x = ResourceAccessOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceAccessOutput) String() string { @@ -553,7 +527,7 @@ func (*ResourceAccessOutput) ProtoMessage() {} func (x *ResourceAccessOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,20 +564,17 @@ func (x *ResourceAccessOutput) GetEntitlements() []*v2.Entitlement { } type ResourceTypeListOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ResourceTypes []*ResourceTypeOutput `protobuf:"bytes,1,rep,name=resource_types,json=resourceTypes,proto3" json:"resource_types,omitempty"` unknownFields protoimpl.UnknownFields - - ResourceTypes []*ResourceTypeOutput `protobuf:"bytes,1,rep,name=resource_types,json=resourceTypes,proto3" json:"resource_types,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceTypeListOutput) Reset() { *x = ResourceTypeListOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceTypeListOutput) String() string { @@ -614,7 +585,7 @@ func (*ResourceTypeListOutput) ProtoMessage() {} func (x *ResourceTypeListOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,20 +608,17 @@ func (x *ResourceTypeListOutput) GetResourceTypes() []*ResourceTypeOutput { } type ResourceListOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resources []*ResourceOutput `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` unknownFields protoimpl.UnknownFields - - Resources []*ResourceOutput `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceListOutput) Reset() { *x = ResourceListOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceListOutput) String() string { @@ -661,7 +629,7 @@ func (*ResourceListOutput) ProtoMessage() {} func (x *ResourceListOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -684,20 +652,17 @@ func (x *ResourceListOutput) GetResources() []*ResourceOutput { } type EntitlementListOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Entitlements []*EntitlementOutput `protobuf:"bytes,1,rep,name=entitlements,proto3" json:"entitlements,omitempty"` unknownFields protoimpl.UnknownFields - - Entitlements []*EntitlementOutput `protobuf:"bytes,1,rep,name=entitlements,proto3" json:"entitlements,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EntitlementListOutput) Reset() { *x = EntitlementListOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementListOutput) String() string { @@ -708,7 +673,7 @@ func (*EntitlementListOutput) ProtoMessage() {} func (x *EntitlementListOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,20 +696,17 @@ func (x *EntitlementListOutput) GetEntitlements() []*EntitlementOutput { } type GrantListOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Grants []*GrantOutput `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` unknownFields protoimpl.UnknownFields - - Grants []*GrantOutput `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantListOutput) Reset() { *x = GrantListOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantListOutput) String() string { @@ -755,7 +717,7 @@ func (*GrantListOutput) ProtoMessage() {} func (x *GrantListOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,21 +740,18 @@ func (x *GrantListOutput) GetGrants() []*GrantOutput { } type ResourceAccessListOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Principal *v2.Resource `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` + Access []*ResourceAccessOutput `protobuf:"bytes,2,rep,name=access,proto3" json:"access,omitempty"` unknownFields protoimpl.UnknownFields - - Principal *v2.Resource `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` - Access []*ResourceAccessOutput `protobuf:"bytes,2,rep,name=access,proto3" json:"access,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceAccessListOutput) Reset() { *x = ResourceAccessListOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceAccessListOutput) String() string { @@ -803,7 +762,7 @@ func (*ResourceAccessListOutput) ProtoMessage() {} func (x *ResourceAccessListOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,23 +792,20 @@ func (x *ResourceAccessListOutput) GetAccess() []*ResourceAccessOutput { } type PrincipalsCompareOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Missing []*ResourceOutput `protobuf:"bytes,1,rep,name=missing,proto3" json:"missing,omitempty"` + Extra []*ResourceOutput `protobuf:"bytes,2,rep,name=extra,proto3" json:"extra,omitempty"` + Base []*ResourceOutput `protobuf:"bytes,3,rep,name=base,proto3" json:"base,omitempty"` + Compared []*ResourceOutput `protobuf:"bytes,4,rep,name=compared,proto3" json:"compared,omitempty"` unknownFields protoimpl.UnknownFields - - Missing []*ResourceOutput `protobuf:"bytes,1,rep,name=missing,proto3" json:"missing,omitempty"` - Extra []*ResourceOutput `protobuf:"bytes,2,rep,name=extra,proto3" json:"extra,omitempty"` - Base []*ResourceOutput `protobuf:"bytes,3,rep,name=base,proto3" json:"base,omitempty"` - Compared []*ResourceOutput `protobuf:"bytes,4,rep,name=compared,proto3" json:"compared,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PrincipalsCompareOutput) Reset() { *x = PrincipalsCompareOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrincipalsCompareOutput) String() string { @@ -860,7 +816,7 @@ func (*PrincipalsCompareOutput) ProtoMessage() {} func (x *PrincipalsCompareOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,23 +860,22 @@ func (x *PrincipalsCompareOutput) GetCompared() []*ResourceOutput { } type SyncOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + EndedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"` + SyncToken string `protobuf:"bytes,4,opt,name=sync_token,json=syncToken,proto3" json:"sync_token,omitempty"` + SyncType string `protobuf:"bytes,5,opt,name=sync_type,json=syncType,proto3" json:"sync_type,omitempty"` + ParentSyncId string `protobuf:"bytes,6,opt,name=parent_sync_id,json=parentSyncId,proto3" json:"parent_sync_id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - EndedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"` - SyncToken string `protobuf:"bytes,4,opt,name=sync_token,json=syncToken,proto3" json:"sync_token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SyncOutput) Reset() { *x = SyncOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncOutput) String() string { @@ -931,7 +886,7 @@ func (*SyncOutput) ProtoMessage() {} func (x *SyncOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,21 +929,32 @@ func (x *SyncOutput) GetSyncToken() string { return "" } +func (x *SyncOutput) GetSyncType() string { + if x != nil { + return x.SyncType + } + return "" +} + +func (x *SyncOutput) GetParentSyncId() string { + if x != nil { + return x.ParentSyncId + } + return "" +} + type SyncListOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Syncs []*SyncOutput `protobuf:"bytes,1,rep,name=syncs,proto3" json:"syncs,omitempty"` unknownFields protoimpl.UnknownFields - - Syncs []*SyncOutput `protobuf:"bytes,1,rep,name=syncs,proto3" json:"syncs,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SyncListOutput) Reset() { *x = SyncListOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_baton_v1_outputs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_baton_v1_outputs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncListOutput) String() string { @@ -999,7 +965,7 @@ func (*SyncListOutput) ProtoMessage() {} func (x *SyncListOutput) ProtoReflect() protoreflect.Message { mi := &file_baton_v1_outputs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,7 +989,7 @@ func (x *SyncListOutput) GetSyncs() []*SyncOutput { var File_baton_v1_outputs_proto protoreflect.FileDescriptor -var file_baton_v1_outputs_proto_rawDesc = []byte{ +var file_baton_v1_outputs_proto_rawDesc = string([]byte{ 0x0a, 0x16, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, @@ -1185,7 +1151,7 @@ var file_baton_v1_outputs_proto_rawDesc = []byte{ 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x22, 0xad, 0x01, 0x0a, + 0x75, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, @@ -1196,31 +1162,35 @@ var file_baton_v1_outputs_proto_rawDesc = []byte{ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3c, 0x0a, 0x0e, - 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x2a, - 0x0a, 0x05, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x05, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, - 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x62, - 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} + 0x09, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x22, + 0x3c, 0x0a, 0x0e, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x05, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x42, 0x2f, 0x5a, + 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, + 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x70, + 0x62, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( file_baton_v1_outputs_proto_rawDescOnce sync.Once - file_baton_v1_outputs_proto_rawDescData = file_baton_v1_outputs_proto_rawDesc + file_baton_v1_outputs_proto_rawDescData []byte ) func file_baton_v1_outputs_proto_rawDescGZIP() []byte { file_baton_v1_outputs_proto_rawDescOnce.Do(func() { - file_baton_v1_outputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_baton_v1_outputs_proto_rawDescData) + file_baton_v1_outputs_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_baton_v1_outputs_proto_rawDesc), len(file_baton_v1_outputs_proto_rawDesc))) }) return file_baton_v1_outputs_proto_rawDescData } var file_baton_v1_outputs_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_baton_v1_outputs_proto_goTypes = []interface{}{ +var file_baton_v1_outputs_proto_goTypes = []any{ (*ResourceDiff)(nil), // 0: baton.v1.ResourceDiff (*EntitlementDiff)(nil), // 1: baton.v1.EntitlementDiff (*GrantDiff)(nil), // 2: baton.v1.GrantDiff @@ -1297,217 +1267,11 @@ func file_baton_v1_outputs_proto_init() { if File_baton_v1_outputs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_baton_v1_outputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntitlementDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*C1ZDiffOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceTypeOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntitlementOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceAccessOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceTypeListOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceListOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntitlementListOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantListOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceAccessListOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrincipalsCompareOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_baton_v1_outputs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncListOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_baton_v1_outputs_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_baton_v1_outputs_proto_rawDesc), len(file_baton_v1_outputs_proto_rawDesc)), NumEnums: 0, NumMessages: 17, NumExtensions: 0, @@ -1518,7 +1282,6 @@ func file_baton_v1_outputs_proto_init() { MessageInfos: file_baton_v1_outputs_proto_msgTypes, }.Build() File_baton_v1_outputs_proto = out.File - file_baton_v1_outputs_proto_rawDesc = nil file_baton_v1_outputs_proto_goTypes = nil file_baton_v1_outputs_proto_depIdxs = nil } diff --git a/pb/baton/v1/outputs.pb.validate.go b/pb/baton/v1/outputs.pb.validate.go index 5297f5dc..a7a6e761 100644 --- a/pb/baton/v1/outputs.pb.validate.go +++ b/pb/baton/v1/outputs.pb.validate.go @@ -172,7 +172,7 @@ type ResourceDiffMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceDiffMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -374,7 +374,7 @@ type EntitlementDiffMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m EntitlementDiffMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -575,7 +575,7 @@ type GrantDiffMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantDiffMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -762,7 +762,7 @@ type C1ZDiffOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m C1ZDiffOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -891,7 +891,7 @@ type ResourceTypeOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceTypeOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1080,7 +1080,7 @@ type ResourceOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1267,7 +1267,7 @@ type EntitlementOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m EntitlementOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1513,7 +1513,7 @@ type GrantOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1705,7 +1705,7 @@ type ResourceAccessOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceAccessOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1841,7 +1841,7 @@ type ResourceTypeListOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceTypeListOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1977,7 +1977,7 @@ type ResourceListOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceListOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -2113,7 +2113,7 @@ type EntitlementListOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m EntitlementListOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -2249,7 +2249,7 @@ type GrantListOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantListOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -2412,7 +2412,7 @@ type ResourceAccessListOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceAccessListOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -2650,7 +2650,7 @@ type PrincipalsCompareOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m PrincipalsCompareOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -2800,6 +2800,10 @@ func (m *SyncOutput) validate(all bool) error { // no validation rules for SyncToken + // no validation rules for SyncType + + // no validation rules for ParentSyncId + if len(errors) > 0 { return SyncOutputMultiError(errors) } @@ -2813,7 +2817,7 @@ type SyncOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SyncOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -2947,7 +2951,7 @@ type SyncListOutputMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m SyncListOutputMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } diff --git a/pb/c1/connector/v2/entitlement.pb.go b/pb/c1/connector/v2/entitlement.pb.go index 5b42ec23..686c5c5d 100644 --- a/pb/c1/connector/v2/entitlement.pb.go +++ b/pb/c1/connector/v2/entitlement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0-devel +// protoc-gen-go v1.36.4 // protoc (unknown) // source: c1/connector/v2/entitlement.proto @@ -13,6 +13,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -72,27 +73,24 @@ func (Entitlement_PurposeValue) EnumDescriptor() ([]byte, []int) { } type Entitlement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + GrantableTo []*ResourceType `protobuf:"bytes,5,rep,name=grantable_to,json=grantableTo,proto3" json:"grantable_to,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"` + Purpose Entitlement_PurposeValue `protobuf:"varint,7,opt,name=purpose,proto3,enum=c1.connector.v2.Entitlement_PurposeValue" json:"purpose,omitempty"` + Slug string `protobuf:"bytes,8,opt,name=slug,proto3" json:"slug,omitempty"` unknownFields protoimpl.UnknownFields - - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - GrantableTo []*ResourceType `protobuf:"bytes,5,rep,name=grantable_to,json=grantableTo,proto3" json:"grantable_to,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"` - Purpose Entitlement_PurposeValue `protobuf:"varint,7,opt,name=purpose,proto3,enum=c1.connector.v2.Entitlement_PurposeValue" json:"purpose,omitempty"` - Slug string `protobuf:"bytes,8,opt,name=slug,proto3" json:"slug,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Entitlement) Reset() { *x = Entitlement{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_entitlement_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_entitlement_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement) String() string { @@ -103,7 +101,7 @@ func (*Entitlement) ProtoMessage() {} func (x *Entitlement) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_entitlement_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,23 +173,20 @@ func (x *Entitlement) GetSlug() string { } type EntitlementsServiceListEntitlementsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EntitlementsServiceListEntitlementsRequest) Reset() { *x = EntitlementsServiceListEntitlementsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_entitlement_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_entitlement_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementsServiceListEntitlementsRequest) String() string { @@ -202,7 +197,7 @@ func (*EntitlementsServiceListEntitlementsRequest) ProtoMessage() {} func (x *EntitlementsServiceListEntitlementsRequest) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_entitlement_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,22 +241,19 @@ func (x *EntitlementsServiceListEntitlementsRequest) GetAnnotations() []*anypb.A } type EntitlementsServiceListEntitlementsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + List []*Entitlement `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - List []*Entitlement `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EntitlementsServiceListEntitlementsResponse) Reset() { *x = EntitlementsServiceListEntitlementsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_entitlement_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_entitlement_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementsServiceListEntitlementsResponse) String() string { @@ -272,7 +264,7 @@ func (*EntitlementsServiceListEntitlementsResponse) ProtoMessage() {} func (x *EntitlementsServiceListEntitlementsResponse) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_entitlement_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,7 +302,7 @@ func (x *EntitlementsServiceListEntitlementsResponse) GetAnnotations() []*anypb. var File_c1_connector_v2_entitlement_proto protoreflect.FileDescriptor -var file_c1_connector_v2_entitlement_proto_rawDesc = []byte{ +var file_c1_connector_v2_entitlement_proto_rawDesc = string([]byte{ 0x0a, 0x21, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, @@ -396,23 +388,23 @@ var file_c1_connector_v2_entitlement_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_c1_connector_v2_entitlement_proto_rawDescOnce sync.Once - file_c1_connector_v2_entitlement_proto_rawDescData = file_c1_connector_v2_entitlement_proto_rawDesc + file_c1_connector_v2_entitlement_proto_rawDescData []byte ) func file_c1_connector_v2_entitlement_proto_rawDescGZIP() []byte { file_c1_connector_v2_entitlement_proto_rawDescOnce.Do(func() { - file_c1_connector_v2_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_entitlement_proto_rawDescData) + file_c1_connector_v2_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_entitlement_proto_rawDesc), len(file_c1_connector_v2_entitlement_proto_rawDesc))) }) return file_c1_connector_v2_entitlement_proto_rawDescData } var file_c1_connector_v2_entitlement_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_c1_connector_v2_entitlement_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_c1_connector_v2_entitlement_proto_goTypes = []interface{}{ +var file_c1_connector_v2_entitlement_proto_goTypes = []any{ (Entitlement_PurposeValue)(0), // 0: c1.connector.v2.Entitlement.PurposeValue (*Entitlement)(nil), // 1: c1.connector.v2.Entitlement (*EntitlementsServiceListEntitlementsRequest)(nil), // 2: c1.connector.v2.EntitlementsServiceListEntitlementsRequest @@ -445,49 +437,11 @@ func file_c1_connector_v2_entitlement_proto_init() { return } file_c1_connector_v2_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_c1_connector_v2_entitlement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Entitlement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_entitlement_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntitlementsServiceListEntitlementsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_entitlement_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntitlementsServiceListEntitlementsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_c1_connector_v2_entitlement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_entitlement_proto_rawDesc), len(file_c1_connector_v2_entitlement_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, @@ -499,7 +453,6 @@ func file_c1_connector_v2_entitlement_proto_init() { MessageInfos: file_c1_connector_v2_entitlement_proto_msgTypes, }.Build() File_c1_connector_v2_entitlement_proto = out.File - file_c1_connector_v2_entitlement_proto_rawDesc = nil file_c1_connector_v2_entitlement_proto_goTypes = nil file_c1_connector_v2_entitlement_proto_depIdxs = nil } diff --git a/pb/c1/connector/v2/entitlement.pb.validate.go b/pb/c1/connector/v2/entitlement.pb.validate.go index d4acf84c..f7e14c3a 100644 --- a/pb/c1/connector/v2/entitlement.pb.validate.go +++ b/pb/c1/connector/v2/entitlement.pb.validate.go @@ -224,7 +224,7 @@ type EntitlementMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m EntitlementMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -420,7 +420,7 @@ type EntitlementsServiceListEntitlementsRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m EntitlementsServiceListEntitlementsRequestMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -609,7 +609,7 @@ type EntitlementsServiceListEntitlementsResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m EntitlementsServiceListEntitlementsResponseMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } diff --git a/pb/c1/connector/v2/entitlement_grpc.pb.go b/pb/c1/connector/v2/entitlement_grpc.pb.go index 64fac307..821161d3 100644 --- a/pb/c1/connector/v2/entitlement_grpc.pb.go +++ b/pb/c1/connector/v2/entitlement_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: c1/connector/v2/entitlement.proto @@ -15,8 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + EntitlementsService_ListEntitlements_FullMethodName = "/c1.connector.v2.EntitlementsService/ListEntitlements" +) // EntitlementsServiceClient is the client API for EntitlementsService service. // @@ -34,8 +38,9 @@ func NewEntitlementsServiceClient(cc grpc.ClientConnInterface) EntitlementsServi } func (c *entitlementsServiceClient) ListEntitlements(ctx context.Context, in *EntitlementsServiceListEntitlementsRequest, opts ...grpc.CallOption) (*EntitlementsServiceListEntitlementsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EntitlementsServiceListEntitlementsResponse) - err := c.cc.Invoke(ctx, "/c1.connector.v2.EntitlementsService/ListEntitlements", in, out, opts...) + err := c.cc.Invoke(ctx, EntitlementsService_ListEntitlements_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,18 +49,22 @@ func (c *entitlementsServiceClient) ListEntitlements(ctx context.Context, in *En // EntitlementsServiceServer is the server API for EntitlementsService service. // All implementations should embed UnimplementedEntitlementsServiceServer -// for forward compatibility +// for forward compatibility. type EntitlementsServiceServer interface { ListEntitlements(context.Context, *EntitlementsServiceListEntitlementsRequest) (*EntitlementsServiceListEntitlementsResponse, error) } -// UnimplementedEntitlementsServiceServer should be embedded to have forward compatible implementations. -type UnimplementedEntitlementsServiceServer struct { -} +// UnimplementedEntitlementsServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedEntitlementsServiceServer struct{} func (UnimplementedEntitlementsServiceServer) ListEntitlements(context.Context, *EntitlementsServiceListEntitlementsRequest) (*EntitlementsServiceListEntitlementsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListEntitlements not implemented") } +func (UnimplementedEntitlementsServiceServer) testEmbeddedByValue() {} // UnsafeEntitlementsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EntitlementsServiceServer will @@ -65,6 +74,13 @@ type UnsafeEntitlementsServiceServer interface { } func RegisterEntitlementsServiceServer(s grpc.ServiceRegistrar, srv EntitlementsServiceServer) { + // If the following call pancis, it indicates UnimplementedEntitlementsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&EntitlementsService_ServiceDesc, srv) } @@ -78,7 +94,7 @@ func _EntitlementsService_ListEntitlements_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c1.connector.v2.EntitlementsService/ListEntitlements", + FullMethod: EntitlementsService_ListEntitlements_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EntitlementsServiceServer).ListEntitlements(ctx, req.(*EntitlementsServiceListEntitlementsRequest)) diff --git a/pb/c1/connector/v2/grant.pb.go b/pb/c1/connector/v2/grant.pb.go index 7f20bde1..e8061785 100644 --- a/pb/c1/connector/v2/grant.pb.go +++ b/pb/c1/connector/v2/grant.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0-devel +// protoc-gen-go v1.36.4 // protoc (unknown) // source: c1/connector/v2/grant.proto @@ -13,6 +13,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -23,23 +24,20 @@ const ( ) type Grant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` + Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` - Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Grant) Reset() { *x = Grant{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant) String() string { @@ -50,7 +48,7 @@ func (*Grant) ProtoMessage() {} func (x *Grant) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94,23 +92,20 @@ func (x *Grant) GetAnnotations() []*anypb.Any { } type GrantsServiceListGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantsServiceListGrantsRequest) Reset() { *x = GrantsServiceListGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantsServiceListGrantsRequest) String() string { @@ -121,7 +116,7 @@ func (*GrantsServiceListGrantsRequest) ProtoMessage() {} func (x *GrantsServiceListGrantsRequest) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,22 +160,19 @@ func (x *GrantsServiceListGrantsRequest) GetAnnotations() []*anypb.Any { } type GrantsServiceListGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + List []*Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - List []*Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantsServiceListGrantsResponse) Reset() { *x = GrantsServiceListGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantsServiceListGrantsResponse) String() string { @@ -191,7 +183,7 @@ func (*GrantsServiceListGrantsResponse) ProtoMessage() {} func (x *GrantsServiceListGrantsResponse) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,22 +220,19 @@ func (x *GrantsServiceListGrantsResponse) GetAnnotations() []*anypb.Any { } type GrantManagerServiceGrantRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` + Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` - Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantManagerServiceGrantRequest) Reset() { *x = GrantManagerServiceGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantManagerServiceGrantRequest) String() string { @@ -254,7 +243,7 @@ func (*GrantManagerServiceGrantRequest) ProtoMessage() {} func (x *GrantManagerServiceGrantRequest) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,20 +280,17 @@ func (x *GrantManagerServiceGrantRequest) GetAnnotations() []*anypb.Any { } type GrantManagerServiceGrantResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantManagerServiceGrantResponse) Reset() { *x = GrantManagerServiceGrantResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantManagerServiceGrantResponse) String() string { @@ -315,7 +301,7 @@ func (*GrantManagerServiceGrantResponse) ProtoMessage() {} func (x *GrantManagerServiceGrantResponse) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,21 +324,18 @@ func (x *GrantManagerServiceGrantResponse) GetAnnotations() []*anypb.Any { } type GrantManagerServiceRevokeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Grant *Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Grant *Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantManagerServiceRevokeRequest) Reset() { *x = GrantManagerServiceRevokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantManagerServiceRevokeRequest) String() string { @@ -363,7 +346,7 @@ func (*GrantManagerServiceRevokeRequest) ProtoMessage() {} func (x *GrantManagerServiceRevokeRequest) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,20 +376,17 @@ func (x *GrantManagerServiceRevokeRequest) GetAnnotations() []*anypb.Any { } type GrantManagerServiceRevokeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GrantManagerServiceRevokeResponse) Reset() { *x = GrantManagerServiceRevokeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_grant_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_grant_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantManagerServiceRevokeResponse) String() string { @@ -417,7 +397,7 @@ func (*GrantManagerServiceRevokeResponse) ProtoMessage() {} func (x *GrantManagerServiceRevokeResponse) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_grant_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,7 +421,7 @@ func (x *GrantManagerServiceRevokeResponse) GetAnnotations() []*anypb.Any { var File_c1_connector_v2_grant_proto protoreflect.FileDescriptor -var file_c1_connector_v2_grant_proto_rawDesc = []byte{ +var file_c1_connector_v2_grant_proto_rawDesc = string([]byte{ 0x0a, 0x1b, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x21, @@ -558,22 +538,22 @@ var file_c1_connector_v2_grant_proto_rawDesc = []byte{ 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_c1_connector_v2_grant_proto_rawDescOnce sync.Once - file_c1_connector_v2_grant_proto_rawDescData = file_c1_connector_v2_grant_proto_rawDesc + file_c1_connector_v2_grant_proto_rawDescData []byte ) func file_c1_connector_v2_grant_proto_rawDescGZIP() []byte { file_c1_connector_v2_grant_proto_rawDescOnce.Do(func() { - file_c1_connector_v2_grant_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_grant_proto_rawDescData) + file_c1_connector_v2_grant_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_grant_proto_rawDesc), len(file_c1_connector_v2_grant_proto_rawDesc))) }) return file_c1_connector_v2_grant_proto_rawDescData } var file_c1_connector_v2_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_c1_connector_v2_grant_proto_goTypes = []interface{}{ +var file_c1_connector_v2_grant_proto_goTypes = []any{ (*Grant)(nil), // 0: c1.connector.v2.Grant (*GrantsServiceListGrantsRequest)(nil), // 1: c1.connector.v2.GrantsServiceListGrantsRequest (*GrantsServiceListGrantsResponse)(nil), // 2: c1.connector.v2.GrantsServiceListGrantsResponse @@ -620,97 +600,11 @@ func file_c1_connector_v2_grant_proto_init() { } file_c1_connector_v2_entitlement_proto_init() file_c1_connector_v2_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_c1_connector_v2_grant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Grant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_grant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantsServiceListGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_grant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantsServiceListGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_grant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantManagerServiceGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_grant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantManagerServiceGrantResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_grant_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantManagerServiceRevokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_grant_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantManagerServiceRevokeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_c1_connector_v2_grant_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_grant_proto_rawDesc), len(file_c1_connector_v2_grant_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, @@ -721,7 +615,6 @@ func file_c1_connector_v2_grant_proto_init() { MessageInfos: file_c1_connector_v2_grant_proto_msgTypes, }.Build() File_c1_connector_v2_grant_proto = out.File - file_c1_connector_v2_grant_proto_rawDesc = nil file_c1_connector_v2_grant_proto_goTypes = nil file_c1_connector_v2_grant_proto_depIdxs = nil } diff --git a/pb/c1/connector/v2/grant.pb.validate.go b/pb/c1/connector/v2/grant.pb.validate.go index b1de12a8..4f9897e2 100644 --- a/pb/c1/connector/v2/grant.pb.validate.go +++ b/pb/c1/connector/v2/grant.pb.validate.go @@ -194,7 +194,7 @@ type GrantMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -398,7 +398,7 @@ type GrantsServiceListGrantsRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantsServiceListGrantsRequestMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -584,7 +584,7 @@ type GrantsServiceListGrantsResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantsServiceListGrantsResponseMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -801,7 +801,7 @@ type GrantManagerServiceGrantRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantManagerServiceGrantRequestMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -940,7 +940,7 @@ type GrantManagerServiceGrantResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantManagerServiceGrantResponseMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1119,7 +1119,7 @@ type GrantManagerServiceRevokeRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantManagerServiceRevokeRequestMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1258,7 +1258,7 @@ type GrantManagerServiceRevokeResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m GrantManagerServiceRevokeResponseMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } diff --git a/pb/c1/connector/v2/grant_grpc.pb.go b/pb/c1/connector/v2/grant_grpc.pb.go index aef058da..421c28d4 100644 --- a/pb/c1/connector/v2/grant_grpc.pb.go +++ b/pb/c1/connector/v2/grant_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: c1/connector/v2/grant.proto @@ -15,8 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + GrantsService_ListGrants_FullMethodName = "/c1.connector.v2.GrantsService/ListGrants" +) // GrantsServiceClient is the client API for GrantsService service. // @@ -34,8 +38,9 @@ func NewGrantsServiceClient(cc grpc.ClientConnInterface) GrantsServiceClient { } func (c *grantsServiceClient) ListGrants(ctx context.Context, in *GrantsServiceListGrantsRequest, opts ...grpc.CallOption) (*GrantsServiceListGrantsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GrantsServiceListGrantsResponse) - err := c.cc.Invoke(ctx, "/c1.connector.v2.GrantsService/ListGrants", in, out, opts...) + err := c.cc.Invoke(ctx, GrantsService_ListGrants_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,18 +49,22 @@ func (c *grantsServiceClient) ListGrants(ctx context.Context, in *GrantsServiceL // GrantsServiceServer is the server API for GrantsService service. // All implementations should embed UnimplementedGrantsServiceServer -// for forward compatibility +// for forward compatibility. type GrantsServiceServer interface { ListGrants(context.Context, *GrantsServiceListGrantsRequest) (*GrantsServiceListGrantsResponse, error) } -// UnimplementedGrantsServiceServer should be embedded to have forward compatible implementations. -type UnimplementedGrantsServiceServer struct { -} +// UnimplementedGrantsServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGrantsServiceServer struct{} func (UnimplementedGrantsServiceServer) ListGrants(context.Context, *GrantsServiceListGrantsRequest) (*GrantsServiceListGrantsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListGrants not implemented") } +func (UnimplementedGrantsServiceServer) testEmbeddedByValue() {} // UnsafeGrantsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GrantsServiceServer will @@ -65,6 +74,13 @@ type UnsafeGrantsServiceServer interface { } func RegisterGrantsServiceServer(s grpc.ServiceRegistrar, srv GrantsServiceServer) { + // If the following call pancis, it indicates UnimplementedGrantsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&GrantsService_ServiceDesc, srv) } @@ -78,7 +94,7 @@ func _GrantsService_ListGrants_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c1.connector.v2.GrantsService/ListGrants", + FullMethod: GrantsService_ListGrants_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GrantsServiceServer).ListGrants(ctx, req.(*GrantsServiceListGrantsRequest)) @@ -102,6 +118,11 @@ var GrantsService_ServiceDesc = grpc.ServiceDesc{ Metadata: "c1/connector/v2/grant.proto", } +const ( + GrantManagerService_Grant_FullMethodName = "/c1.connector.v2.GrantManagerService/Grant" + GrantManagerService_Revoke_FullMethodName = "/c1.connector.v2.GrantManagerService/Revoke" +) + // GrantManagerServiceClient is the client API for GrantManagerService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -119,8 +140,9 @@ func NewGrantManagerServiceClient(cc grpc.ClientConnInterface) GrantManagerServi } func (c *grantManagerServiceClient) Grant(ctx context.Context, in *GrantManagerServiceGrantRequest, opts ...grpc.CallOption) (*GrantManagerServiceGrantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GrantManagerServiceGrantResponse) - err := c.cc.Invoke(ctx, "/c1.connector.v2.GrantManagerService/Grant", in, out, opts...) + err := c.cc.Invoke(ctx, GrantManagerService_Grant_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -128,8 +150,9 @@ func (c *grantManagerServiceClient) Grant(ctx context.Context, in *GrantManagerS } func (c *grantManagerServiceClient) Revoke(ctx context.Context, in *GrantManagerServiceRevokeRequest, opts ...grpc.CallOption) (*GrantManagerServiceRevokeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GrantManagerServiceRevokeResponse) - err := c.cc.Invoke(ctx, "/c1.connector.v2.GrantManagerService/Revoke", in, out, opts...) + err := c.cc.Invoke(ctx, GrantManagerService_Revoke_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -138,15 +161,18 @@ func (c *grantManagerServiceClient) Revoke(ctx context.Context, in *GrantManager // GrantManagerServiceServer is the server API for GrantManagerService service. // All implementations should embed UnimplementedGrantManagerServiceServer -// for forward compatibility +// for forward compatibility. type GrantManagerServiceServer interface { Grant(context.Context, *GrantManagerServiceGrantRequest) (*GrantManagerServiceGrantResponse, error) Revoke(context.Context, *GrantManagerServiceRevokeRequest) (*GrantManagerServiceRevokeResponse, error) } -// UnimplementedGrantManagerServiceServer should be embedded to have forward compatible implementations. -type UnimplementedGrantManagerServiceServer struct { -} +// UnimplementedGrantManagerServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGrantManagerServiceServer struct{} func (UnimplementedGrantManagerServiceServer) Grant(context.Context, *GrantManagerServiceGrantRequest) (*GrantManagerServiceGrantResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Grant not implemented") @@ -154,6 +180,7 @@ func (UnimplementedGrantManagerServiceServer) Grant(context.Context, *GrantManag func (UnimplementedGrantManagerServiceServer) Revoke(context.Context, *GrantManagerServiceRevokeRequest) (*GrantManagerServiceRevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } +func (UnimplementedGrantManagerServiceServer) testEmbeddedByValue() {} // UnsafeGrantManagerServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GrantManagerServiceServer will @@ -163,6 +190,13 @@ type UnsafeGrantManagerServiceServer interface { } func RegisterGrantManagerServiceServer(s grpc.ServiceRegistrar, srv GrantManagerServiceServer) { + // If the following call pancis, it indicates UnimplementedGrantManagerServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&GrantManagerService_ServiceDesc, srv) } @@ -176,7 +210,7 @@ func _GrantManagerService_Grant_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c1.connector.v2.GrantManagerService/Grant", + FullMethod: GrantManagerService_Grant_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GrantManagerServiceServer).Grant(ctx, req.(*GrantManagerServiceGrantRequest)) @@ -194,7 +228,7 @@ func _GrantManagerService_Revoke_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c1.connector.v2.GrantManagerService/Revoke", + FullMethod: GrantManagerService_Revoke_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GrantManagerServiceServer).Revoke(ctx, req.(*GrantManagerServiceRevokeRequest)) diff --git a/pb/c1/connector/v2/resource.pb.go b/pb/c1/connector/v2/resource.pb.go index 4efa7209..06cc146e 100644 --- a/pb/c1/connector/v2/resource.pb.go +++ b/pb/c1/connector/v2/resource.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0-devel +// protoc-gen-go v1.36.4 // protoc (unknown) // source: c1/connector/v2/resource.proto @@ -13,6 +13,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -78,23 +79,20 @@ func (ResourceType_Trait) EnumDescriptor() ([]byte, []int) { } type ResourceType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Traits []ResourceType_Trait `protobuf:"varint,3,rep,packed,name=traits,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"traits,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Traits []ResourceType_Trait `protobuf:"varint,3,rep,packed,name=traits,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"traits,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceType) Reset() { *x = ResourceType{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceType) String() string { @@ -105,7 +103,7 @@ func (*ResourceType) ProtoMessage() {} func (x *ResourceType) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,23 +147,20 @@ func (x *ResourceType) GetAnnotations() []*anypb.Any { } type ResourceTypesServiceListResourceTypesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Parent *Resource `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - Parent *Resource `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceTypesServiceListResourceTypesRequest) Reset() { *x = ResourceTypesServiceListResourceTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceTypesServiceListResourceTypesRequest) String() string { @@ -176,7 +171,7 @@ func (*ResourceTypesServiceListResourceTypesRequest) ProtoMessage() {} func (x *ResourceTypesServiceListResourceTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,22 +215,19 @@ func (x *ResourceTypesServiceListResourceTypesRequest) GetAnnotations() []*anypb } type ResourceTypesServiceListResourceTypesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + List []*ResourceType `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - List []*ResourceType `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceTypesServiceListResourceTypesResponse) Reset() { *x = ResourceTypesServiceListResourceTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceTypesServiceListResourceTypesResponse) String() string { @@ -246,7 +238,7 @@ func (*ResourceTypesServiceListResourceTypesResponse) ProtoMessage() {} func (x *ResourceTypesServiceListResourceTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,21 +275,18 @@ func (x *ResourceTypesServiceListResourceTypesResponse) GetAnnotations() []*anyp } type ResourceId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` unknownFields protoimpl.UnknownFields - - ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceId) Reset() { *x = ResourceId{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceId) String() string { @@ -308,7 +297,7 @@ func (*ResourceId) ProtoMessage() {} func (x *ResourceId) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,23 +327,20 @@ func (x *ResourceId) GetResource() string { } type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id *ResourceId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id *ResourceId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -365,7 +351,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,24 +395,21 @@ func (x *Resource) GetAnnotations() []*anypb.Any { } type ResourcesServiceListResourcesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"` - ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` - PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"` + ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` + PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResourcesServiceListResourcesRequest) Reset() { *x = ResourcesServiceListResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcesServiceListResourcesRequest) String() string { @@ -437,7 +420,7 @@ func (*ResourcesServiceListResourcesRequest) ProtoMessage() {} func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,22 +471,19 @@ func (x *ResourcesServiceListResourcesRequest) GetAnnotations() []*anypb.Any { } type ResourcesServiceListResourcesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + List []*Resource `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields - - List []*Resource `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourcesServiceListResourcesResponse) Reset() { *x = ResourcesServiceListResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c1_connector_v2_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c1_connector_v2_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcesServiceListResourcesResponse) String() string { @@ -514,7 +494,7 @@ func (*ResourcesServiceListResourcesResponse) ProtoMessage() {} func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_c1_connector_v2_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,7 +532,7 @@ func (x *ResourcesServiceListResourcesResponse) GetAnnotations() []*anypb.Any { var File_c1_connector_v2_resource_proto protoreflect.FileDescriptor -var file_c1_connector_v2_resource_proto_rawDesc = []byte{ +var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{ 0x0a, 0x1e, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, @@ -687,23 +667,23 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{ 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_c1_connector_v2_resource_proto_rawDescOnce sync.Once - file_c1_connector_v2_resource_proto_rawDescData = file_c1_connector_v2_resource_proto_rawDesc + file_c1_connector_v2_resource_proto_rawDescData []byte ) func file_c1_connector_v2_resource_proto_rawDescGZIP() []byte { file_c1_connector_v2_resource_proto_rawDescOnce.Do(func() { - file_c1_connector_v2_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_resource_proto_rawDescData) + file_c1_connector_v2_resource_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc))) }) return file_c1_connector_v2_resource_proto_rawDescData } var file_c1_connector_v2_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_c1_connector_v2_resource_proto_goTypes = []interface{}{ +var file_c1_connector_v2_resource_proto_goTypes = []any{ (ResourceType_Trait)(0), // 0: c1.connector.v2.ResourceType.Trait (*ResourceType)(nil), // 1: c1.connector.v2.ResourceType (*ResourceTypesServiceListResourceTypesRequest)(nil), // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest @@ -744,97 +724,11 @@ func file_c1_connector_v2_resource_proto_init() { if File_c1_connector_v2_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_c1_connector_v2_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceTypesServiceListResourceTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_resource_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceTypesServiceListResourceTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_resource_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_resource_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_resource_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesServiceListResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c1_connector_v2_resource_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesServiceListResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_c1_connector_v2_resource_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc)), NumEnums: 1, NumMessages: 7, NumExtensions: 0, @@ -846,7 +740,6 @@ func file_c1_connector_v2_resource_proto_init() { MessageInfos: file_c1_connector_v2_resource_proto_msgTypes, }.Build() File_c1_connector_v2_resource_proto = out.File - file_c1_connector_v2_resource_proto_rawDesc = nil file_c1_connector_v2_resource_proto_goTypes = nil file_c1_connector_v2_resource_proto_depIdxs = nil } diff --git a/pb/c1/connector/v2/resource.pb.validate.go b/pb/c1/connector/v2/resource.pb.validate.go index 2c40ac6d..82c8214c 100644 --- a/pb/c1/connector/v2/resource.pb.validate.go +++ b/pb/c1/connector/v2/resource.pb.validate.go @@ -161,7 +161,7 @@ type ResourceTypeMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceTypeMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -357,7 +357,7 @@ type ResourceTypesServiceListResourceTypesRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceTypesServiceListResourceTypesRequestMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -547,7 +547,7 @@ type ResourceTypesServiceListResourceTypesResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceTypesServiceListResourceTypesResponseMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -674,7 +674,7 @@ type ResourceIdMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceIdMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -880,7 +880,7 @@ type ResourceMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourceMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1086,7 +1086,7 @@ type ResourcesServiceListResourcesRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourcesServiceListResourcesRequestMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } @@ -1274,7 +1274,7 @@ type ResourcesServiceListResourcesResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. func (m ResourcesServiceListResourcesResponseMultiError) Error() string { - var msgs []string + msgs := make([]string, 0, len(m)) for _, err := range m { msgs = append(msgs, err.Error()) } diff --git a/pb/c1/connector/v2/resource_grpc.pb.go b/pb/c1/connector/v2/resource_grpc.pb.go index 0c394819..13f3e7d0 100644 --- a/pb/c1/connector/v2/resource_grpc.pb.go +++ b/pb/c1/connector/v2/resource_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: c1/connector/v2/resource.proto @@ -15,8 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ResourceTypesService_ListResourceTypes_FullMethodName = "/c1.connector.v2.ResourceTypesService/ListResourceTypes" +) // ResourceTypesServiceClient is the client API for ResourceTypesService service. // @@ -34,8 +38,9 @@ func NewResourceTypesServiceClient(cc grpc.ClientConnInterface) ResourceTypesSer } func (c *resourceTypesServiceClient) ListResourceTypes(ctx context.Context, in *ResourceTypesServiceListResourceTypesRequest, opts ...grpc.CallOption) (*ResourceTypesServiceListResourceTypesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ResourceTypesServiceListResourceTypesResponse) - err := c.cc.Invoke(ctx, "/c1.connector.v2.ResourceTypesService/ListResourceTypes", in, out, opts...) + err := c.cc.Invoke(ctx, ResourceTypesService_ListResourceTypes_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,18 +49,22 @@ func (c *resourceTypesServiceClient) ListResourceTypes(ctx context.Context, in * // ResourceTypesServiceServer is the server API for ResourceTypesService service. // All implementations should embed UnimplementedResourceTypesServiceServer -// for forward compatibility +// for forward compatibility. type ResourceTypesServiceServer interface { ListResourceTypes(context.Context, *ResourceTypesServiceListResourceTypesRequest) (*ResourceTypesServiceListResourceTypesResponse, error) } -// UnimplementedResourceTypesServiceServer should be embedded to have forward compatible implementations. -type UnimplementedResourceTypesServiceServer struct { -} +// UnimplementedResourceTypesServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedResourceTypesServiceServer struct{} func (UnimplementedResourceTypesServiceServer) ListResourceTypes(context.Context, *ResourceTypesServiceListResourceTypesRequest) (*ResourceTypesServiceListResourceTypesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListResourceTypes not implemented") } +func (UnimplementedResourceTypesServiceServer) testEmbeddedByValue() {} // UnsafeResourceTypesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ResourceTypesServiceServer will @@ -65,6 +74,13 @@ type UnsafeResourceTypesServiceServer interface { } func RegisterResourceTypesServiceServer(s grpc.ServiceRegistrar, srv ResourceTypesServiceServer) { + // If the following call pancis, it indicates UnimplementedResourceTypesServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ResourceTypesService_ServiceDesc, srv) } @@ -78,7 +94,7 @@ func _ResourceTypesService_ListResourceTypes_Handler(srv interface{}, ctx contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c1.connector.v2.ResourceTypesService/ListResourceTypes", + FullMethod: ResourceTypesService_ListResourceTypes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ResourceTypesServiceServer).ListResourceTypes(ctx, req.(*ResourceTypesServiceListResourceTypesRequest)) @@ -102,6 +118,10 @@ var ResourceTypesService_ServiceDesc = grpc.ServiceDesc{ Metadata: "c1/connector/v2/resource.proto", } +const ( + ResourcesService_ListResources_FullMethodName = "/c1.connector.v2.ResourcesService/ListResources" +) + // ResourcesServiceClient is the client API for ResourcesService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -118,8 +138,9 @@ func NewResourcesServiceClient(cc grpc.ClientConnInterface) ResourcesServiceClie } func (c *resourcesServiceClient) ListResources(ctx context.Context, in *ResourcesServiceListResourcesRequest, opts ...grpc.CallOption) (*ResourcesServiceListResourcesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ResourcesServiceListResourcesResponse) - err := c.cc.Invoke(ctx, "/c1.connector.v2.ResourcesService/ListResources", in, out, opts...) + err := c.cc.Invoke(ctx, ResourcesService_ListResources_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -128,18 +149,22 @@ func (c *resourcesServiceClient) ListResources(ctx context.Context, in *Resource // ResourcesServiceServer is the server API for ResourcesService service. // All implementations should embed UnimplementedResourcesServiceServer -// for forward compatibility +// for forward compatibility. type ResourcesServiceServer interface { ListResources(context.Context, *ResourcesServiceListResourcesRequest) (*ResourcesServiceListResourcesResponse, error) } -// UnimplementedResourcesServiceServer should be embedded to have forward compatible implementations. -type UnimplementedResourcesServiceServer struct { -} +// UnimplementedResourcesServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedResourcesServiceServer struct{} func (UnimplementedResourcesServiceServer) ListResources(context.Context, *ResourcesServiceListResourcesRequest) (*ResourcesServiceListResourcesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListResources not implemented") } +func (UnimplementedResourcesServiceServer) testEmbeddedByValue() {} // UnsafeResourcesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ResourcesServiceServer will @@ -149,6 +174,13 @@ type UnsafeResourcesServiceServer interface { } func RegisterResourcesServiceServer(s grpc.ServiceRegistrar, srv ResourcesServiceServer) { + // If the following call pancis, it indicates UnimplementedResourcesServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ResourcesService_ServiceDesc, srv) } @@ -162,7 +194,7 @@ func _ResourcesService_ListResources_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c1.connector.v2.ResourcesService/ListResources", + FullMethod: ResourcesService_ListResources_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ResourcesServiceServer).ListResources(ctx, req.(*ResourcesServiceListResourcesRequest)) diff --git a/pkg/output/console.go b/pkg/output/console.go index af3bbf1f..f0a86dd8 100644 --- a/pkg/output/console.go +++ b/pkg/output/console.go @@ -53,7 +53,7 @@ func (c *consoleManager) formatTimestamp(ts *timestamppb.Timestamp) string { func (c *consoleManager) outputSyncRuns(out *v1.SyncListOutput) error { syncsTable := pterm.TableData{ - {"ID", "Started At", "Ended At", "Token"}, + {"ID", "Started At", "Ended At", "Type", "Parent ID", "Token"}, } for _, o := range out.Syncs { @@ -61,6 +61,8 @@ func (c *consoleManager) outputSyncRuns(out *v1.SyncListOutput) error { o.Id, c.formatTimestamp(o.StartedAt), c.formatTimestamp(o.EndedAt), + o.SyncType, + o.ParentSyncId, o.SyncToken, }) } diff --git a/proto/baton/v1/outputs.proto b/proto/baton/v1/outputs.proto index 330f64f0..4f6feff6 100644 --- a/proto/baton/v1/outputs.proto +++ b/proto/baton/v1/outputs.proto @@ -96,6 +96,8 @@ message SyncOutput { google.protobuf.Timestamp started_at = 2; google.protobuf.Timestamp ended_at = 3; string sync_token = 4; + string sync_type = 5; + string parent_sync_id = 6; } message SyncListOutput { diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go index 51436ad9..6ef572ac 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go @@ -38,6 +38,7 @@ const ( Capability_CAPABILITY_RESOURCE_DELETE Capability = 8 Capability_CAPABILITY_SYNC_SECRETS Capability = 9 Capability_CAPABILITY_ACTIONS Capability = 10 + Capability_CAPABILITY_TARGETED_SYNC Capability = 11 ) // Enum value maps for Capability. @@ -54,6 +55,7 @@ var ( 8: "CAPABILITY_RESOURCE_DELETE", 9: "CAPABILITY_SYNC_SECRETS", 10: "CAPABILITY_ACTIONS", + 11: "CAPABILITY_TARGETED_SYNC", } Capability_value = map[string]int32{ "CAPABILITY_UNSPECIFIED": 0, @@ -67,6 +69,7 @@ var ( "CAPABILITY_RESOURCE_DELETE": 8, "CAPABILITY_SYNC_SECRETS": 9, "CAPABILITY_ACTIONS": 10, + "CAPABILITY_TARGETED_SYNC": 11, } ) @@ -1470,7 +1473,7 @@ var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, - 0xca, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, + 0xe8, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, @@ -1490,49 +1493,51 @@ var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{ 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x53, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, - 0x54, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x2a, 0xf2, 0x01, 0x0a, - 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, - 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, - 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, - 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, - 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, - 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, - 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, - 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, - 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, + 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x0b, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, + 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, + 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, + 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, - 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, - 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, + 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, + 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, + 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, + 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, + 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, + 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, + 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, + 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, - 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, + 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, + 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, + 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go index aa8b9b60..916c5052 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go @@ -173,6 +173,7 @@ type Event struct { // *Event_UsageEvent // *Event_GrantEvent // *Event_RevokeEvent + // *Event_ResourceChangeEvent Event isEvent_Event `protobuf_oneof:"event"` // May contain resources for targets, actor, or items referenced in events Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` @@ -258,6 +259,15 @@ func (x *Event) GetRevokeEvent() *RevokeEvent { return nil } +func (x *Event) GetResourceChangeEvent() *ResourceChangeEvent { + if x != nil { + if x, ok := x.Event.(*Event_ResourceChangeEvent); ok { + return x.ResourceChangeEvent + } + } + return nil +} + func (x *Event) GetAnnotations() []*anypb.Any { if x != nil { return x.Annotations @@ -281,12 +291,18 @@ type Event_RevokeEvent struct { RevokeEvent *RevokeEvent `protobuf:"bytes,102,opt,name=revoke_event,json=revokeEvent,proto3,oneof"` } +type Event_ResourceChangeEvent struct { + ResourceChangeEvent *ResourceChangeEvent `protobuf:"bytes,103,opt,name=resource_change_event,json=resourceChangeEvent,proto3,oneof"` +} + func (*Event_UsageEvent) isEvent_Event() {} func (*Event_GrantEvent) isEvent_Event() {} func (*Event_RevokeEvent) isEvent_Event() {} +func (*Event_ResourceChangeEvent) isEvent_Event() {} + type UsageEvent struct { state protoimpl.MessageState `protogen:"open.v1"` TargetResource *Resource `protobuf:"bytes,1,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"` @@ -436,6 +452,59 @@ func (x *RevokeEvent) GetPrincipal() *Resource { return nil } +// generic light weight event indicating a resource was changed +type ResourceChangeEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceChangeEvent) Reset() { + *x = ResourceChangeEvent{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceChangeEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceChangeEvent) ProtoMessage() {} + +func (x *ResourceChangeEvent) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceChangeEvent.ProtoReflect.Descriptor instead. +func (*ResourceChangeEvent) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{6} +} + +func (x *ResourceChangeEvent) GetResourceId() *ResourceId { + if x != nil { + return x.ResourceId + } + return nil +} + +func (x *ResourceChangeEvent) GetParentResourceId() *ResourceId { + if x != nil { + return x.ParentResourceId + } + return nil +} + var File_c1_connector_v2_event_feed_proto protoreflect.FileDescriptor var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ @@ -478,8 +547,8 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd8, - 0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb4, + 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, @@ -496,43 +565,60 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, - 0x0a, 0x0a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0b, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x32, 0x65, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, - 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, - 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, + 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, + 0xa8, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x32, 0x65, 0x0a, 0x0c, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, + 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, }) var ( @@ -547,7 +633,7 @@ func file_c1_connector_v2_event_feed_proto_rawDescGZIP() []byte { return file_c1_connector_v2_event_feed_proto_rawDescData } -var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_c1_connector_v2_event_feed_proto_goTypes = []any{ (*ListEventsRequest)(nil), // 0: c1.connector.v2.ListEventsRequest (*ListEventsResponse)(nil), // 1: c1.connector.v2.ListEventsResponse @@ -555,34 +641,39 @@ var file_c1_connector_v2_event_feed_proto_goTypes = []any{ (*UsageEvent)(nil), // 3: c1.connector.v2.UsageEvent (*GrantEvent)(nil), // 4: c1.connector.v2.GrantEvent (*RevokeEvent)(nil), // 5: c1.connector.v2.RevokeEvent - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (*anypb.Any)(nil), // 7: google.protobuf.Any - (*Resource)(nil), // 8: c1.connector.v2.Resource - (*Grant)(nil), // 9: c1.connector.v2.Grant - (*Entitlement)(nil), // 10: c1.connector.v2.Entitlement + (*ResourceChangeEvent)(nil), // 6: c1.connector.v2.ResourceChangeEvent + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*anypb.Any)(nil), // 8: google.protobuf.Any + (*Resource)(nil), // 9: c1.connector.v2.Resource + (*Grant)(nil), // 10: c1.connector.v2.Grant + (*Entitlement)(nil), // 11: c1.connector.v2.Entitlement + (*ResourceId)(nil), // 12: c1.connector.v2.ResourceId } var file_c1_connector_v2_event_feed_proto_depIdxs = []int32{ - 6, // 0: c1.connector.v2.ListEventsRequest.start_at:type_name -> google.protobuf.Timestamp - 7, // 1: c1.connector.v2.ListEventsRequest.annotations:type_name -> google.protobuf.Any + 7, // 0: c1.connector.v2.ListEventsRequest.start_at:type_name -> google.protobuf.Timestamp + 8, // 1: c1.connector.v2.ListEventsRequest.annotations:type_name -> google.protobuf.Any 2, // 2: c1.connector.v2.ListEventsResponse.events:type_name -> c1.connector.v2.Event - 7, // 3: c1.connector.v2.ListEventsResponse.annotations:type_name -> google.protobuf.Any - 6, // 4: c1.connector.v2.Event.occurred_at:type_name -> google.protobuf.Timestamp + 8, // 3: c1.connector.v2.ListEventsResponse.annotations:type_name -> google.protobuf.Any + 7, // 4: c1.connector.v2.Event.occurred_at:type_name -> google.protobuf.Timestamp 3, // 5: c1.connector.v2.Event.usage_event:type_name -> c1.connector.v2.UsageEvent 4, // 6: c1.connector.v2.Event.grant_event:type_name -> c1.connector.v2.GrantEvent 5, // 7: c1.connector.v2.Event.revoke_event:type_name -> c1.connector.v2.RevokeEvent - 7, // 8: c1.connector.v2.Event.annotations:type_name -> google.protobuf.Any - 8, // 9: c1.connector.v2.UsageEvent.target_resource:type_name -> c1.connector.v2.Resource - 8, // 10: c1.connector.v2.UsageEvent.actor_resource:type_name -> c1.connector.v2.Resource - 9, // 11: c1.connector.v2.GrantEvent.grant:type_name -> c1.connector.v2.Grant - 10, // 12: c1.connector.v2.RevokeEvent.entitlement:type_name -> c1.connector.v2.Entitlement - 8, // 13: c1.connector.v2.RevokeEvent.principal:type_name -> c1.connector.v2.Resource - 0, // 14: c1.connector.v2.EventService.ListEvents:input_type -> c1.connector.v2.ListEventsRequest - 1, // 15: c1.connector.v2.EventService.ListEvents:output_type -> c1.connector.v2.ListEventsResponse - 15, // [15:16] is the sub-list for method output_type - 14, // [14:15] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 6, // 8: c1.connector.v2.Event.resource_change_event:type_name -> c1.connector.v2.ResourceChangeEvent + 8, // 9: c1.connector.v2.Event.annotations:type_name -> google.protobuf.Any + 9, // 10: c1.connector.v2.UsageEvent.target_resource:type_name -> c1.connector.v2.Resource + 9, // 11: c1.connector.v2.UsageEvent.actor_resource:type_name -> c1.connector.v2.Resource + 10, // 12: c1.connector.v2.GrantEvent.grant:type_name -> c1.connector.v2.Grant + 11, // 13: c1.connector.v2.RevokeEvent.entitlement:type_name -> c1.connector.v2.Entitlement + 9, // 14: c1.connector.v2.RevokeEvent.principal:type_name -> c1.connector.v2.Resource + 12, // 15: c1.connector.v2.ResourceChangeEvent.resource_id:type_name -> c1.connector.v2.ResourceId + 12, // 16: c1.connector.v2.ResourceChangeEvent.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 0, // 17: c1.connector.v2.EventService.ListEvents:input_type -> c1.connector.v2.ListEventsRequest + 1, // 18: c1.connector.v2.EventService.ListEvents:output_type -> c1.connector.v2.ListEventsResponse + 18, // [18:19] is the sub-list for method output_type + 17, // [17:18] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_c1_connector_v2_event_feed_proto_init() } @@ -597,6 +688,7 @@ func file_c1_connector_v2_event_feed_proto_init() { (*Event_UsageEvent)(nil), (*Event_GrantEvent)(nil), (*Event_RevokeEvent)(nil), + (*Event_ResourceChangeEvent)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -604,7 +696,7 @@ func file_c1_connector_v2_event_feed_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_event_feed_proto_rawDesc), len(file_c1_connector_v2_event_feed_proto_rawDesc)), NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go index 6bc19599..1f6f2558 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go @@ -627,6 +627,47 @@ func (m *Event) validate(all bool) error { } } + case *Event_ResourceChangeEvent: + if v == nil { + err := EventValidationError{ + field: "Event", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetResourceChangeEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EventValidationError{ + field: "ResourceChangeEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EventValidationError{ + field: "ResourceChangeEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceChangeEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EventValidationError{ + field: "ResourceChangeEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -1149,3 +1190,174 @@ var _ interface { Cause() error ErrorName() string } = RevokeEventValidationError{} + +// Validate checks the field values on ResourceChangeEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ResourceChangeEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceChangeEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResourceChangeEventMultiError, or nil if none found. +func (m *ResourceChangeEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceChangeEvent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetResourceId() == nil { + err := ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetParentResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceChangeEventValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ResourceChangeEventMultiError(errors) + } + + return nil +} + +// ResourceChangeEventMultiError is an error wrapping multiple validation +// errors returned by ResourceChangeEvent.ValidateAll() if the designated +// constraints aren't met. +type ResourceChangeEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceChangeEventMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceChangeEventMultiError) AllErrors() []error { return m } + +// ResourceChangeEventValidationError is the validation error returned by +// ResourceChangeEvent.Validate if the designated constraints aren't met. +type ResourceChangeEventValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceChangeEventValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceChangeEventValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceChangeEventValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceChangeEventValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceChangeEventValidationError) ErrorName() string { + return "ResourceChangeEventValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceChangeEventValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceChangeEvent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceChangeEventValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceChangeEventValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go index 1639a155..ad9f2313 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go @@ -1610,6 +1610,118 @@ func (x *ResourcesServiceListResourcesResponse) GetAnnotations() []*anypb.Any { return nil } +type ResourceGetterServiceGetResourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceGetterServiceGetResourceRequest) Reset() { + *x = ResourceGetterServiceGetResourceRequest{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceGetterServiceGetResourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceGetterServiceGetResourceRequest) ProtoMessage() {} + +func (x *ResourceGetterServiceGetResourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceGetterServiceGetResourceRequest.ProtoReflect.Descriptor instead. +func (*ResourceGetterServiceGetResourceRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{22} +} + +func (x *ResourceGetterServiceGetResourceRequest) GetResourceId() *ResourceId { + if x != nil { + return x.ResourceId + } + return nil +} + +func (x *ResourceGetterServiceGetResourceRequest) GetParentResourceId() *ResourceId { + if x != nil { + return x.ParentResourceId + } + return nil +} + +func (x *ResourceGetterServiceGetResourceRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ResourceGetterServiceGetResourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceGetterServiceGetResourceResponse) Reset() { + *x = ResourceGetterServiceGetResourceResponse{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceGetterServiceGetResourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceGetterServiceGetResourceResponse) ProtoMessage() {} + +func (x *ResourceGetterServiceGetResourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceGetterServiceGetResourceResponse.ProtoReflect.Descriptor instead. +func (*ResourceGetterServiceGetResourceResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{23} +} + +func (x *ResourceGetterServiceGetResourceResponse) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *ResourceGetterServiceGetResourceResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type ExternalId struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -1621,7 +1733,7 @@ type ExternalId struct { func (x *ExternalId) Reset() { *x = ExternalId{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + mi := &file_c1_connector_v2_resource_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1633,7 +1745,7 @@ func (x *ExternalId) String() string { func (*ExternalId) ProtoMessage() {} func (x *ExternalId) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + mi := &file_c1_connector_v2_resource_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1646,7 +1758,7 @@ func (x *ExternalId) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalId.ProtoReflect.Descriptor instead. func (*ExternalId) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{22} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{24} } func (x *ExternalId) GetId() string { @@ -1681,7 +1793,7 @@ type AccountInfo_Email struct { func (x *AccountInfo_Email) Reset() { *x = AccountInfo_Email{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + mi := &file_c1_connector_v2_resource_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1693,7 +1805,7 @@ func (x *AccountInfo_Email) String() string { func (*AccountInfo_Email) ProtoMessage() {} func (x *AccountInfo_Email) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + mi := &file_c1_connector_v2_resource_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1732,7 +1844,7 @@ type CredentialOptions_RandomPassword struct { func (x *CredentialOptions_RandomPassword) Reset() { *x = CredentialOptions_RandomPassword{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[24] + mi := &file_c1_connector_v2_resource_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1744,7 +1856,7 @@ func (x *CredentialOptions_RandomPassword) String() string { func (*CredentialOptions_RandomPassword) ProtoMessage() {} func (x *CredentialOptions_RandomPassword) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[24] + mi := &file_c1_connector_v2_resource_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1775,7 +1887,7 @@ type CredentialOptions_NoPassword struct { func (x *CredentialOptions_NoPassword) Reset() { *x = CredentialOptions_NoPassword{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[25] + mi := &file_c1_connector_v2_resource_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1787,7 +1899,7 @@ func (x *CredentialOptions_NoPassword) String() string { func (*CredentialOptions_NoPassword) ProtoMessage() {} func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[25] + mi := &file_c1_connector_v2_resource_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1812,7 +1924,7 @@ type CredentialOptions_SSO struct { func (x *CredentialOptions_SSO) Reset() { *x = CredentialOptions_SSO{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[26] + mi := &file_c1_connector_v2_resource_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1824,7 +1936,7 @@ func (x *CredentialOptions_SSO) String() string { func (*CredentialOptions_SSO) ProtoMessage() {} func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[26] + mi := &file_c1_connector_v2_resource_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1857,7 +1969,7 @@ type CreateAccountResponse_SuccessResult struct { func (x *CreateAccountResponse_SuccessResult) Reset() { *x = CreateAccountResponse_SuccessResult{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[27] + mi := &file_c1_connector_v2_resource_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1869,7 +1981,7 @@ func (x *CreateAccountResponse_SuccessResult) String() string { func (*CreateAccountResponse_SuccessResult) ProtoMessage() {} func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[27] + mi := &file_c1_connector_v2_resource_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1910,7 +2022,7 @@ type CreateAccountResponse_ActionRequiredResult struct { func (x *CreateAccountResponse_ActionRequiredResult) Reset() { *x = CreateAccountResponse_ActionRequiredResult{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[28] + mi := &file_c1_connector_v2_resource_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1922,7 +2034,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) String() string { func (*CreateAccountResponse_ActionRequiredResult) ProtoMessage() {} func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[28] + mi := &file_c1_connector_v2_resource_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1968,7 +2080,7 @@ type EncryptionConfig_JWKPublicKeyConfig struct { func (x *EncryptionConfig_JWKPublicKeyConfig) Reset() { *x = EncryptionConfig_JWKPublicKeyConfig{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[29] + mi := &file_c1_connector_v2_resource_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1980,7 +2092,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) String() string { func (*EncryptionConfig_JWKPublicKeyConfig) ProtoMessage() {} func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[29] + mi := &file_c1_connector_v2_resource_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2350,75 +2462,110 @@ var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{ 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, - 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf4, 0x01, 0x0a, 0x27, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, + 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, + 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92, 0x01, - 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, - 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, - 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x56, 0x32, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9c, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, - 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, - 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x67, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x56, 0x32, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, - 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, - 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, + 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, + 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, + 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -2434,7 +2581,7 @@ func file_c1_connector_v2_resource_proto_rawDescGZIP() []byte { } var file_c1_connector_v2_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_c1_connector_v2_resource_proto_goTypes = []any{ (ResourceType_Trait)(0), // 0: c1.connector.v2.ResourceType.Trait (Resource_CreationSource)(0), // 1: c1.connector.v2.Resource.CreationSource @@ -2460,81 +2607,90 @@ var file_c1_connector_v2_resource_proto_goTypes = []any{ (*Resource)(nil), // 21: c1.connector.v2.Resource (*ResourcesServiceListResourcesRequest)(nil), // 22: c1.connector.v2.ResourcesServiceListResourcesRequest (*ResourcesServiceListResourcesResponse)(nil), // 23: c1.connector.v2.ResourcesServiceListResourcesResponse - (*ExternalId)(nil), // 24: c1.connector.v2.ExternalId - (*AccountInfo_Email)(nil), // 25: c1.connector.v2.AccountInfo.Email - (*CredentialOptions_RandomPassword)(nil), // 26: c1.connector.v2.CredentialOptions.RandomPassword - (*CredentialOptions_NoPassword)(nil), // 27: c1.connector.v2.CredentialOptions.NoPassword - (*CredentialOptions_SSO)(nil), // 28: c1.connector.v2.CredentialOptions.SSO - (*CreateAccountResponse_SuccessResult)(nil), // 29: c1.connector.v2.CreateAccountResponse.SuccessResult - (*CreateAccountResponse_ActionRequiredResult)(nil), // 30: c1.connector.v2.CreateAccountResponse.ActionRequiredResult - (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 31: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig - (*anypb.Any)(nil), // 32: google.protobuf.Any - (*structpb.Struct)(nil), // 33: google.protobuf.Struct + (*ResourceGetterServiceGetResourceRequest)(nil), // 24: c1.connector.v2.ResourceGetterServiceGetResourceRequest + (*ResourceGetterServiceGetResourceResponse)(nil), // 25: c1.connector.v2.ResourceGetterServiceGetResourceResponse + (*ExternalId)(nil), // 26: c1.connector.v2.ExternalId + (*AccountInfo_Email)(nil), // 27: c1.connector.v2.AccountInfo.Email + (*CredentialOptions_RandomPassword)(nil), // 28: c1.connector.v2.CredentialOptions.RandomPassword + (*CredentialOptions_NoPassword)(nil), // 29: c1.connector.v2.CredentialOptions.NoPassword + (*CredentialOptions_SSO)(nil), // 30: c1.connector.v2.CredentialOptions.SSO + (*CreateAccountResponse_SuccessResult)(nil), // 31: c1.connector.v2.CreateAccountResponse.SuccessResult + (*CreateAccountResponse_ActionRequiredResult)(nil), // 32: c1.connector.v2.CreateAccountResponse.ActionRequiredResult + (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 33: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig + (*anypb.Any)(nil), // 34: google.protobuf.Any + (*structpb.Struct)(nil), // 35: google.protobuf.Struct } var file_c1_connector_v2_resource_proto_depIdxs = []int32{ 0, // 0: c1.connector.v2.ResourceType.traits:type_name -> c1.connector.v2.ResourceType.Trait - 32, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any + 34, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any 21, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource - 32, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any + 34, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any 2, // 4: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.list:type_name -> c1.connector.v2.ResourceType - 32, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any + 34, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any 21, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource 21, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource - 32, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any + 34, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any 20, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId - 32, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any + 34, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any 20, // 11: c1.connector.v2.DeleteResourceV2Request.resource_id:type_name -> c1.connector.v2.ResourceId - 32, // 12: c1.connector.v2.DeleteResourceV2Response.annotations:type_name -> google.protobuf.Any + 34, // 12: c1.connector.v2.DeleteResourceV2Response.annotations:type_name -> google.protobuf.Any 20, // 13: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId 14, // 14: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions 19, // 15: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig 17, // 16: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData 20, // 17: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId - 32, // 18: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any - 25, // 19: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email - 33, // 20: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct - 26, // 21: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword - 27, // 22: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword - 28, // 23: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO + 34, // 18: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any + 27, // 19: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email + 35, // 20: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct + 28, // 21: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword + 29, // 22: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword + 30, // 23: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO 13, // 24: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo 14, // 25: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions 19, // 26: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 29, // 27: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult - 30, // 28: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult + 31, // 27: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult + 32, // 28: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult 17, // 29: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData - 32, // 30: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any + 34, // 30: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any 21, // 31: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource - 31, // 32: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig + 33, // 32: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig 20, // 33: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId 20, // 34: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 32, // 35: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any - 24, // 36: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId + 34, // 35: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any + 26, // 36: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId 1, // 37: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource 20, // 38: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 32, // 39: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any + 34, // 39: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any 21, // 40: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource - 32, // 41: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any - 21, // 42: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource - 21, // 43: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource - 3, // 44: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest - 22, // 45: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest - 5, // 46: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest - 7, // 47: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest - 9, // 48: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:input_type -> c1.connector.v2.DeleteResourceV2Request - 11, // 49: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest - 15, // 50: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest - 4, // 51: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse - 23, // 52: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse - 6, // 53: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse - 8, // 54: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse - 10, // 55: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:output_type -> c1.connector.v2.DeleteResourceV2Response - 12, // 56: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse - 16, // 57: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse - 51, // [51:58] is the sub-list for method output_type - 44, // [44:51] is the sub-list for method input_type - 44, // [44:44] is the sub-list for extension type_name - 44, // [44:44] is the sub-list for extension extendee - 0, // [0:44] is the sub-list for field type_name + 34, // 41: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any + 20, // 42: c1.connector.v2.ResourceGetterServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 20, // 43: c1.connector.v2.ResourceGetterServiceGetResourceRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 44: c1.connector.v2.ResourceGetterServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any + 21, // 45: c1.connector.v2.ResourceGetterServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource + 34, // 46: c1.connector.v2.ResourceGetterServiceGetResourceResponse.annotations:type_name -> google.protobuf.Any + 21, // 47: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource + 21, // 48: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource + 3, // 49: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest + 22, // 50: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest + 24, // 51: c1.connector.v2.ResourceGetterService.GetResource:input_type -> c1.connector.v2.ResourceGetterServiceGetResourceRequest + 5, // 52: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest + 7, // 53: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest + 9, // 54: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:input_type -> c1.connector.v2.DeleteResourceV2Request + 11, // 55: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest + 15, // 56: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest + 4, // 57: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse + 23, // 58: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse + 25, // 59: c1.connector.v2.ResourceGetterService.GetResource:output_type -> c1.connector.v2.ResourceGetterServiceGetResourceResponse + 6, // 60: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse + 8, // 61: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse + 10, // 62: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:output_type -> c1.connector.v2.DeleteResourceV2Response + 12, // 63: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse + 16, // 64: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse + 57, // [57:65] is the sub-list for method output_type + 49, // [49:57] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { file_c1_connector_v2_resource_proto_init() } @@ -2560,9 +2716,9 @@ func file_c1_connector_v2_resource_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc)), NumEnums: 2, - NumMessages: 30, + NumMessages: 32, NumExtensions: 0, - NumServices: 6, + NumServices: 7, }, GoTypes: file_c1_connector_v2_resource_proto_goTypes, DependencyIndexes: file_c1_connector_v2_resource_proto_depIdxs, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go index ca9162e8..2e0d07a6 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go @@ -3875,6 +3875,373 @@ var _ interface { ErrorName() string } = ResourcesServiceListResourcesResponseValidationError{} +// Validate checks the field values on ResourceGetterServiceGetResourceRequest +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ResourceGetterServiceGetResourceRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ResourceGetterServiceGetResourceRequest with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// ResourceGetterServiceGetResourceRequestMultiError, or nil if none found. +func (m *ResourceGetterServiceGetResourceRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceGetterServiceGetResourceRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceRequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetParentResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceRequestValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ResourceGetterServiceGetResourceRequestMultiError(errors) + } + + return nil +} + +// ResourceGetterServiceGetResourceRequestMultiError is an error wrapping +// multiple validation errors returned by +// ResourceGetterServiceGetResourceRequest.ValidateAll() if the designated +// constraints aren't met. +type ResourceGetterServiceGetResourceRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceGetterServiceGetResourceRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceGetterServiceGetResourceRequestMultiError) AllErrors() []error { return m } + +// ResourceGetterServiceGetResourceRequestValidationError is the validation +// error returned by ResourceGetterServiceGetResourceRequest.Validate if the +// designated constraints aren't met. +type ResourceGetterServiceGetResourceRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceGetterServiceGetResourceRequestValidationError) ErrorName() string { + return "ResourceGetterServiceGetResourceRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceGetterServiceGetResourceRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceGetterServiceGetResourceRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceGetterServiceGetResourceRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceGetterServiceGetResourceRequestValidationError{} + +// Validate checks the field values on ResourceGetterServiceGetResourceResponse +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ResourceGetterServiceGetResourceResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ResourceGetterServiceGetResourceResponse with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ResourceGetterServiceGetResourceResponseMultiError, or nil if none found. +func (m *ResourceGetterServiceGetResourceResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceGetterServiceGetResourceResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ResourceGetterServiceGetResourceResponseMultiError(errors) + } + + return nil +} + +// ResourceGetterServiceGetResourceResponseMultiError is an error wrapping +// multiple validation errors returned by +// ResourceGetterServiceGetResourceResponse.ValidateAll() if the designated +// constraints aren't met. +type ResourceGetterServiceGetResourceResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceGetterServiceGetResourceResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceGetterServiceGetResourceResponseMultiError) AllErrors() []error { return m } + +// ResourceGetterServiceGetResourceResponseValidationError is the validation +// error returned by ResourceGetterServiceGetResourceResponse.Validate if the +// designated constraints aren't met. +type ResourceGetterServiceGetResourceResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceGetterServiceGetResourceResponseValidationError) ErrorName() string { + return "ResourceGetterServiceGetResourceResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceGetterServiceGetResourceResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceGetterServiceGetResourceResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceGetterServiceGetResourceResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceGetterServiceGetResourceResponseValidationError{} + // Validate checks the field values on ExternalId with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go index a3718142..c1fe9d71 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go @@ -218,6 +218,106 @@ var ResourcesService_ServiceDesc = grpc.ServiceDesc{ Metadata: "c1/connector/v2/resource.proto", } +const ( + ResourceGetterService_GetResource_FullMethodName = "/c1.connector.v2.ResourceGetterService/GetResource" +) + +// ResourceGetterServiceClient is the client API for ResourceGetterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ResourceGetterServiceClient interface { + GetResource(ctx context.Context, in *ResourceGetterServiceGetResourceRequest, opts ...grpc.CallOption) (*ResourceGetterServiceGetResourceResponse, error) +} + +type resourceGetterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewResourceGetterServiceClient(cc grpc.ClientConnInterface) ResourceGetterServiceClient { + return &resourceGetterServiceClient{cc} +} + +func (c *resourceGetterServiceClient) GetResource(ctx context.Context, in *ResourceGetterServiceGetResourceRequest, opts ...grpc.CallOption) (*ResourceGetterServiceGetResourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResourceGetterServiceGetResourceResponse) + err := c.cc.Invoke(ctx, ResourceGetterService_GetResource_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ResourceGetterServiceServer is the server API for ResourceGetterService service. +// All implementations should embed UnimplementedResourceGetterServiceServer +// for forward compatibility. +type ResourceGetterServiceServer interface { + GetResource(context.Context, *ResourceGetterServiceGetResourceRequest) (*ResourceGetterServiceGetResourceResponse, error) +} + +// UnimplementedResourceGetterServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedResourceGetterServiceServer struct{} + +func (UnimplementedResourceGetterServiceServer) GetResource(context.Context, *ResourceGetterServiceGetResourceRequest) (*ResourceGetterServiceGetResourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetResource not implemented") +} +func (UnimplementedResourceGetterServiceServer) testEmbeddedByValue() {} + +// UnsafeResourceGetterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ResourceGetterServiceServer will +// result in compilation errors. +type UnsafeResourceGetterServiceServer interface { + mustEmbedUnimplementedResourceGetterServiceServer() +} + +func RegisterResourceGetterServiceServer(s grpc.ServiceRegistrar, srv ResourceGetterServiceServer) { + // If the following call pancis, it indicates UnimplementedResourceGetterServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ResourceGetterService_ServiceDesc, srv) +} + +func _ResourceGetterService_GetResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceGetterServiceGetResourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceGetterServiceServer).GetResource(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceGetterService_GetResource_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceGetterServiceServer).GetResource(ctx, req.(*ResourceGetterServiceGetResourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ResourceGetterService_ServiceDesc is the grpc.ServiceDesc for ResourceGetterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ResourceGetterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.connector.v2.ResourceGetterService", + HandlerType: (*ResourceGetterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetResource", + Handler: _ResourceGetterService_GetResource_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/connector/v2/resource.proto", +} + const ( ResourceManagerService_CreateResource_FullMethodName = "/c1.connector.v2.ResourceManagerService/CreateResource" ResourceManagerService_DeleteResource_FullMethodName = "/c1.connector.v2.ResourceManagerService/DeleteResource" diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go index 9b50c16f..533ce03e 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go @@ -30,6 +30,8 @@ type SyncRun struct { StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` EndedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"` SyncToken string `protobuf:"bytes,4,opt,name=sync_token,json=syncToken,proto3" json:"sync_token,omitempty"` + SyncType string `protobuf:"bytes,5,opt,name=sync_type,json=syncType,proto3" json:"sync_type,omitempty"` + ParentSyncId string `protobuf:"bytes,6,opt,name=parent_sync_id,json=parentSyncId,proto3" json:"parent_sync_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -92,6 +94,20 @@ func (x *SyncRun) GetSyncToken() string { return "" } +func (x *SyncRun) GetSyncType() string { + if x != nil { + return x.SyncType + } + return "" +} + +func (x *SyncRun) GetParentSyncId() string { + if x != nil { + return x.ParentSyncId + } + return "" +} + type SyncsReaderServiceGetSyncRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SyncId string `protobuf:"bytes,1,opt,name=sync_id,json=syncId,proto3" json:"sync_id,omitempty"` @@ -422,7 +438,7 @@ var file_c1_reader_v2_sync_proto_rawDesc = string([]byte{ 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x01, 0x0a, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x07, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, @@ -433,91 +449,95 @@ var file_c1_reader_v2_sync_proto_rawDesc = string([]byte{ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x20, 0x53, 0x79, 0x6e, - 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x86, - 0x01, 0x0a, 0x21, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x22, 0x53, 0x79, 0x6e, 0x63, - 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, - 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, - 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc1, 0x01, - 0x0a, 0x23, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x05, 0x73, 0x79, 0x6e, - 0x63, 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, - 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x73, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x79, + 0x6e, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x22, 0x73, 0x0a, 0x20, + 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x68, 0x0a, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x2f, - 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x32, 0x89, 0x03, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2e, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x22, 0x86, 0x01, 0x0a, 0x21, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, + 0x6e, 0x63, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x22, 0x53, + 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xc1, 0x01, 0x0a, 0x23, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x79, 0x6e, 0x63, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x05, + 0x73, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x68, 0x0a, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x94, + 0x01, 0x0a, 0x2f, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x36, 0x0a, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x89, 0x03, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2e, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x53, 0x79, 0x6e, 0x63, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, - 0x63, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, - 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, - 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, - 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, + 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go index 13702f99..9f92d176 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go @@ -118,6 +118,10 @@ func (m *SyncRun) validate(all bool) error { // no validation rules for SyncToken + // no validation rules for SyncType + + // no validation rules for ParentSyncId + if len(errors) > 0 { return SyncRunMultiError(errors) } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go index 7ca90658..45001a6d 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go @@ -36,6 +36,7 @@ type Writer interface { Reader StartSync(ctx context.Context) (string, bool, error) StartNewSync(ctx context.Context) (string, error) + StartNewPartialSync(ctx context.Context) (string, error) CurrentSyncStep(ctx context.Context) (string, error) CheckpointSync(ctx context.Context, syncToken string) error EndSync(ctx context.Context) error diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go index 6fc9066f..035fbcf6 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go @@ -49,6 +49,10 @@ func (r *assetsTable) Schema() (string, []interface{}) { } } +func (r *assetsTable) Migrations(ctx context.Context, db *goqu.Database) error { + return nil +} + // PutAsset stores the given asset in the database. func (c *C1File) PutAsset(ctx context.Context, assetRef *v2.AssetRef, contentType string, data []byte) error { ctx, span := tracer.Start(ctx, "C1File.PutAsset") diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go index 87fe0270..ff184d39 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go @@ -192,11 +192,14 @@ func (c *C1File) init(ctx context.Context) error { for _, t := range allTableDescriptors { query, args := t.Schema() - _, err = c.db.ExecContext(ctx, fmt.Sprintf(query, args...)) if err != nil { return err } + err = t.Migrations(ctx, c.db) + if err != nil { + return err + } } for _, pragma := range c.pragmas { diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go index 55a8a408..95eb7d83 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go @@ -49,6 +49,10 @@ func (r *entitlementsTable) Schema() (string, []interface{}) { } } +func (r *entitlementsTable) Migrations(ctx context.Context, db *goqu.Database) error { + return nil +} + func (c *C1File) ListEntitlements(ctx context.Context, request *v2.EntitlementsServiceListEntitlementsRequest) (*v2.EntitlementsServiceListEntitlementsResponse, error) { ctx, span := tracer.Start(ctx, "C1File.ListEntitlements") defer span.End() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go index 972dfe24..2ac105f8 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go @@ -58,6 +58,10 @@ func (r *grantsTable) Schema() (string, []interface{}) { } } +func (r *grantsTable) Migrations(ctx context.Context, db *goqu.Database) error { + return nil +} + func (c *C1File) ListGrants(ctx context.Context, request *v2.GrantsServiceListGrantsRequest) (*v2.GrantsServiceListGrantsResponse, error) { ctx, span := tracer.Start(ctx, "C1File.ListGrants") defer span.End() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go index 9197e751..d24a3310 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go @@ -45,6 +45,10 @@ func (r *resourceTypesTable) Schema() (string, []interface{}) { } } +func (r *resourceTypesTable) Migrations(ctx context.Context, db *goqu.Database) error { + return nil +} + func (c *C1File) ListResourceTypes(ctx context.Context, request *v2.ResourceTypesServiceListResourceTypesRequest) (*v2.ResourceTypesServiceListResourceTypesResponse, error) { ctx, span := tracer.Start(ctx, "C1File.ListResourceTypes") defer span.End() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go index 84d16f6b..0f1a7533 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go @@ -54,6 +54,10 @@ func (r *resourcesTable) Schema() (string, []interface{}) { } } +func (r *resourcesTable) Migrations(ctx context.Context, db *goqu.Database) error { + return nil +} + func (c *C1File) ListResources(ctx context.Context, request *v2.ResourcesServiceListResourcesRequest) (*v2.ResourcesServiceListResourcesResponse, error) { ctx, span := tracer.Start(ctx, "C1File.ListResources") defer span.End() diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go index 931a3245..b316d8ea 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go @@ -32,6 +32,7 @@ type tableDescriptor interface { Name() string Schema() (string, []interface{}) Version() string + Migrations(ctx context.Context, db *goqu.Database) error } type listRequest interface { @@ -178,7 +179,7 @@ func (c *C1File) listConnectorObjects(ctx context.Context, tableName string, req default: var latestSyncRun *syncRun var err error - latestSyncRun, err = c.getFinishedSync(ctx, 0) + latestSyncRun, err = c.getFinishedSync(ctx, 0, SyncTypeFull) if err != nil { return nil, "", err } @@ -359,7 +360,7 @@ func (c *C1File) getResourceObject(ctx context.Context, resourceID *v2.ResourceI default: var latestSyncRun *syncRun var err error - latestSyncRun, err = c.getFinishedSync(ctx, 0) + latestSyncRun, err = c.getFinishedSync(ctx, 0, SyncTypeFull) if err != nil { return err } @@ -419,15 +420,15 @@ func (c *C1File) getConnectorObject(ctx context.Context, tableName string, id st default: var latestSyncRun *syncRun var err error - latestSyncRun, err = c.getFinishedSync(ctx, 0) + latestSyncRun, err = c.getFinishedSync(ctx, 0, SyncTypeAny) if err != nil { - return err + return fmt.Errorf("error getting finished sync: %w", err) } if latestSyncRun == nil { latestSyncRun, err = c.getLatestUnfinishedSync(ctx) if err != nil { - return err + return fmt.Errorf("error getting latest unfinished sync: %w", err) } } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go index 69f1170a..b4ee028c 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go @@ -26,7 +26,9 @@ create table if not exists %s ( sync_id text not null, started_at datetime not null, ended_at datetime, - sync_token text not null + sync_token text not null, + sync_type text not null default 'full', + parent_sync_id text not null default '' ); create unique index if not exists %s on %s (sync_id);` @@ -50,11 +52,51 @@ func (r *syncRunsTable) Schema() (string, []interface{}) { } } +func (r *syncRunsTable) Migrations(ctx context.Context, db *goqu.Database) error { + // Check if sync_type column exists + var syncTypeExists int + err := db.QueryRowContext(ctx, fmt.Sprintf("select count(*) from pragma_table_info('%s') where name='sync_type'", r.Name())).Scan(&syncTypeExists) + if err != nil { + return err + } + if syncTypeExists == 0 { + _, err = db.ExecContext(ctx, fmt.Sprintf("alter table %s add column sync_type text not null default 'full'", r.Name())) + if err != nil { + return err + } + } + + // Check if parent_sync_id column exists + var parentSyncIDExists int + err = db.QueryRowContext(ctx, fmt.Sprintf("select count(*) from pragma_table_info('%s') where name='parent_sync_id'", r.Name())).Scan(&parentSyncIDExists) + if err != nil { + return err + } + if parentSyncIDExists == 0 { + _, err = db.ExecContext(ctx, fmt.Sprintf("alter table %s add column parent_sync_id text not null default ''", r.Name())) + if err != nil { + return err + } + } + + return nil +} + +type SyncType string + +const ( + SyncTypeFull SyncType = "full" + SyncTypePartial SyncType = "partial" + SyncTypeAny SyncType = "" +) + type syncRun struct { - ID string - StartedAt *time.Time - EndedAt *time.Time - SyncToken string + ID string + StartedAt *time.Time + EndedAt *time.Time + SyncToken string + Type SyncType + ParentSyncID string } func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error) { @@ -70,7 +112,7 @@ func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error) oneWeekAgo := time.Now().AddDate(0, 0, -7) ret := &syncRun{} q := c.db.From(syncRuns.Name()) - q = q.Select("sync_id", "started_at", "ended_at", "sync_token") + q = q.Select("sync_id", "started_at", "ended_at", "sync_token", "sync_type", "parent_sync_id") q = q.Where(goqu.C("ended_at").IsNull()) q = q.Where(goqu.C("started_at").Gte(oneWeekAgo)) q = q.Order(goqu.C("started_at").Desc()) @@ -83,7 +125,7 @@ func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error) row := c.db.QueryRowContext(ctx, query, args...) - err = row.Scan(&ret.ID, &ret.StartedAt, &ret.EndedAt, &ret.SyncToken) + err = row.Scan(&ret.ID, &ret.StartedAt, &ret.EndedAt, &ret.SyncToken, &ret.Type, &ret.ParentSyncID) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, nil @@ -94,7 +136,7 @@ func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error) return ret, nil } -func (c *C1File) getFinishedSync(ctx context.Context, offset uint) (*syncRun, error) { +func (c *C1File) getFinishedSync(ctx context.Context, offset uint, syncType SyncType) (*syncRun, error) { ctx, span := tracer.Start(ctx, "C1File.getFinishedSync") defer span.End() @@ -103,10 +145,18 @@ func (c *C1File) getFinishedSync(ctx context.Context, offset uint) (*syncRun, er return nil, err } + // Validate syncType + if syncType != SyncTypeFull && syncType != SyncTypePartial && syncType != SyncTypeAny { + return nil, fmt.Errorf("invalid sync type: %s", syncType) + } + ret := &syncRun{} q := c.db.From(syncRuns.Name()) - q = q.Select("sync_id", "started_at", "ended_at", "sync_token") + q = q.Select("sync_id", "started_at", "ended_at", "sync_token", "sync_type", "parent_sync_id") q = q.Where(goqu.C("ended_at").IsNotNull()) + if syncType != SyncTypeAny { + q = q.Where(goqu.C("sync_type").Eq(syncType)) + } q = q.Order(goqu.C("ended_at").Desc()) q = q.Limit(1) @@ -121,7 +171,7 @@ func (c *C1File) getFinishedSync(ctx context.Context, offset uint) (*syncRun, er row := c.db.QueryRowContext(ctx, query, args...) - err = row.Scan(&ret.ID, &ret.StartedAt, &ret.EndedAt, &ret.SyncToken) + err = row.Scan(&ret.ID, &ret.StartedAt, &ret.EndedAt, &ret.SyncToken, &ret.Type, &ret.ParentSyncID) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, nil @@ -142,7 +192,7 @@ func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize ui } q := c.db.From(syncRuns.Name()).Prepared(true) - q = q.Select("id", "sync_id", "started_at", "ended_at", "sync_token") + q = q.Select("id", "sync_id", "started_at", "ended_at", "sync_token", "sync_type", "parent_sync_id") if pageToken != "" { q = q.Where(goqu.C("id").Gte(pageToken)) @@ -177,7 +227,7 @@ func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize ui } rowId := 0 data := &syncRun{} - err := rows.Scan(&rowId, &data.ID, &data.StartedAt, &data.EndedAt, &data.SyncToken) + err := rows.Scan(&rowId, &data.ID, &data.StartedAt, &data.EndedAt, &data.SyncToken, &data.Type, &data.ParentSyncID) if err != nil { return nil, "", err } @@ -197,7 +247,7 @@ func (c *C1File) LatestSyncID(ctx context.Context) (string, error) { ctx, span := tracer.Start(ctx, "C1File.LatestSyncID") defer span.End() - s, err := c.getFinishedSync(ctx, 0) + s, err := c.getFinishedSync(ctx, 0, SyncTypeFull) if err != nil { return "", err } @@ -223,7 +273,7 @@ func (c *C1File) PreviousSyncID(ctx context.Context) (string, error) { ctx, span := tracer.Start(ctx, "C1File.PreviousSyncID") defer span.End() - s, err := c.getFinishedSync(ctx, 1) + s, err := c.getFinishedSync(ctx, 1, SyncTypeFull) if err != nil { return "", err } @@ -239,7 +289,7 @@ func (c *C1File) LatestFinishedSync(ctx context.Context) (string, error) { ctx, span := tracer.Start(ctx, "C1File.LatestFinishedSync") defer span.End() - s, err := c.getFinishedSync(ctx, 0) + s, err := c.getFinishedSync(ctx, 0, SyncTypeFull) if err != nil { return "", err } @@ -263,16 +313,15 @@ func (c *C1File) getSync(ctx context.Context, syncID string) (*syncRun, error) { ret := &syncRun{} q := c.db.From(syncRuns.Name()) - q = q.Select("sync_id", "started_at", "ended_at", "sync_token") + q = q.Select("sync_id", "started_at", "ended_at", "sync_token", "sync_type", "parent_sync_id") q = q.Where(goqu.C("sync_id").Eq(syncID)) query, args, err := q.ToSQL() if err != nil { return nil, err } - row := c.db.QueryRowContext(ctx, query, args...) - err = row.Scan(&ret.ID, &ret.StartedAt, &ret.EndedAt, &ret.SyncToken) + err = row.Scan(&ret.ID, &ret.StartedAt, &ret.EndedAt, &ret.SyncToken, &ret.Type, &ret.ParentSyncID) if err != nil { return nil, err } @@ -355,6 +404,17 @@ func (c *C1File) StartNewSync(ctx context.Context) (string, error) { ctx, span := tracer.Start(ctx, "C1File.StartNewSync") defer span.End() + return c.startNewSyncInternal(ctx, SyncTypeFull) +} + +func (c *C1File) StartNewPartialSync(ctx context.Context) (string, error) { + ctx, span := tracer.Start(ctx, "C1File.StartNewPartialSync") + defer span.End() + + return c.startNewSyncInternal(ctx, SyncTypePartial) +} + +func (c *C1File) startNewSyncInternal(ctx context.Context, syncType SyncType) (string, error) { // Not sure if we want to do this here if c.currentSyncID != "" { return c.currentSyncID, nil @@ -364,9 +424,11 @@ func (c *C1File) StartNewSync(ctx context.Context) (string, error) { q := c.db.Insert(syncRuns.Name()) q = q.Rows(goqu.Record{ - "sync_id": syncID, - "started_at": time.Now().Format("2006-01-02 15:04:05.999999999"), - "sync_token": "", + "sync_id": syncID, + "started_at": time.Now().Format("2006-01-02 15:04:05.999999999"), + "sync_token": "", + "sync_type": syncType, + "parent_sync_id": "", }) query, args, err := q.ToSQL() @@ -452,6 +514,7 @@ func (c *C1File) Cleanup(ctx context.Context) error { } var ret []*syncRun + var partials []*syncRun pageToken := "" for { @@ -464,7 +527,11 @@ func (c *C1File) Cleanup(ctx context.Context) error { if sr.EndedAt == nil { continue } - ret = append(ret, sr) + if sr.Type == SyncTypePartial { + partials = append(partials, sr) + } else { + ret = append(ret, sr) + } } if nextPageToken == "" { @@ -492,6 +559,25 @@ func (c *C1File) Cleanup(ctx context.Context) error { l.Info("Removed old sync data.", zap.String("sync_date", ret[i].EndedAt.Format(time.RFC3339)), zap.String("sync_id", ret[i].ID)) } + // Delete partial syncs that ended before the earliest-kept sync started + if len(ret) > syncLimit { + earliestKeptSync := ret[len(ret)-syncLimit] + l.Debug("Earliest kept sync", zap.String("sync_id", earliestKeptSync.ID), zap.Time("started_at", *earliestKeptSync.StartedAt)) + + for _, partial := range partials { + if partial.EndedAt != nil && partial.EndedAt.Before(*earliestKeptSync.StartedAt) { + err = c.DeleteSyncRun(ctx, partial.ID) + if err != nil { + return err + } + l.Info("Removed partial sync that ended before earliest kept sync.", + zap.String("partial_sync_end", partial.EndedAt.Format(time.RFC3339)), + zap.String("earliest_kept_sync_start", earliestKeptSync.StartedAt.Format(time.RFC3339)), + zap.String("sync_id", partial.ID)) + } + } + } + err = c.Vacuum(ctx) if err != nil { return err @@ -574,10 +660,12 @@ func (c *C1File) GetSync(ctx context.Context, request *reader_v2.SyncsReaderServ return &reader_v2.SyncsReaderServiceGetSyncResponse{ Sync: &reader_v2.SyncRun{ - Id: sr.ID, - StartedAt: toTimeStamp(sr.StartedAt), - EndedAt: toTimeStamp(sr.EndedAt), - SyncToken: sr.SyncToken, + Id: sr.ID, + StartedAt: toTimeStamp(sr.StartedAt), + EndedAt: toTimeStamp(sr.EndedAt), + SyncToken: sr.SyncToken, + SyncType: string(sr.Type), + ParentSyncId: sr.ParentSyncID, }, }, nil } @@ -594,10 +682,12 @@ func (c *C1File) ListSyncs(ctx context.Context, request *reader_v2.SyncsReaderSe syncRuns := make([]*reader_v2.SyncRun, len(syncs)) for i, sr := range syncs { syncRuns[i] = &reader_v2.SyncRun{ - Id: sr.ID, - StartedAt: toTimeStamp(sr.StartedAt), - EndedAt: toTimeStamp(sr.EndedAt), - SyncToken: sr.SyncToken, + Id: sr.ID, + StartedAt: toTimeStamp(sr.StartedAt), + EndedAt: toTimeStamp(sr.EndedAt), + SyncToken: sr.SyncToken, + SyncType: string(sr.Type), + ParentSyncId: sr.ParentSyncID, } } @@ -611,17 +701,19 @@ func (c *C1File) GetLatestFinishedSync(ctx context.Context, request *reader_v2.S ctx, span := tracer.Start(ctx, "C1File.GetLatestFinishedSync") defer span.End() - sync, err := c.getFinishedSync(ctx, 0) + sync, err := c.getFinishedSync(ctx, 0, SyncTypeFull) if err != nil { return nil, fmt.Errorf("error fetching latest finished sync: %w", err) } return &reader_v2.SyncsReaderServiceGetLatestFinishedSyncResponse{ Sync: &reader_v2.SyncRun{ - Id: sync.ID, - StartedAt: toTimeStamp(sync.StartedAt), - EndedAt: toTimeStamp(sync.EndedAt), - SyncToken: sync.SyncToken, + Id: sync.ID, + StartedAt: toTimeStamp(sync.StartedAt), + EndedAt: toTimeStamp(sync.EndedAt), + SyncToken: sync.SyncToken, + SyncType: string(sync.Type), + ParentSyncId: sync.ParentSyncID, }, }, nil } diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go new file mode 100644 index 00000000..87d5613a --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/generic_bag.go @@ -0,0 +1,118 @@ +package pagination + +import ( + "encoding/json" + "fmt" +) + +var ErrNoToken = fmt.Errorf("pagination token cannot be nil") + +type genericSerializedPaginationBag[T any] struct { + States []T `json:"states"` + CurrentState *T `json:"current_state"` +} + +// GenBag holds pagination states that can be serialized for use as page tokens. It acts as a stack that you can push and pop +// pagination operations from. +// This is a generic version of the Bag struct. +type GenBag[T any] struct { + states []T + currentState *T +} + +func GenBagFromToken[T any](pToken *Token) (*GenBag[T], error) { + if pToken == nil { + return nil, ErrNoToken + } + + bag := &GenBag[T]{} + err := bag.Unmarshal(pToken.Token) + if err != nil { + return nil, err + } + return bag, nil +} + +func (pb *GenBag[T]) push(s T) { + if pb.currentState == nil { + pb.currentState = &s + return + } + + pb.states = append(pb.states, *pb.currentState) + pb.currentState = &s +} + +func (pb *GenBag[T]) pop() *T { + if pb.currentState == nil { + return nil + } + + ret := *pb.currentState + + if len(pb.states) > 0 { + pb.currentState = &pb.states[len(pb.states)-1] + pb.states = pb.states[:len(pb.states)-1] + } else { + pb.currentState = nil + } + + return &ret +} + +// Push pushes a new page state onto the stack. +func (pb *GenBag[T]) Push(state T) { + pb.push(state) +} + +// Pop returns the current page action, and makes the top of the stack the current. +func (pb *GenBag[T]) Pop() *T { + return pb.pop() +} + +// Current returns the current page state for the bag. +func (pb *GenBag[T]) Current() *T { + if pb.currentState == nil { + return nil + } + + current := *pb.currentState + return ¤t +} + +// Unmarshal takes an input string and unmarshals it onto the state object. +func (pb *GenBag[T]) Unmarshal(input string) error { + var target genericSerializedPaginationBag[T] + + if input != "" { + err := json.Unmarshal([]byte(input), &target) + if err != nil { + return fmt.Errorf("page token corrupt: %w", err) + } + + pb.states = target.States + pb.currentState = target.CurrentState + } else { + pb.states = nil + pb.currentState = nil + } + + return nil +} + +// Marshal returns a string encoding of the state object. +func (pb *GenBag[T]) Marshal() (string, error) { + if pb.currentState == nil { + return "", nil + } + + data, err := json.Marshal(genericSerializedPaginationBag[T]{ + States: pb.states, + CurrentState: pb.currentState, + }) + if err != nil { + return "", err + } + + return string(data), nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go new file mode 100644 index 00000000..a714ca99 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/pagination/pagination.go @@ -0,0 +1,193 @@ +package pagination + +import ( + "encoding/json" + "fmt" +) + +type StreamToken struct { + Size int + Cursor string +} + +type StreamState struct { + Cursor string `json:"cursor"` + HasMore bool `json:"done"` +} + +type Token struct { + Size int + Token string +} + +type PageState struct { + Token string `json:"token,omitempty"` + ResourceTypeID string `json:"type,omitempty"` + ResourceID string `json:"id,omitempty"` +} + +// Bag holds pagination states that can be serialized for use as page tokens. It acts as a stack that you can push and pop +// pagination operations from. +type Bag struct { + states []PageState + currentState *PageState +} + +type serializedPaginationBag struct { + States []PageState `json:"states"` + CurrentState *PageState `json:"current_state"` +} + +func (pb *Bag) push(s PageState) { + if pb.currentState == nil { + pb.currentState = &s + return + } + + pb.states = append(pb.states, *pb.currentState) + pb.currentState = &s +} + +func (pb *Bag) pop() *PageState { + if pb.currentState == nil { + return nil + } + + ret := *pb.currentState + + if len(pb.states) > 0 { + pb.currentState = &pb.states[len(pb.states)-1] + pb.states = pb.states[:len(pb.states)-1] + } else { + pb.currentState = nil + } + + return &ret +} + +// Push pushes a new page state onto the stack. +func (pb *Bag) Push(state PageState) { + pb.push(state) +} + +// Pop returns the current page action, and makes the top of the stack the current. +func (pb *Bag) Pop() *PageState { + return pb.pop() +} + +// Next pops the current token, and pushes a copy of it with an updated page token. +func (pb *Bag) Next(pageToken string) error { + st := pb.pop() + if st == nil { + return fmt.Errorf("no active page state") + } + + if pageToken != "" { + newState := *st + newState.Token = pageToken + pb.push(newState) + } + + return nil +} + +// Next pops the current token, and pushes a copy of it with an updated page token. +func (pb *Bag) NextToken(pageToken string) (string, error) { + // assume that `pb` was passed an empty token + if pb.currentState == nil { + pb.currentState = &PageState{ + Token: pageToken, + } + return pb.Marshal() + } + + st := pb.pop() + if st == nil { + return "", fmt.Errorf("no active page state") + } + + if pageToken != "" { + newState := *st + newState.Token = pageToken + pb.push(newState) + } + + return pb.Marshal() +} + +// Current returns the current page state for the bag. +func (pb *Bag) Current() *PageState { + if pb.currentState == nil { + return nil + } + + current := *pb.currentState + return ¤t +} + +// Unmarshal takes an input string and unmarshals it onto the state object. +func (pb *Bag) Unmarshal(input string) error { + token := serializedPaginationBag{} + + if input != "" { + err := json.Unmarshal([]byte(input), &token) + if err != nil { + return fmt.Errorf("page token corrupt: %w", err) + } + + pb.states = token.States + pb.currentState = token.CurrentState + } else { + pb.states = nil + pb.currentState = nil + } + + return nil +} + +// Marshal returns a string encoding of the state object. +func (pb *Bag) Marshal() (string, error) { + if pb.currentState == nil { + return "", nil + } + + data, err := json.Marshal(serializedPaginationBag{ + States: pb.states, + CurrentState: pb.currentState, + }) + if err != nil { + return "", err + } + + return string(data), nil +} + +// PageToken returns the page token for the current state. +func (pb *Bag) PageToken() string { + c := pb.Current() + if c == nil { + return "" + } + + return c.Token +} + +// ResourceTypeID returns the resource type id for the current state. +func (pb *Bag) ResourceTypeID() string { + c := pb.Current() + if c == nil { + return "" + } + + return c.ResourceTypeID +} + +// ResourceID returns the resource ID for the current state. +func (pb *Bag) ResourceID() string { + c := pb.Current() + if c == nil { + return "" + } + + return c.ResourceID +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go index be8a43cf..ed385a7e 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go @@ -1,3 +1,3 @@ package sdk -const Version = "v0.2.93" +const Version = "v0.2.100" diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/pagination.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/pagination.go new file mode 100644 index 00000000..397eb4b9 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/pagination.go @@ -0,0 +1,99 @@ +package uhttp + +import ( + "strings" + + "github.com/conductorone/baton-sdk/pkg/pagination" +) + +/* + * Uhttp pagination handling. + * There are three common types of pagination: + * 1. NextLink: http header containing a url to fetch the next page + * 2. Cursor: http body containing a token to fetch the next page + * 3. Offset: offset + limit to fetch the next page + * - Subset of offset: incremental page numbers + * + * All of these helper functions take a bag and push the next page state on (if there is a next page). + */ + +type NextLinkConfig struct { + Header string `json:"header,omitempty"` // HTTP header containing the next link. Defaults to "link". + Rel string `json:"rel,omitempty"` // The rel value to look for in the link header. Defaults to "next". + ResourceTypeID string `json:"resource_type_id,omitempty"` + ResourceID string `json:"resource_id,omitempty"` +} + +// Parses the link header and returns a map of rel values to URLs. +func parseLinkHeader(header string) (map[string]string, error) { + if header == "" { + // Empty header is fine, it just means there are no more pages. + return nil, nil + } + + links := make(map[string]string) + headerLinks := strings.Split(header, ",") + for _, headerLink := range headerLinks { + linkParts := strings.Split(headerLink, ";") + if len(linkParts) < 2 { + continue + } + linkUrl := strings.TrimSpace(linkParts[0]) + linkUrl = strings.Trim(linkUrl, "<>") + var relValue string + for _, rel := range linkParts[1:] { + rel = strings.TrimSpace(rel) + relParts := strings.Split(rel, "=") + if len(relParts) < 2 { + continue + } + if relParts[0] == "rel" { + relValue = strings.Trim(relParts[1], "\"") + break + } + } + if relValue == "" { + continue + } + links[relValue] = linkUrl + } + + return links, nil +} + +// WithNextLinkPagination handles nextlink pagination. +// The config is optional, and if not provided, the default config will be used. +func WithNextLinkPagination(bag *pagination.Bag, config *NextLinkConfig) DoOption { + return func(resp *WrapperResponse) error { + if config == nil { + config = &NextLinkConfig{ + Header: "link", + Rel: "next", + } + } + if config.Header == "" { + config.Header = "link" + } + if config.Rel == "" { + config.Rel = "next" + } + nextLinkVal := resp.Header.Get(config.Header) + if nextLinkVal == "" { + return nil + } + links, err := parseLinkHeader(nextLinkVal) + if err != nil { + return err + } + nextLink := links[config.Rel] + if nextLink == "" { + return nil + } + bag.Push(pagination.PageState{ + Token: nextLink, + ResourceTypeID: config.ResourceTypeID, + ResourceID: config.ResourceID, + }) + return nil + } +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go index 4fd56e47..d4e42176 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/transport.go @@ -15,6 +15,27 @@ import ( "golang.org/x/net/http2" ) +var loggedResponseHeaders = []string{ + // Limit headers + "X-Ratelimit-Limit", + "Ratelimit-Limit", + "X-RateLimit-Requests-Limit", // Linear uses a non-standard header + "X-Rate-Limit-Limit", // Okta uses a non-standard header + + // Remaining headers + "X-Ratelimit-Remaining", + "Ratelimit-Remaining", + "X-RateLimit-Requests-Remaining", // Linear uses a non-standard header + "X-Rate-Limit-Remaining", // Okta uses a non-standard header + + // Reset headers + "X-Ratelimit-Reset", + "Ratelimit-Reset", + "X-RateLimit-Requests-Reset", // Linear uses a non-standard header + "X-Rate-Limit-Reset", // Okta uses a non-standard header + "Retry-After", // Often returned with 429 +} + // NewTransport creates a new Transport, applies the options, and then cycles the transport. func NewTransport(ctx context.Context, options ...Option) (*Transport, error) { t := newTransport() @@ -136,6 +157,15 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { if resp != nil { fields = append(fields, zap.Int("http.status_code", resp.StatusCode)) + + headers := make(map[string][]string, len(resp.Header)) + for _, header := range loggedResponseHeaders { + if v := resp.Header.Values(header); len(v) > 0 { + headers[header] = v + } + } + + fields = append(fields, zap.Any("http.headers", headers)) } t.l(ctx).Debug("Request complete", fields...) diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go index 57ca6b37..0471edb7 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go @@ -402,6 +402,12 @@ func WithHeader(key, value string) RequestOption { } } +func WithBody(body []byte) RequestOption { + return func() (io.ReadWriter, map[string]string, error) { + return bytes.NewBuffer(body), nil, nil + } +} + func WithJSONBody(body interface{}) RequestOption { return func() (io.ReadWriter, map[string]string, error) { buffer := new(bytes.Buffer) diff --git a/vendor/modules.txt b/vendor/modules.txt index 07266ae2..ac38e7d9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -190,7 +190,7 @@ github.com/cloudwego/base64x/internal/native github.com/cloudwego/base64x/internal/native/avx2 github.com/cloudwego/base64x/internal/native/sse github.com/cloudwego/base64x/internal/rt -# github.com/conductorone/baton-sdk v0.2.94 +# github.com/conductorone/baton-sdk v0.3.0 ## explicit; go 1.23.4 github.com/conductorone/baton-sdk/pb/c1/c1z/v1 github.com/conductorone/baton-sdk/pb/c1/config/v1 @@ -204,6 +204,7 @@ github.com/conductorone/baton-sdk/pkg/dotc1z/manager github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local github.com/conductorone/baton-sdk/pkg/dotc1z/manager/s3 github.com/conductorone/baton-sdk/pkg/logging +github.com/conductorone/baton-sdk/pkg/pagination github.com/conductorone/baton-sdk/pkg/ratelimit github.com/conductorone/baton-sdk/pkg/sdk github.com/conductorone/baton-sdk/pkg/uhttp From 56ea1c01a861a253a3fa3b072cb469e1a51fdd11 Mon Sep 17 00:00:00 2001 From: Geoff Greer Date: Wed, 7 May 2025 12:01:27 -0700 Subject: [PATCH 2/2] Upgrade buf version. --- .github/workflows/ci.yaml | 3 ++- .github/workflows/main.yaml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ae4382a7..bc1e3a0b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,7 +44,8 @@ jobs: - name: Setup uses: bufbuild/buf-setup-action@v1 with: - version: '1.29.0' + version: '1.50.0' + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Lint uses: bufbuild/buf-lint-action@v1 - name: Breaking change detection against `main` diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 83f2edf3..b65b515d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -43,11 +43,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup uses: bufbuild/buf-setup-action@v1 with: - version: '1.29.0' + version: '1.50.0' + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Lint uses: bufbuild/buf-lint-action@v1 - name: Breaking change detection against `main`