diff --git a/.nix/mockgen.nix b/.nix/mockgen.nix new file mode 100644 index 000000000..1f89558fd --- /dev/null +++ b/.nix/mockgen.nix @@ -0,0 +1,17 @@ +{ buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "mockgen"; + version = "latest"; + + src = fetchFromGitHub { + owner = "uber-go"; + repo = "mock"; + rev = "bb4128ea0af2555e8c70f35a6b6375133dce0582"; + sha256 = "sha256-I/gy0rXL0DWcfXrkAx21a2xIDaj6w3wrrO7+z8HHMo0="; + }; + + subPackages = [ "mockgen" ]; + + vendorHash = "sha256-0OnK5/e0juEYrNJuVkr+tK66btRW/oaHpJSDakB32Bc="; +} diff --git a/.nix/protoc-gen-go-vtproto.nix b/.nix/protoc-gen-go-vtproto.nix new file mode 100644 index 000000000..d723caf8e --- /dev/null +++ b/.nix/protoc-gen-go-vtproto.nix @@ -0,0 +1,17 @@ +{ buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "protoc-gen-go-vtproto"; + version = "latest"; + + src = fetchFromGitHub { + owner = "planetscale"; + repo = "vtprotobuf"; + rev = "ba97887b0a2597d20399eb70221c99c95520e8c1"; + sha256 = "sha256-r4DhjNCZyoxzdJzzh3uNE5LET7xNkUIa2KXYYeuy8PY="; + }; + + subPackages = [ "cmd/protoc-gen-go-vtproto" ]; + + vendorHash = "sha256-UMOEePOtOtmm9ShQy5LXcEUTv8/SIG9dU7/9vLhrBxQ="; +} diff --git a/Makefile b/Makefile index 5df578db8..ae754e6eb 100644 --- a/Makefile +++ b/Makefile @@ -1,50 +1,64 @@ .PHONY: proto test deps mocks export GOPRIVATE=github.com/anyproto -export PATH:=deps:$(PATH) all: @set -e; @git config core.hooksPath .githooks; -proto: proto-execute replace-gogo-strings +PROTOC=protoc +PROTOC_GEN_GO=$(shell which protoc-gen-go) +PROTOC_GEN_DRPC=$(shell which protoc-gen-go-drpc) +PROTOC_GEN_VTPROTO=$(shell which protoc-gen-go-vtproto) -proto-execute: - @echo 'Generating protobuf packages (Go)...' +define generate_proto + @echo "Generating Protobuf for directory: $(1)" + $(PROTOC) \ + --go_out=. --plugin protoc-gen-go="$(PROTOC_GEN_GO)" \ + --go-vtproto_out=. --plugin protoc-gen-go-vtproto="$(PROTOC_GEN_VTPROTO)" \ + --go-vtproto_opt=features=marshal+unmarshal+size \ + --proto_path=$(1) $(wildcard $(1)/*.proto) +endef + +define generate_drpc + @echo "Generating Protobuf for directory: $(1) $(which protoc-gen-go)" + $(PROTOC) \ + --go_out=. --plugin protoc-gen-go=$$(which protoc-gen-go) \ + --plugin protoc-gen-go-drpc=$(PROTOC_GEN_DRPC) \ + --go_opt=$(1) \ + --go-vtproto_out=:. --plugin protoc-gen-go-vtproto=$(PROTOC_GEN_VTPROTO) \ + --go-vtproto_opt=features=marshal+unmarshal+size \ + --go-drpc_out=protolib=github.com/planetscale/vtprotobuf/codec/drpc:. $(wildcard $(2)/*.proto) +endef +proto: + @echo 'Generating protobuf packages (Go)...' + @$(eval P_ACL_RECORDS_PATH_PB := commonspace/object/acl/aclrecordproto) @$(eval P_ACL_RECORDS_PATH_PB := commonspace/object/acl/aclrecordproto) @$(eval P_TREE_CHANGES_PATH_PB := commonspace/object/tree/treechangeproto) @$(eval P_CRYPTO_PATH_PB := util/crypto/cryptoproto) @$(eval P_ACL_RECORDS := M$(P_ACL_RECORDS_PATH_PB)/protos/aclrecord.proto=github.com/anyproto/any-sync/$(P_ACL_RECORDS_PATH_PB)) @$(eval P_TREE_CHANGES := M$(P_TREE_CHANGES_PATH_PB)/protos/treechange.proto=github.com/anyproto/any-sync/$(P_TREE_CHANGES_PATH_PB)) - protoc --gogofaster_out=:. $(P_ACL_RECORDS_PATH_PB)/protos/*.proto - protoc --gogofaster_out=:. $(P_TREE_CHANGES_PATH_PB)/protos/*.proto - protoc --gogofaster_out=:. $(P_CRYPTO_PATH_PB)/protos/*.proto - $(eval PKGMAP := $$(P_TREE_CHANGES),$$(P_ACL_RECORDS)) - protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto - protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto - protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. net/streampool/testservice/protos/*.proto - protoc --gogofaster_out=:. net/secureservice/handshake/handshakeproto/protos/*.proto - protoc --gogofaster_out=:. net/rpc/limiter/limiterproto/protos/*.proto - protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. coordinator/coordinatorproto/protos/*.proto - protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. consensus/consensusproto/protos/*.proto - protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. identityrepo/identityrepoproto/protos/*.proto - protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. nameservice/nameserviceproto/protos/*.proto - protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. paymentservice/paymentserviceproto/protos/*.proto + $(call generate_proto,$(P_ACL_RECORDS_PATH_PB)/protos) + $(call generate_proto,$(P_TREE_CHANGES_PATH_PB)/protos) + $(call generate_proto,$(P_CRYPTO_PATH_PB)/protos) + $(eval PKGMAP := $$(P_TREE_CHANGES)$(comma)$$(P_ACL_RECORDS)) + $(call generate_drpc,$(PKGMAP),commonspace/spacesyncproto/protos) + $(call generate_drpc,$(PKGMAP),commonfile/fileproto/protos) + $(call generate_drpc,$(PKGMAP),net/streampool/testservice/protos) + + $(call generate_drpc,,net/secureservice/handshake/handshakeproto/protos) + $(call generate_drpc,,net/rpc/limiter/limiterproto/protos) + $(call generate_drpc,$(PKGMAP),coordinator/coordinatorproto/protos) + $(call generate_drpc,,consensus/consensusproto/protos) + $(call generate_drpc,,identityrepo/identityrepoproto/protos) + $(call generate_drpc,,nameservice/nameserviceproto/protos) + $(call generate_drpc,,paymentservice/paymentserviceproto/protos) + mocks: echo 'Generating mocks...' - go build -o deps go.uber.org/mock/mockgen - PATH=$(CURDIR)/deps:$(PATH) go generate ./... - -deps: - go mod download - go build -o deps storj.io/drpc/cmd/protoc-gen-go-drpc - go build -o deps github.com/anyproto/protobuf/protoc-gen-gogofaster + go generate ./... test: - go test ./... --cover - -replace-gogo-strings: - @echo "Replacing 'github.com/gogo/protobuf' with 'github.com/anyproto/protobuf' in all files recursively..." - LC_CTYPE=C LANG=C find . -type f -name "*.go" | xargs sed -i '' "s|github.com/gogo/protobuf|github.com/anyproto/protobuf|g" + go test ./... --cover \ No newline at end of file diff --git a/accountservice/mock_accountservice/mock_accountservice.go b/accountservice/mock_accountservice/mock_accountservice.go index 632a9cb73..a977ac32d 100644 --- a/accountservice/mock_accountservice/mock_accountservice.go +++ b/accountservice/mock_accountservice/mock_accountservice.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_accountservice/mock_accountservice.go github.com/anyproto/any-sync/accountservice Service // + // Package mock_accountservice is a generated GoMock package. package mock_accountservice @@ -20,6 +21,7 @@ import ( type MockService struct { ctrl *gomock.Controller recorder *MockServiceMockRecorder + isgomock struct{} } // MockServiceMockRecorder is the mock recorder for MockService. @@ -54,17 +56,17 @@ func (mr *MockServiceMockRecorder) Account() *gomock.Call { } // Init mocks base method. -func (m *MockService) Init(arg0 *app.App) error { +func (m *MockService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), a) } // Name mocks base method. diff --git a/acl/mock_acl/mock_acl.go b/acl/mock_acl/mock_acl.go index 807e66d04..edf27e0d8 100644 --- a/acl/mock_acl/mock_acl.go +++ b/acl/mock_acl/mock_acl.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_acl/mock_acl.go github.com/anyproto/any-sync/acl AclService // + // Package mock_acl is a generated GoMock package. package mock_acl @@ -24,6 +25,7 @@ import ( type MockAclService struct { ctrl *gomock.Controller recorder *MockAclServiceMockRecorder + isgomock struct{} } // MockAclServiceMockRecorder is the mock recorder for MockAclService. @@ -44,61 +46,61 @@ func (m *MockAclService) EXPECT() *MockAclServiceMockRecorder { } // AddRecord mocks base method. -func (m *MockAclService) AddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord, arg3 acl.Limits) (*consensusproto.RawRecordWithId, error) { +func (m *MockAclService) AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord, limits acl.Limits) (*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRecord", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AddRecord", ctx, spaceId, rec, limits) ret0, _ := ret[0].(*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRecord indicates an expected call of AddRecord. -func (mr *MockAclServiceMockRecorder) AddRecord(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) AddRecord(ctx, spaceId, rec, limits any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclService)(nil).AddRecord), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclService)(nil).AddRecord), ctx, spaceId, rec, limits) } // Close mocks base method. -func (m *MockAclService) Close(arg0 context.Context) error { +func (m *MockAclService) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockAclServiceMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAclService)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAclService)(nil).Close), ctx) } // HasRecord mocks base method. -func (m *MockAclService) HasRecord(arg0 context.Context, arg1, arg2 string) (bool, error) { +func (m *MockAclService) HasRecord(ctx context.Context, spaceId, recordId string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasRecord", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "HasRecord", ctx, spaceId, recordId) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // HasRecord indicates an expected call of HasRecord. -func (mr *MockAclServiceMockRecorder) HasRecord(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) HasRecord(ctx, spaceId, recordId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasRecord", reflect.TypeOf((*MockAclService)(nil).HasRecord), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasRecord", reflect.TypeOf((*MockAclService)(nil).HasRecord), ctx, spaceId, recordId) } // Init mocks base method. -func (m *MockAclService) Init(arg0 *app.App) error { +func (m *MockAclService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockAclServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclService)(nil).Init), a) } // Name mocks base method. @@ -116,74 +118,74 @@ func (mr *MockAclServiceMockRecorder) Name() *gomock.Call { } // OwnerPubKey mocks base method. -func (m *MockAclService) OwnerPubKey(arg0 context.Context, arg1 string) (crypto.PubKey, error) { +func (m *MockAclService) OwnerPubKey(ctx context.Context, spaceId string) (crypto.PubKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "OwnerPubKey", arg0, arg1) + ret := m.ctrl.Call(m, "OwnerPubKey", ctx, spaceId) ret0, _ := ret[0].(crypto.PubKey) ret1, _ := ret[1].(error) return ret0, ret1 } // OwnerPubKey indicates an expected call of OwnerPubKey. -func (mr *MockAclServiceMockRecorder) OwnerPubKey(arg0, arg1 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) OwnerPubKey(ctx, spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OwnerPubKey", reflect.TypeOf((*MockAclService)(nil).OwnerPubKey), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OwnerPubKey", reflect.TypeOf((*MockAclService)(nil).OwnerPubKey), ctx, spaceId) } // Permissions mocks base method. -func (m *MockAclService) Permissions(arg0 context.Context, arg1 crypto.PubKey, arg2 string) (list.AclPermissions, error) { +func (m *MockAclService) Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (list.AclPermissions, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Permissions", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Permissions", ctx, identity, spaceId) ret0, _ := ret[0].(list.AclPermissions) ret1, _ := ret[1].(error) return ret0, ret1 } // Permissions indicates an expected call of Permissions. -func (mr *MockAclServiceMockRecorder) Permissions(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) Permissions(ctx, identity, spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Permissions", reflect.TypeOf((*MockAclService)(nil).Permissions), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Permissions", reflect.TypeOf((*MockAclService)(nil).Permissions), ctx, identity, spaceId) } // ReadState mocks base method. -func (m *MockAclService) ReadState(arg0 context.Context, arg1 string, arg2 func(*list.AclState) error) error { +func (m *MockAclService) ReadState(ctx context.Context, spaceId string, f func(*list.AclState) error) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReadState", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ReadState", ctx, spaceId, f) ret0, _ := ret[0].(error) return ret0 } // ReadState indicates an expected call of ReadState. -func (mr *MockAclServiceMockRecorder) ReadState(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) ReadState(ctx, spaceId, f any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockAclService)(nil).ReadState), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockAclService)(nil).ReadState), ctx, spaceId, f) } // RecordsAfter mocks base method. -func (m *MockAclService) RecordsAfter(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockAclService) RecordsAfter(ctx context.Context, spaceId, aclHead string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecordsAfter", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RecordsAfter", ctx, spaceId, aclHead) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // RecordsAfter indicates an expected call of RecordsAfter. -func (mr *MockAclServiceMockRecorder) RecordsAfter(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) RecordsAfter(ctx, spaceId, aclHead any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockAclService)(nil).RecordsAfter), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockAclService)(nil).RecordsAfter), ctx, spaceId, aclHead) } // Run mocks base method. -func (m *MockAclService) Run(arg0 context.Context) error { +func (m *MockAclService) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockAclServiceMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAclService)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAclService)(nil).Run), ctx) } diff --git a/app/debugstat/mock_debugstat/mock_debugstat.go b/app/debugstat/mock_debugstat/mock_debugstat.go index 12c7701c9..3d2be7415 100644 --- a/app/debugstat/mock_debugstat/mock_debugstat.go +++ b/app/debugstat/mock_debugstat/mock_debugstat.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_debugstat/mock_debugstat.go github.com/anyproto/any-sync/app/debugstat StatService // + // Package mock_debugstat is a generated GoMock package. package mock_debugstat @@ -21,6 +22,7 @@ import ( type MockStatService struct { ctrl *gomock.Controller recorder *MockStatServiceMockRecorder + isgomock struct{} } // MockStatServiceMockRecorder is the mock recorder for MockStatService. @@ -41,29 +43,29 @@ func (m *MockStatService) EXPECT() *MockStatServiceMockRecorder { } // AddProvider mocks base method. -func (m *MockStatService) AddProvider(arg0 debugstat.StatProvider) { +func (m *MockStatService) AddProvider(provider debugstat.StatProvider) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddProvider", arg0) + m.ctrl.Call(m, "AddProvider", provider) } // AddProvider indicates an expected call of AddProvider. -func (mr *MockStatServiceMockRecorder) AddProvider(arg0 any) *gomock.Call { +func (mr *MockStatServiceMockRecorder) AddProvider(provider any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProvider", reflect.TypeOf((*MockStatService)(nil).AddProvider), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProvider", reflect.TypeOf((*MockStatService)(nil).AddProvider), provider) } // Close mocks base method. -func (m *MockStatService) Close(arg0 context.Context) error { +func (m *MockStatService) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockStatServiceMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockStatServiceMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStatService)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStatService)(nil).Close), ctx) } // GetStat mocks base method. @@ -81,17 +83,17 @@ func (mr *MockStatServiceMockRecorder) GetStat() *gomock.Call { } // Init mocks base method. -func (m *MockStatService) Init(arg0 *app.App) error { +func (m *MockStatService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockStatServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockStatServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockStatService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockStatService)(nil).Init), a) } // Name mocks base method. @@ -109,27 +111,27 @@ func (mr *MockStatServiceMockRecorder) Name() *gomock.Call { } // RemoveProvider mocks base method. -func (m *MockStatService) RemoveProvider(arg0 debugstat.StatProvider) { +func (m *MockStatService) RemoveProvider(provider debugstat.StatProvider) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RemoveProvider", arg0) + m.ctrl.Call(m, "RemoveProvider", provider) } // RemoveProvider indicates an expected call of RemoveProvider. -func (mr *MockStatServiceMockRecorder) RemoveProvider(arg0 any) *gomock.Call { +func (mr *MockStatServiceMockRecorder) RemoveProvider(provider any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveProvider", reflect.TypeOf((*MockStatService)(nil).RemoveProvider), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveProvider", reflect.TypeOf((*MockStatService)(nil).RemoveProvider), provider) } // Run mocks base method. -func (m *MockStatService) Run(arg0 context.Context) error { +func (m *MockStatService) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockStatServiceMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockStatServiceMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockStatService)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockStatService)(nil).Run), ctx) } diff --git a/app/ldiff/mock_ldiff/mock_ldiff.go b/app/ldiff/mock_ldiff/mock_ldiff.go index 4e8287256..8adb70390 100644 --- a/app/ldiff/mock_ldiff/mock_ldiff.go +++ b/app/ldiff/mock_ldiff/mock_ldiff.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_ldiff/mock_ldiff.go github.com/anyproto/any-sync/app/ldiff Diff,Remote,DiffContainer // + // Package mock_ldiff is a generated GoMock package. package mock_ldiff @@ -21,6 +22,7 @@ import ( type MockDiff struct { ctrl *gomock.Controller recorder *MockDiffMockRecorder + isgomock struct{} } // MockDiffMockRecorder is the mock recorder for MockDiff. @@ -41,9 +43,9 @@ func (m *MockDiff) EXPECT() *MockDiffMockRecorder { } // Diff mocks base method. -func (m *MockDiff) Diff(arg0 context.Context, arg1 ldiff.Remote) ([]string, []string, []string, error) { +func (m *MockDiff) Diff(ctx context.Context, dl ldiff.Remote) ([]string, []string, []string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Diff", arg0, arg1) + ret := m.ctrl.Call(m, "Diff", ctx, dl) ret0, _ := ret[0].([]string) ret1, _ := ret[1].([]string) ret2, _ := ret[2].([]string) @@ -52,9 +54,9 @@ func (m *MockDiff) Diff(arg0 context.Context, arg1 ldiff.Remote) ([]string, []st } // Diff indicates an expected call of Diff. -func (mr *MockDiffMockRecorder) Diff(arg0, arg1 any) *gomock.Call { +func (mr *MockDiffMockRecorder) Diff(ctx, dl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Diff", reflect.TypeOf((*MockDiff)(nil).Diff), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Diff", reflect.TypeOf((*MockDiff)(nil).Diff), ctx, dl) } // DiffType mocks base method. @@ -72,18 +74,18 @@ func (mr *MockDiffMockRecorder) DiffType() *gomock.Call { } // Element mocks base method. -func (m *MockDiff) Element(arg0 string) (ldiff.Element, error) { +func (m *MockDiff) Element(id string) (ldiff.Element, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Element", arg0) + ret := m.ctrl.Call(m, "Element", id) ret0, _ := ret[0].(ldiff.Element) ret1, _ := ret[1].(error) return ret0, ret1 } // Element indicates an expected call of Element. -func (mr *MockDiffMockRecorder) Element(arg0 any) *gomock.Call { +func (mr *MockDiffMockRecorder) Element(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Element", reflect.TypeOf((*MockDiff)(nil).Element), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Element", reflect.TypeOf((*MockDiff)(nil).Element), id) } // Elements mocks base method. @@ -143,54 +145,55 @@ func (mr *MockDiffMockRecorder) Len() *gomock.Call { } // Ranges mocks base method. -func (m *MockDiff) Ranges(arg0 context.Context, arg1 []ldiff.Range, arg2 []ldiff.RangeResult) ([]ldiff.RangeResult, error) { +func (m *MockDiff) Ranges(ctx context.Context, ranges []ldiff.Range, resBuf []ldiff.RangeResult) ([]ldiff.RangeResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Ranges", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Ranges", ctx, ranges, resBuf) ret0, _ := ret[0].([]ldiff.RangeResult) ret1, _ := ret[1].(error) return ret0, ret1 } // Ranges indicates an expected call of Ranges. -func (mr *MockDiffMockRecorder) Ranges(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDiffMockRecorder) Ranges(ctx, ranges, resBuf any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ranges", reflect.TypeOf((*MockDiff)(nil).Ranges), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ranges", reflect.TypeOf((*MockDiff)(nil).Ranges), ctx, ranges, resBuf) } // RemoveId mocks base method. -func (m *MockDiff) RemoveId(arg0 string) error { +func (m *MockDiff) RemoveId(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveId", arg0) + ret := m.ctrl.Call(m, "RemoveId", id) ret0, _ := ret[0].(error) return ret0 } // RemoveId indicates an expected call of RemoveId. -func (mr *MockDiffMockRecorder) RemoveId(arg0 any) *gomock.Call { +func (mr *MockDiffMockRecorder) RemoveId(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveId", reflect.TypeOf((*MockDiff)(nil).RemoveId), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveId", reflect.TypeOf((*MockDiff)(nil).RemoveId), id) } // Set mocks base method. -func (m *MockDiff) Set(arg0 ...ldiff.Element) { +func (m *MockDiff) Set(elements ...ldiff.Element) { m.ctrl.T.Helper() varargs := []any{} - for _, a := range arg0 { + for _, a := range elements { varargs = append(varargs, a) } m.ctrl.Call(m, "Set", varargs...) } // Set indicates an expected call of Set. -func (mr *MockDiffMockRecorder) Set(arg0 ...any) *gomock.Call { +func (mr *MockDiffMockRecorder) Set(elements ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockDiff)(nil).Set), arg0...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockDiff)(nil).Set), elements...) } // MockRemote is a mock of Remote interface. type MockRemote struct { ctrl *gomock.Controller recorder *MockRemoteMockRecorder + isgomock struct{} } // MockRemoteMockRecorder is the mock recorder for MockRemote. @@ -211,24 +214,25 @@ func (m *MockRemote) EXPECT() *MockRemoteMockRecorder { } // Ranges mocks base method. -func (m *MockRemote) Ranges(arg0 context.Context, arg1 []ldiff.Range, arg2 []ldiff.RangeResult) ([]ldiff.RangeResult, error) { +func (m *MockRemote) Ranges(ctx context.Context, ranges []ldiff.Range, resBuf []ldiff.RangeResult) ([]ldiff.RangeResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Ranges", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Ranges", ctx, ranges, resBuf) ret0, _ := ret[0].([]ldiff.RangeResult) ret1, _ := ret[1].(error) return ret0, ret1 } // Ranges indicates an expected call of Ranges. -func (mr *MockRemoteMockRecorder) Ranges(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRemoteMockRecorder) Ranges(ctx, ranges, resBuf any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ranges", reflect.TypeOf((*MockRemote)(nil).Ranges), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ranges", reflect.TypeOf((*MockRemote)(nil).Ranges), ctx, ranges, resBuf) } // MockDiffContainer is a mock of DiffContainer interface. type MockDiffContainer struct { ctrl *gomock.Controller recorder *MockDiffContainerMockRecorder + isgomock struct{} } // MockDiffContainerMockRecorder is the mock recorder for MockDiffContainer. @@ -249,9 +253,9 @@ func (m *MockDiffContainer) EXPECT() *MockDiffContainerMockRecorder { } // DiffTypeCheck mocks base method. -func (m *MockDiffContainer) DiffTypeCheck(arg0 context.Context, arg1 ldiff.RemoteTypeChecker) (bool, ldiff.Diff, error) { +func (m *MockDiffContainer) DiffTypeCheck(ctx context.Context, typeChecker ldiff.RemoteTypeChecker) (bool, ldiff.Diff, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DiffTypeCheck", arg0, arg1) + ret := m.ctrl.Call(m, "DiffTypeCheck", ctx, typeChecker) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(ldiff.Diff) ret2, _ := ret[2].(error) @@ -259,9 +263,9 @@ func (m *MockDiffContainer) DiffTypeCheck(arg0 context.Context, arg1 ldiff.Remot } // DiffTypeCheck indicates an expected call of DiffTypeCheck. -func (mr *MockDiffContainerMockRecorder) DiffTypeCheck(arg0, arg1 any) *gomock.Call { +func (mr *MockDiffContainerMockRecorder) DiffTypeCheck(ctx, typeChecker any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiffTypeCheck", reflect.TypeOf((*MockDiffContainer)(nil).DiffTypeCheck), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiffTypeCheck", reflect.TypeOf((*MockDiffContainer)(nil).DiffTypeCheck), ctx, typeChecker) } // NewDiff mocks base method. @@ -293,31 +297,31 @@ func (mr *MockDiffContainerMockRecorder) OldDiff() *gomock.Call { } // RemoveId mocks base method. -func (m *MockDiffContainer) RemoveId(arg0 string) error { +func (m *MockDiffContainer) RemoveId(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveId", arg0) + ret := m.ctrl.Call(m, "RemoveId", id) ret0, _ := ret[0].(error) return ret0 } // RemoveId indicates an expected call of RemoveId. -func (mr *MockDiffContainerMockRecorder) RemoveId(arg0 any) *gomock.Call { +func (mr *MockDiffContainerMockRecorder) RemoveId(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveId", reflect.TypeOf((*MockDiffContainer)(nil).RemoveId), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveId", reflect.TypeOf((*MockDiffContainer)(nil).RemoveId), id) } // Set mocks base method. -func (m *MockDiffContainer) Set(arg0 ...ldiff.Element) { +func (m *MockDiffContainer) Set(elements ...ldiff.Element) { m.ctrl.T.Helper() varargs := []any{} - for _, a := range arg0 { + for _, a := range elements { varargs = append(varargs, a) } m.ctrl.Call(m, "Set", varargs...) } // Set indicates an expected call of Set. -func (mr *MockDiffContainerMockRecorder) Set(arg0 ...any) *gomock.Call { +func (mr *MockDiffContainerMockRecorder) Set(elements ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockDiffContainer)(nil).Set), arg0...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockDiffContainer)(nil).Set), elements...) } diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 7211dccb6..5e3a446d5 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: commonfile/fileproto/protos/file.proto package fileproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ErrCodes int32 @@ -35,34 +34,55 @@ const ( ErrCodes_ErrorOffset ErrCodes = 200 ) -var ErrCodes_name = map[int32]string{ - 0: "Unexpected", - 1: "CIDNotFound", - 2: "Forbidden", - 3: "LimitExceeded", - 4: "QuerySizeExceeded", - 5: "WrongHash", - 6: "NotEnoughSpace", - 200: "ErrorOffset", -} +// Enum value maps for ErrCodes. +var ( + ErrCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "CIDNotFound", + 2: "Forbidden", + 3: "LimitExceeded", + 4: "QuerySizeExceeded", + 5: "WrongHash", + 6: "NotEnoughSpace", + 200: "ErrorOffset", + } + ErrCodes_value = map[string]int32{ + "Unexpected": 0, + "CIDNotFound": 1, + "Forbidden": 2, + "LimitExceeded": 3, + "QuerySizeExceeded": 4, + "WrongHash": 5, + "NotEnoughSpace": 6, + "ErrorOffset": 200, + } +) -var ErrCodes_value = map[string]int32{ - "Unexpected": 0, - "CIDNotFound": 1, - "Forbidden": 2, - "LimitExceeded": 3, - "QuerySizeExceeded": 4, - "WrongHash": 5, - "NotEnoughSpace": 6, - "ErrorOffset": 200, +func (x ErrCodes) Enum() *ErrCodes { + p := new(ErrCodes) + *p = x + return p } func (x ErrCodes) String() string { - return proto.EnumName(ErrCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrCodes) Descriptor() protoreflect.EnumDescriptor { + return file_commonfile_fileproto_protos_file_proto_enumTypes[0].Descriptor() +} + +func (ErrCodes) Type() protoreflect.EnumType { + return &file_commonfile_fileproto_protos_file_proto_enumTypes[0] +} + +func (x ErrCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ErrCodes.Descriptor instead. func (ErrCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{0} + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{0} } type AvailabilityStatus int32 @@ -73,5240 +93,1523 @@ const ( AvailabilityStatus_ExistsInSpace AvailabilityStatus = 2 ) -var AvailabilityStatus_name = map[int32]string{ - 0: "NotExists", - 1: "Exists", - 2: "ExistsInSpace", -} +// Enum value maps for AvailabilityStatus. +var ( + AvailabilityStatus_name = map[int32]string{ + 0: "NotExists", + 1: "Exists", + 2: "ExistsInSpace", + } + AvailabilityStatus_value = map[string]int32{ + "NotExists": 0, + "Exists": 1, + "ExistsInSpace": 2, + } +) -var AvailabilityStatus_value = map[string]int32{ - "NotExists": 0, - "Exists": 1, - "ExistsInSpace": 2, +func (x AvailabilityStatus) Enum() *AvailabilityStatus { + p := new(AvailabilityStatus) + *p = x + return p } func (x AvailabilityStatus) String() string { - return proto.EnumName(AvailabilityStatus_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (AvailabilityStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{1} +func (AvailabilityStatus) Descriptor() protoreflect.EnumDescriptor { + return file_commonfile_fileproto_protos_file_proto_enumTypes[1].Descriptor() } -type Ok struct { +func (AvailabilityStatus) Type() protoreflect.EnumType { + return &file_commonfile_fileproto_protos_file_proto_enumTypes[1] } -func (m *Ok) Reset() { *m = Ok{} } -func (m *Ok) String() string { return proto.CompactTextString(m) } -func (*Ok) ProtoMessage() {} -func (*Ok) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{0} -} -func (m *Ok) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ok) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ok.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Ok) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Ok) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ok.Merge(m, src) +func (x AvailabilityStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *Ok) XXX_Size() int { - return m.Size() + +// Deprecated: Use AvailabilityStatus.Descriptor instead. +func (AvailabilityStatus) EnumDescriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{1} } -func (m *Ok) XXX_DiscardUnknown() { - xxx_messageInfo_Ok.DiscardUnknown(m) + +type Ok struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -var xxx_messageInfo_Ok proto.InternalMessageInfo +func (x *Ok) Reset() { + *x = Ok{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} -type BlockGetRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - Wait bool `protobuf:"varint,3,opt,name=wait,proto3" json:"wait,omitempty"` +func (x *Ok) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockGetRequest) Reset() { *m = BlockGetRequest{} } -func (m *BlockGetRequest) String() string { return proto.CompactTextString(m) } -func (*BlockGetRequest) ProtoMessage() {} -func (*BlockGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{1} -} -func (m *BlockGetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockGetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*Ok) ProtoMessage() {} + +func (x *Ok) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *BlockGetRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +// Deprecated: Use Ok.ProtoReflect.Descriptor instead. +func (*Ok) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{0} +} + +type BlockGetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + Wait bool `protobuf:"varint,3,opt,name=wait,proto3" json:"wait,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlockGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockGetRequest.Merge(m, src) + +func (x *BlockGetRequest) Reset() { + *x = BlockGetRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlockGetRequest) XXX_Size() int { - return m.Size() + +func (x *BlockGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockGetRequest.DiscardUnknown(m) + +func (*BlockGetRequest) ProtoMessage() {} + +func (x *BlockGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BlockGetRequest proto.InternalMessageInfo +// Deprecated: Use BlockGetRequest.ProtoReflect.Descriptor instead. +func (*BlockGetRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{1} +} -func (m *BlockGetRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *BlockGetRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *BlockGetRequest) GetCid() []byte { - if m != nil { - return m.Cid +func (x *BlockGetRequest) GetCid() []byte { + if x != nil { + return x.Cid } return nil } -func (m *BlockGetRequest) GetWait() bool { - if m != nil { - return m.Wait +func (x *BlockGetRequest) GetWait() bool { + if x != nil { + return x.Wait } return false } type BlockGetResponse struct { - Cid []byte `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Cid []byte `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlockGetResponse) Reset() { *m = BlockGetResponse{} } -func (m *BlockGetResponse) String() string { return proto.CompactTextString(m) } -func (*BlockGetResponse) ProtoMessage() {} -func (*BlockGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{2} -} -func (m *BlockGetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockGetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockGetResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BlockGetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockGetResponse.Merge(m, src) +func (x *BlockGetResponse) Reset() { + *x = BlockGetResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlockGetResponse) XXX_Size() int { - return m.Size() + +func (x *BlockGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockGetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlockGetResponse.DiscardUnknown(m) + +func (*BlockGetResponse) ProtoMessage() {} + +func (x *BlockGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BlockGetResponse proto.InternalMessageInfo +// Deprecated: Use BlockGetResponse.ProtoReflect.Descriptor instead. +func (*BlockGetResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{2} +} -func (m *BlockGetResponse) GetCid() []byte { - if m != nil { - return m.Cid +func (x *BlockGetResponse) GetCid() []byte { + if x != nil { + return x.Cid } return nil } -func (m *BlockGetResponse) GetData() []byte { - if m != nil { - return m.Data +func (x *BlockGetResponse) GetData() []byte { + if x != nil { + return x.Data } return nil } type BlockPushRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"` - Cid []byte `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"` + Cid []byte `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlockPushRequest) Reset() { *m = BlockPushRequest{} } -func (m *BlockPushRequest) String() string { return proto.CompactTextString(m) } -func (*BlockPushRequest) ProtoMessage() {} -func (*BlockPushRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{3} -} -func (m *BlockPushRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockPushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockPushRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *BlockPushRequest) Reset() { + *x = BlockPushRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlockPushRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BlockPushRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockPushRequest.Merge(m, src) -} -func (m *BlockPushRequest) XXX_Size() int { - return m.Size() + +func (x *BlockPushRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockPushRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockPushRequest.DiscardUnknown(m) + +func (*BlockPushRequest) ProtoMessage() {} + +func (x *BlockPushRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BlockPushRequest proto.InternalMessageInfo +// Deprecated: Use BlockPushRequest.ProtoReflect.Descriptor instead. +func (*BlockPushRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{3} +} -func (m *BlockPushRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *BlockPushRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *BlockPushRequest) GetFileId() string { - if m != nil { - return m.FileId +func (x *BlockPushRequest) GetFileId() string { + if x != nil { + return x.FileId } return "" } -func (m *BlockPushRequest) GetCid() []byte { - if m != nil { - return m.Cid +func (x *BlockPushRequest) GetCid() []byte { + if x != nil { + return x.Cid } return nil } -func (m *BlockPushRequest) GetData() []byte { - if m != nil { - return m.Data +func (x *BlockPushRequest) GetData() []byte { + if x != nil { + return x.Data } return nil } type BlocksCheckRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Cids [][]byte `protobuf:"bytes,2,rep,name=cids,proto3" json:"cids,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Cids [][]byte `protobuf:"bytes,2,rep,name=cids,proto3" json:"cids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlocksCheckRequest) Reset() { *m = BlocksCheckRequest{} } -func (m *BlocksCheckRequest) String() string { return proto.CompactTextString(m) } -func (*BlocksCheckRequest) ProtoMessage() {} -func (*BlocksCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{4} -} -func (m *BlocksCheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlocksCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlocksCheckRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlocksCheckRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BlocksCheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlocksCheckRequest.Merge(m, src) +func (x *BlocksCheckRequest) Reset() { + *x = BlocksCheckRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlocksCheckRequest) XXX_Size() int { - return m.Size() + +func (x *BlocksCheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlocksCheckRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlocksCheckRequest.DiscardUnknown(m) + +func (*BlocksCheckRequest) ProtoMessage() {} + +func (x *BlocksCheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BlocksCheckRequest proto.InternalMessageInfo +// Deprecated: Use BlocksCheckRequest.ProtoReflect.Descriptor instead. +func (*BlocksCheckRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{4} +} -func (m *BlocksCheckRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *BlocksCheckRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *BlocksCheckRequest) GetCids() [][]byte { - if m != nil { - return m.Cids +func (x *BlocksCheckRequest) GetCids() [][]byte { + if x != nil { + return x.Cids } return nil } type BlocksCheckResponse struct { - BlocksAvailability []*BlockAvailability `protobuf:"bytes,1,rep,name=blocksAvailability,proto3" json:"blocksAvailability,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + BlocksAvailability []*BlockAvailability `protobuf:"bytes,1,rep,name=blocksAvailability,proto3" json:"blocksAvailability,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlocksCheckResponse) Reset() { *m = BlocksCheckResponse{} } -func (m *BlocksCheckResponse) String() string { return proto.CompactTextString(m) } -func (*BlocksCheckResponse) ProtoMessage() {} -func (*BlocksCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{5} -} -func (m *BlocksCheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlocksCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlocksCheckResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlocksCheckResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *BlocksCheckResponse) Reset() { + *x = BlocksCheckResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlocksCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlocksCheckResponse.Merge(m, src) -} -func (m *BlocksCheckResponse) XXX_Size() int { - return m.Size() -} -func (m *BlocksCheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlocksCheckResponse.DiscardUnknown(m) + +func (x *BlocksCheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_BlocksCheckResponse proto.InternalMessageInfo +func (*BlocksCheckResponse) ProtoMessage() {} -func (m *BlocksCheckResponse) GetBlocksAvailability() []*BlockAvailability { - if m != nil { - return m.BlocksAvailability +func (x *BlocksCheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type BlockAvailability struct { - Cid []byte `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` - Status AvailabilityStatus `protobuf:"varint,2,opt,name=status,proto3,enum=filesync.AvailabilityStatus" json:"status,omitempty"` +// Deprecated: Use BlocksCheckResponse.ProtoReflect.Descriptor instead. +func (*BlocksCheckResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{5} } -func (m *BlockAvailability) Reset() { *m = BlockAvailability{} } -func (m *BlockAvailability) String() string { return proto.CompactTextString(m) } -func (*BlockAvailability) ProtoMessage() {} -func (*BlockAvailability) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{6} -} -func (m *BlockAvailability) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockAvailability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockAvailability.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *BlocksCheckResponse) GetBlocksAvailability() []*BlockAvailability { + if x != nil { + return x.BlocksAvailability } + return nil } -func (m *BlockAvailability) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type BlockAvailability struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cid []byte `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` + Status AvailabilityStatus `protobuf:"varint,2,opt,name=status,proto3,enum=filesync.AvailabilityStatus" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlockAvailability) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockAvailability.Merge(m, src) + +func (x *BlockAvailability) Reset() { + *x = BlockAvailability{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlockAvailability) XXX_Size() int { - return m.Size() + +func (x *BlockAvailability) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockAvailability) XXX_DiscardUnknown() { - xxx_messageInfo_BlockAvailability.DiscardUnknown(m) + +func (*BlockAvailability) ProtoMessage() {} + +func (x *BlockAvailability) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_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) } -var xxx_messageInfo_BlockAvailability proto.InternalMessageInfo +// Deprecated: Use BlockAvailability.ProtoReflect.Descriptor instead. +func (*BlockAvailability) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{6} +} -func (m *BlockAvailability) GetCid() []byte { - if m != nil { - return m.Cid +func (x *BlockAvailability) GetCid() []byte { + if x != nil { + return x.Cid } return nil } -func (m *BlockAvailability) GetStatus() AvailabilityStatus { - if m != nil { - return m.Status +func (x *BlockAvailability) GetStatus() AvailabilityStatus { + if x != nil { + return x.Status } return AvailabilityStatus_NotExists } type BlocksBindRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"` - Cids [][]byte `protobuf:"bytes,3,rep,name=cids,proto3" json:"cids,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"` + Cids [][]byte `protobuf:"bytes,3,rep,name=cids,proto3" json:"cids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlocksBindRequest) Reset() { *m = BlocksBindRequest{} } -func (m *BlocksBindRequest) String() string { return proto.CompactTextString(m) } -func (*BlocksBindRequest) ProtoMessage() {} -func (*BlocksBindRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{7} -} -func (m *BlocksBindRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlocksBindRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlocksBindRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *BlocksBindRequest) Reset() { + *x = BlocksBindRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlocksBindRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BlocksBindRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlocksBindRequest.Merge(m, src) -} -func (m *BlocksBindRequest) XXX_Size() int { - return m.Size() + +func (x *BlocksBindRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlocksBindRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlocksBindRequest.DiscardUnknown(m) + +func (*BlocksBindRequest) ProtoMessage() {} + +func (x *BlocksBindRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BlocksBindRequest proto.InternalMessageInfo +// Deprecated: Use BlocksBindRequest.ProtoReflect.Descriptor instead. +func (*BlocksBindRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{7} +} -func (m *BlocksBindRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *BlocksBindRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *BlocksBindRequest) GetFileId() string { - if m != nil { - return m.FileId +func (x *BlocksBindRequest) GetFileId() string { + if x != nil { + return x.FileId } return "" } -func (m *BlocksBindRequest) GetCids() [][]byte { - if m != nil { - return m.Cids +func (x *BlocksBindRequest) GetCids() [][]byte { + if x != nil { + return x.Cids } return nil } type FilesDeleteRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileIds []string `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileIds []string `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FilesDeleteRequest) Reset() { *m = FilesDeleteRequest{} } -func (m *FilesDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*FilesDeleteRequest) ProtoMessage() {} -func (*FilesDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{8} -} -func (m *FilesDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FilesDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *FilesDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesDeleteRequest.Merge(m, src) +func (x *FilesDeleteRequest) Reset() { + *x = FilesDeleteRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FilesDeleteRequest) XXX_Size() int { - return m.Size() + +func (x *FilesDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FilesDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FilesDeleteRequest.DiscardUnknown(m) + +func (*FilesDeleteRequest) ProtoMessage() {} + +func (x *FilesDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FilesDeleteRequest proto.InternalMessageInfo +// Deprecated: Use FilesDeleteRequest.ProtoReflect.Descriptor instead. +func (*FilesDeleteRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{8} +} -func (m *FilesDeleteRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *FilesDeleteRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *FilesDeleteRequest) GetFileIds() []string { - if m != nil { - return m.FileIds +func (x *FilesDeleteRequest) GetFileIds() []string { + if x != nil { + return x.FileIds } return nil } type FilesDeleteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FilesDeleteResponse) Reset() { *m = FilesDeleteResponse{} } -func (m *FilesDeleteResponse) String() string { return proto.CompactTextString(m) } -func (*FilesDeleteResponse) ProtoMessage() {} -func (*FilesDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{9} -} -func (m *FilesDeleteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesDeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesDeleteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *FilesDeleteResponse) Reset() { + *x = FilesDeleteResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FilesDeleteResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +func (x *FilesDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FilesDeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesDeleteResponse.Merge(m, src) + +func (*FilesDeleteResponse) ProtoMessage() {} + +func (x *FilesDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *FilesDeleteResponse) XXX_Size() int { - return m.Size() + +// Deprecated: Use FilesDeleteResponse.ProtoReflect.Descriptor instead. +func (*FilesDeleteResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{9} } -func (m *FilesDeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FilesDeleteResponse.DiscardUnknown(m) + +type FilesInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileIds []string `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -var xxx_messageInfo_FilesDeleteResponse proto.InternalMessageInfo +func (x *FilesInfoRequest) Reset() { + *x = FilesInfoRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} -type FilesInfoRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileIds []string `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` +func (x *FilesInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FilesInfoRequest) Reset() { *m = FilesInfoRequest{} } -func (m *FilesInfoRequest) String() string { return proto.CompactTextString(m) } -func (*FilesInfoRequest) ProtoMessage() {} -func (*FilesInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{10} -} -func (m *FilesInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*FilesInfoRequest) ProtoMessage() {} + +func (x *FilesInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *FilesInfoRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *FilesInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesInfoRequest.Merge(m, src) -} -func (m *FilesInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *FilesInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FilesInfoRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_FilesInfoRequest proto.InternalMessageInfo +// Deprecated: Use FilesInfoRequest.ProtoReflect.Descriptor instead. +func (*FilesInfoRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{10} +} -func (m *FilesInfoRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *FilesInfoRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *FilesInfoRequest) GetFileIds() []string { - if m != nil { - return m.FileIds +func (x *FilesInfoRequest) GetFileIds() []string { + if x != nil { + return x.FileIds } return nil } type FilesInfoResponse struct { - FilesInfo []*FileInfo `protobuf:"bytes,1,rep,name=filesInfo,proto3" json:"filesInfo,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FilesInfo []*FileInfo `protobuf:"bytes,1,rep,name=filesInfo,proto3" json:"filesInfo,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FilesInfoResponse) Reset() { *m = FilesInfoResponse{} } -func (m *FilesInfoResponse) String() string { return proto.CompactTextString(m) } -func (*FilesInfoResponse) ProtoMessage() {} -func (*FilesInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{11} -} -func (m *FilesInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FilesInfoResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *FilesInfoResponse) Reset() { + *x = FilesInfoResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FilesInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesInfoResponse.Merge(m, src) -} -func (m *FilesInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *FilesInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FilesInfoResponse.DiscardUnknown(m) + +func (x *FilesInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_FilesInfoResponse proto.InternalMessageInfo +func (*FilesInfoResponse) ProtoMessage() {} -func (m *FilesInfoResponse) GetFilesInfo() []*FileInfo { - if m != nil { - return m.FilesInfo +func (x *FilesInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type FileInfo struct { - FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"` - UsageBytes uint64 `protobuf:"varint,2,opt,name=usageBytes,proto3" json:"usageBytes,omitempty"` - CidsCount uint32 `protobuf:"varint,3,opt,name=cidsCount,proto3" json:"cidsCount,omitempty"` +// Deprecated: Use FilesInfoResponse.ProtoReflect.Descriptor instead. +func (*FilesInfoResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{11} } -func (m *FileInfo) Reset() { *m = FileInfo{} } -func (m *FileInfo) String() string { return proto.CompactTextString(m) } -func (*FileInfo) ProtoMessage() {} -func (*FileInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{12} -} -func (m *FileInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *FilesInfoResponse) GetFilesInfo() []*FileInfo { + if x != nil { + return x.FilesInfo } + return nil } -func (m *FileInfo) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type FileInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"` + UsageBytes uint64 `protobuf:"varint,2,opt,name=usageBytes,proto3" json:"usageBytes,omitempty"` + CidsCount uint32 `protobuf:"varint,3,opt,name=cidsCount,proto3" json:"cidsCount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FileInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileInfo.Merge(m, src) + +func (x *FileInfo) Reset() { + *x = FileInfo{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FileInfo) XXX_Size() int { - return m.Size() + +func (x *FileInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FileInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FileInfo.DiscardUnknown(m) + +func (*FileInfo) ProtoMessage() {} + +func (x *FileInfo) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FileInfo proto.InternalMessageInfo +// Deprecated: Use FileInfo.ProtoReflect.Descriptor instead. +func (*FileInfo) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{12} +} -func (m *FileInfo) GetFileId() string { - if m != nil { - return m.FileId +func (x *FileInfo) GetFileId() string { + if x != nil { + return x.FileId } return "" } -func (m *FileInfo) GetUsageBytes() uint64 { - if m != nil { - return m.UsageBytes +func (x *FileInfo) GetUsageBytes() uint64 { + if x != nil { + return x.UsageBytes } return 0 } -func (m *FileInfo) GetCidsCount() uint32 { - if m != nil { - return m.CidsCount +func (x *FileInfo) GetCidsCount() uint32 { + if x != nil { + return x.CidsCount } return 0 } type FilesGetRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FilesGetRequest) Reset() { *m = FilesGetRequest{} } -func (m *FilesGetRequest) String() string { return proto.CompactTextString(m) } -func (*FilesGetRequest) ProtoMessage() {} -func (*FilesGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{13} -} -func (m *FilesGetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesGetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *FilesGetRequest) Reset() { + *x = FilesGetRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FilesGetRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *FilesGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesGetRequest.Merge(m, src) -} -func (m *FilesGetRequest) XXX_Size() int { - return m.Size() -} -func (m *FilesGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FilesGetRequest.DiscardUnknown(m) + +func (x *FilesGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_FilesGetRequest proto.InternalMessageInfo +func (*FilesGetRequest) ProtoMessage() {} -func (m *FilesGetRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *FilesGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type FilesGetResponse struct { - FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"` +// Deprecated: Use FilesGetRequest.ProtoReflect.Descriptor instead. +func (*FilesGetRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{13} } -func (m *FilesGetResponse) Reset() { *m = FilesGetResponse{} } -func (m *FilesGetResponse) String() string { return proto.CompactTextString(m) } -func (*FilesGetResponse) ProtoMessage() {} -func (*FilesGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{14} -} -func (m *FilesGetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesGetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *FilesGetRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } + return "" } -func (m *FilesGetResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type FilesGetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FilesGetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesGetResponse.Merge(m, src) + +func (x *FilesGetResponse) Reset() { + *x = FilesGetResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FilesGetResponse) XXX_Size() int { - return m.Size() + +func (x *FilesGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FilesGetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FilesGetResponse.DiscardUnknown(m) + +func (*FilesGetResponse) ProtoMessage() {} + +func (x *FilesGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FilesGetResponse proto.InternalMessageInfo +// Deprecated: Use FilesGetResponse.ProtoReflect.Descriptor instead. +func (*FilesGetResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{14} +} -func (m *FilesGetResponse) GetFileId() string { - if m != nil { - return m.FileId +func (x *FilesGetResponse) GetFileId() string { + if x != nil { + return x.FileId } return "" } type CheckRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *CheckRequest) Reset() { *m = CheckRequest{} } -func (m *CheckRequest) String() string { return proto.CompactTextString(m) } -func (*CheckRequest) ProtoMessage() {} -func (*CheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{15} -} -func (m *CheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *CheckRequest) Reset() { + *x = CheckRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *CheckRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +func (x *CheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckRequest.Merge(m, src) + +func (*CheckRequest) ProtoMessage() {} + +func (x *CheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *CheckRequest) XXX_Size() int { - return m.Size() + +// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead. +func (*CheckRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{15} } -func (m *CheckRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CheckRequest.DiscardUnknown(m) + +type CheckResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` + AllowWrite bool `protobuf:"varint,2,opt,name=allowWrite,proto3" json:"allowWrite,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -var xxx_messageInfo_CheckRequest proto.InternalMessageInfo +func (x *CheckResponse) Reset() { + *x = CheckResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} -type CheckResponse struct { - SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` - AllowWrite bool `protobuf:"varint,2,opt,name=allowWrite,proto3" json:"allowWrite,omitempty"` +func (x *CheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CheckResponse) Reset() { *m = CheckResponse{} } -func (m *CheckResponse) String() string { return proto.CompactTextString(m) } -func (*CheckResponse) ProtoMessage() {} -func (*CheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{16} -} -func (m *CheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*CheckResponse) ProtoMessage() {} + +func (x *CheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *CheckResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *CheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckResponse.Merge(m, src) -} -func (m *CheckResponse) XXX_Size() int { - return m.Size() -} -func (m *CheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CheckResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_CheckResponse proto.InternalMessageInfo +// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead. +func (*CheckResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{16} +} -func (m *CheckResponse) GetSpaceIds() []string { - if m != nil { - return m.SpaceIds +func (x *CheckResponse) GetSpaceIds() []string { + if x != nil { + return x.SpaceIds } return nil } -func (m *CheckResponse) GetAllowWrite() bool { - if m != nil { - return m.AllowWrite +func (x *CheckResponse) GetAllowWrite() bool { + if x != nil { + return x.AllowWrite } return false } type SpaceInfoRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceInfoRequest) Reset() { *m = SpaceInfoRequest{} } -func (m *SpaceInfoRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceInfoRequest) ProtoMessage() {} -func (*SpaceInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{17} -} -func (m *SpaceInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceInfoRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *SpaceInfoRequest) Reset() { + *x = SpaceInfoRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceInfoRequest.Merge(m, src) -} -func (m *SpaceInfoRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceInfoRequest.DiscardUnknown(m) + +func (*SpaceInfoRequest) ProtoMessage() {} + +func (x *SpaceInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceInfoRequest proto.InternalMessageInfo +// Deprecated: Use SpaceInfoRequest.ProtoReflect.Descriptor instead. +func (*SpaceInfoRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{17} +} -func (m *SpaceInfoRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceInfoRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } type SpaceInfoResponse struct { - LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` - TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` - CidsCount uint64 `protobuf:"varint,3,opt,name=cidsCount,proto3" json:"cidsCount,omitempty"` - FilesCount uint64 `protobuf:"varint,4,opt,name=filesCount,proto3" json:"filesCount,omitempty"` - SpaceUsageBytes uint64 `protobuf:"varint,5,opt,name=spaceUsageBytes,proto3" json:"spaceUsageBytes,omitempty"` - SpaceId string `protobuf:"bytes,6,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` + TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` + CidsCount uint64 `protobuf:"varint,3,opt,name=cidsCount,proto3" json:"cidsCount,omitempty"` + FilesCount uint64 `protobuf:"varint,4,opt,name=filesCount,proto3" json:"filesCount,omitempty"` + SpaceUsageBytes uint64 `protobuf:"varint,5,opt,name=spaceUsageBytes,proto3" json:"spaceUsageBytes,omitempty"` + SpaceId string `protobuf:"bytes,6,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceInfoResponse) Reset() { *m = SpaceInfoResponse{} } -func (m *SpaceInfoResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceInfoResponse) ProtoMessage() {} -func (*SpaceInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{18} -} -func (m *SpaceInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceInfoResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceInfoResponse.Merge(m, src) -} -func (m *SpaceInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *SpaceInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SpaceInfoResponse proto.InternalMessageInfo - -func (m *SpaceInfoResponse) GetLimitBytes() uint64 { - if m != nil { - return m.LimitBytes - } - return 0 -} - -func (m *SpaceInfoResponse) GetTotalUsageBytes() uint64 { - if m != nil { - return m.TotalUsageBytes - } - return 0 -} - -func (m *SpaceInfoResponse) GetCidsCount() uint64 { - if m != nil { - return m.CidsCount - } - return 0 -} - -func (m *SpaceInfoResponse) GetFilesCount() uint64 { - if m != nil { - return m.FilesCount - } - return 0 -} - -func (m *SpaceInfoResponse) GetSpaceUsageBytes() uint64 { - if m != nil { - return m.SpaceUsageBytes - } - return 0 +func (x *SpaceInfoResponse) Reset() { + *x = SpaceInfoResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceInfoResponse) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" +func (x *SpaceInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -type AccountInfoRequest struct { -} +func (*SpaceInfoResponse) ProtoMessage() {} -func (m *AccountInfoRequest) Reset() { *m = AccountInfoRequest{} } -func (m *AccountInfoRequest) String() string { return proto.CompactTextString(m) } -func (*AccountInfoRequest) ProtoMessage() {} -func (*AccountInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{19} -} -func (m *AccountInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *SpaceInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *AccountInfoRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *AccountInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountInfoRequest.Merge(m, src) -} -func (m *AccountInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountInfoRequest proto.InternalMessageInfo - -type AccountInfoResponse struct { - // the shared limit excluding isolated spaces - LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` - TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` - TotalCidsCount uint64 `protobuf:"varint,3,opt,name=totalCidsCount,proto3" json:"totalCidsCount,omitempty"` - Spaces []*SpaceInfoResponse `protobuf:"bytes,4,rep,name=spaces,proto3" json:"spaces,omitempty"` - // the total limit including isolated spaces - AccountLimitBytes uint64 `protobuf:"varint,5,opt,name=accountLimitBytes,proto3" json:"accountLimitBytes,omitempty"` + return mi.MessageOf(x) } -func (m *AccountInfoResponse) Reset() { *m = AccountInfoResponse{} } -func (m *AccountInfoResponse) String() string { return proto.CompactTextString(m) } -func (*AccountInfoResponse) ProtoMessage() {} -func (*AccountInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{20} -} -func (m *AccountInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountInfoResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AccountInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountInfoResponse.Merge(m, src) -} -func (m *AccountInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *AccountInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountInfoResponse.DiscardUnknown(m) +// Deprecated: Use SpaceInfoResponse.ProtoReflect.Descriptor instead. +func (*SpaceInfoResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{18} } -var xxx_messageInfo_AccountInfoResponse proto.InternalMessageInfo - -func (m *AccountInfoResponse) GetLimitBytes() uint64 { - if m != nil { - return m.LimitBytes +func (x *SpaceInfoResponse) GetLimitBytes() uint64 { + if x != nil { + return x.LimitBytes } return 0 } -func (m *AccountInfoResponse) GetTotalUsageBytes() uint64 { - if m != nil { - return m.TotalUsageBytes +func (x *SpaceInfoResponse) GetTotalUsageBytes() uint64 { + if x != nil { + return x.TotalUsageBytes } return 0 } -func (m *AccountInfoResponse) GetTotalCidsCount() uint64 { - if m != nil { - return m.TotalCidsCount +func (x *SpaceInfoResponse) GetCidsCount() uint64 { + if x != nil { + return x.CidsCount } return 0 } -func (m *AccountInfoResponse) GetSpaces() []*SpaceInfoResponse { - if m != nil { - return m.Spaces - } - return nil -} - -func (m *AccountInfoResponse) GetAccountLimitBytes() uint64 { - if m != nil { - return m.AccountLimitBytes +func (x *SpaceInfoResponse) GetFilesCount() uint64 { + if x != nil { + return x.FilesCount } return 0 } -type AccountLimitSetRequest struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (m *AccountLimitSetRequest) Reset() { *m = AccountLimitSetRequest{} } -func (m *AccountLimitSetRequest) String() string { return proto.CompactTextString(m) } -func (*AccountLimitSetRequest) ProtoMessage() {} -func (*AccountLimitSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{21} -} -func (m *AccountLimitSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountLimitSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountLimitSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountLimitSetRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AccountLimitSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountLimitSetRequest.Merge(m, src) -} -func (m *AccountLimitSetRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountLimitSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountLimitSetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountLimitSetRequest proto.InternalMessageInfo - -func (m *AccountLimitSetRequest) GetIdentity() string { - if m != nil { - return m.Identity - } - return "" -} - -func (m *AccountLimitSetRequest) GetLimit() uint64 { - if m != nil { - return m.Limit +func (x *SpaceInfoResponse) GetSpaceUsageBytes() uint64 { + if x != nil { + return x.SpaceUsageBytes } return 0 } -type SpaceLimitSetRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (m *SpaceLimitSetRequest) Reset() { *m = SpaceLimitSetRequest{} } -func (m *SpaceLimitSetRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceLimitSetRequest) ProtoMessage() {} -func (*SpaceLimitSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{22} -} -func (m *SpaceLimitSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceLimitSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceLimitSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceLimitSetRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceLimitSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceLimitSetRequest.Merge(m, src) -} -func (m *SpaceLimitSetRequest) XXX_Size() int { - return m.Size() -} -func (m *SpaceLimitSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceLimitSetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SpaceLimitSetRequest proto.InternalMessageInfo - -func (m *SpaceLimitSetRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceInfoResponse) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *SpaceLimitSetRequest) GetLimit() uint64 { - if m != nil { - return m.Limit - } - return 0 -} - -func init() { - proto.RegisterEnum("filesync.ErrCodes", ErrCodes_name, ErrCodes_value) - proto.RegisterEnum("filesync.AvailabilityStatus", AvailabilityStatus_name, AvailabilityStatus_value) - proto.RegisterType((*Ok)(nil), "filesync.Ok") - proto.RegisterType((*BlockGetRequest)(nil), "filesync.BlockGetRequest") - proto.RegisterType((*BlockGetResponse)(nil), "filesync.BlockGetResponse") - proto.RegisterType((*BlockPushRequest)(nil), "filesync.BlockPushRequest") - proto.RegisterType((*BlocksCheckRequest)(nil), "filesync.BlocksCheckRequest") - proto.RegisterType((*BlocksCheckResponse)(nil), "filesync.BlocksCheckResponse") - proto.RegisterType((*BlockAvailability)(nil), "filesync.BlockAvailability") - proto.RegisterType((*BlocksBindRequest)(nil), "filesync.BlocksBindRequest") - proto.RegisterType((*FilesDeleteRequest)(nil), "filesync.FilesDeleteRequest") - proto.RegisterType((*FilesDeleteResponse)(nil), "filesync.FilesDeleteResponse") - proto.RegisterType((*FilesInfoRequest)(nil), "filesync.FilesInfoRequest") - proto.RegisterType((*FilesInfoResponse)(nil), "filesync.FilesInfoResponse") - proto.RegisterType((*FileInfo)(nil), "filesync.FileInfo") - proto.RegisterType((*FilesGetRequest)(nil), "filesync.FilesGetRequest") - proto.RegisterType((*FilesGetResponse)(nil), "filesync.FilesGetResponse") - proto.RegisterType((*CheckRequest)(nil), "filesync.CheckRequest") - proto.RegisterType((*CheckResponse)(nil), "filesync.CheckResponse") - proto.RegisterType((*SpaceInfoRequest)(nil), "filesync.SpaceInfoRequest") - proto.RegisterType((*SpaceInfoResponse)(nil), "filesync.SpaceInfoResponse") - proto.RegisterType((*AccountInfoRequest)(nil), "filesync.AccountInfoRequest") - proto.RegisterType((*AccountInfoResponse)(nil), "filesync.AccountInfoResponse") - proto.RegisterType((*AccountLimitSetRequest)(nil), "filesync.AccountLimitSetRequest") - proto.RegisterType((*SpaceLimitSetRequest)(nil), "filesync.SpaceLimitSetRequest") -} - -func init() { - proto.RegisterFile("commonfile/fileproto/protos/file.proto", fileDescriptor_fd665a7e11c833d5) -} - -var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 1014 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, - 0x14, 0xb6, 0x6c, 0xc5, 0xb5, 0x5f, 0x62, 0x5b, 0xde, 0xa4, 0xc1, 0xa8, 0xc1, 0xe3, 0xd9, 0x43, - 0xc7, 0x13, 0x3a, 0x69, 0x27, 0x85, 0xa1, 0x17, 0x0e, 0xb6, 0x63, 0x53, 0xb7, 0x4c, 0x43, 0x95, - 0xe9, 0x74, 0x80, 0x0b, 0xb2, 0xb4, 0x4e, 0x44, 0x1c, 0x29, 0x68, 0xd7, 0x34, 0xe1, 0x57, 0x70, - 0xe5, 0x2f, 0xf0, 0x4b, 0x7a, 0xec, 0x91, 0x1b, 0x4c, 0x72, 0xe3, 0x57, 0x30, 0xbb, 0x2b, 0x5b, - 0xab, 0x95, 0xd3, 0x74, 0x80, 0x8b, 0xb3, 0xfb, 0xed, 0x7b, 0xdf, 0x7b, 0xef, 0x5b, 0xed, 0x7b, - 0x81, 0xfb, 0x5e, 0x74, 0x76, 0x16, 0x85, 0xd3, 0x60, 0x46, 0x1e, 0xf2, 0x9f, 0xf3, 0x38, 0x62, - 0xd1, 0x43, 0xf1, 0x4b, 0x05, 0xb0, 0x27, 0xd6, 0xa8, 0xc2, 0xd7, 0xf4, 0x32, 0xf4, 0xb0, 0x09, - 0xc5, 0xc3, 0x53, 0xfc, 0x12, 0x1a, 0xfd, 0x59, 0xe4, 0x9d, 0x7e, 0x45, 0x98, 0x43, 0x7e, 0x9a, - 0x13, 0xca, 0x50, 0x0b, 0xee, 0xd0, 0x73, 0xd7, 0x23, 0x63, 0xbf, 0x65, 0x74, 0x8c, 0x6e, 0xd5, - 0x59, 0x6c, 0x91, 0x05, 0x25, 0x2f, 0xf0, 0x5b, 0xc5, 0x8e, 0xd1, 0xdd, 0x70, 0xf8, 0x12, 0x21, - 0x30, 0xdf, 0xb8, 0x01, 0x6b, 0x95, 0x3a, 0x46, 0xb7, 0xe2, 0x88, 0x35, 0x7e, 0x02, 0x56, 0x4a, - 0x49, 0xcf, 0xa3, 0x90, 0x92, 0x85, 0xa7, 0x91, 0xf1, 0xf4, 0x5d, 0xe6, 0x26, 0x64, 0x62, 0x8d, - 0x7f, 0x4c, 0x3c, 0xbf, 0x99, 0xd3, 0x93, 0xdb, 0xb3, 0xd9, 0x86, 0x32, 0x2f, 0x66, 0x2c, 0x13, - 0xaa, 0x3a, 0xc9, 0x6e, 0x11, 0xab, 0x94, 0x8f, 0x65, 0x2a, 0xb1, 0xfa, 0x80, 0x44, 0x2c, 0x3a, - 0x38, 0x21, 0xde, 0xe9, 0xed, 0xd1, 0x10, 0x98, 0x5e, 0xe0, 0xd3, 0x56, 0xb1, 0x53, 0xe2, 0x1c, - 0x7c, 0x8d, 0x27, 0xb0, 0x99, 0xe1, 0x48, 0x8a, 0x7d, 0x0e, 0x68, 0x22, 0xe0, 0xde, 0xcf, 0x6e, - 0x30, 0x73, 0x27, 0xc1, 0x2c, 0x60, 0x97, 0x2d, 0xa3, 0x53, 0xea, 0xae, 0xef, 0xdf, 0xdb, 0x5b, - 0x5c, 0xc0, 0x9e, 0x70, 0x55, 0x4d, 0x9c, 0x15, 0x6e, 0xf8, 0x7b, 0x68, 0xe6, 0x0c, 0x57, 0xc8, - 0xf9, 0x19, 0x94, 0x29, 0x73, 0xd9, 0x9c, 0x0a, 0x31, 0xea, 0xfb, 0x3b, 0x69, 0x1c, 0xd5, 0xf3, - 0x48, 0xd8, 0x38, 0x89, 0x2d, 0xfe, 0x36, 0x21, 0xa7, 0xfd, 0x20, 0xf4, 0xff, 0xbd, 0xe2, 0x0b, - 0x6d, 0x4a, 0x8a, 0x36, 0x4f, 0x01, 0x8d, 0x78, 0x06, 0x07, 0x64, 0x46, 0x18, 0xb9, 0x9d, 0xbb, - 0x05, 0x77, 0x24, 0x9b, 0x94, 0xb8, 0xea, 0x2c, 0xb6, 0xf8, 0x2e, 0x6c, 0x66, 0x98, 0xa4, 0xca, - 0x78, 0x04, 0x96, 0x80, 0xc7, 0xe1, 0x34, 0xfa, 0x2f, 0xf4, 0x43, 0x68, 0x2a, 0x3c, 0xc9, 0x15, - 0x3e, 0x82, 0xea, 0x74, 0x01, 0x26, 0x37, 0x87, 0x52, 0x45, 0xb9, 0xbd, 0x30, 0x4f, 0x8d, 0xf0, - 0x0f, 0x50, 0x59, 0xc0, 0x8a, 0x4e, 0x46, 0x46, 0xa7, 0x36, 0xc0, 0x9c, 0xba, 0xc7, 0xa4, 0x7f, - 0xc9, 0x88, 0xbc, 0x28, 0xd3, 0x51, 0x10, 0xb4, 0x03, 0x55, 0xae, 0xdd, 0x20, 0x9a, 0x87, 0xf2, - 0x49, 0xd5, 0x9c, 0x14, 0xc0, 0x9f, 0x42, 0x43, 0x24, 0xfa, 0x21, 0x4f, 0x15, 0xef, 0x26, 0xea, - 0xa8, 0x8f, 0xf0, 0x86, 0xb4, 0x70, 0x1d, 0x36, 0xd4, 0x47, 0x80, 0x9f, 0x43, 0x2d, 0xfb, 0x41, - 0xdb, 0x50, 0x49, 0x78, 0xa9, 0x10, 0xa3, 0xea, 0x2c, 0xf7, 0xbc, 0x26, 0x77, 0x36, 0x8b, 0xde, - 0xbc, 0x8e, 0x03, 0x46, 0x44, 0x4d, 0x15, 0x47, 0x41, 0xf0, 0x03, 0xb0, 0x8e, 0x84, 0xed, 0x87, - 0x5c, 0x13, 0xfe, 0xd3, 0x80, 0xa6, 0x62, 0x9e, 0xc4, 0x6f, 0x03, 0xcc, 0x82, 0xb3, 0x80, 0x49, - 0xdd, 0x0c, 0xa9, 0x5b, 0x8a, 0xa0, 0x2e, 0x34, 0x58, 0xc4, 0xdc, 0xd9, 0x2b, 0x5d, 0x5c, 0x1d, - 0xce, 0x2b, 0x6c, 0x2a, 0x0a, 0xf3, 0x38, 0xe2, 0x42, 0xe5, 0xb1, 0x29, 0xe3, 0xa4, 0x08, 0x8f, - 0x23, 0x12, 0x55, 0xe2, 0xac, 0xc9, 0x38, 0x1a, 0xac, 0x56, 0x58, 0xce, 0x56, 0xb8, 0x05, 0xa8, - 0xe7, 0x79, 0x9c, 0x4e, 0x51, 0x04, 0xff, 0x6d, 0xc0, 0x66, 0x06, 0xfe, 0xdf, 0x2b, 0xbf, 0x0f, - 0x75, 0x01, 0x0d, 0xb4, 0xf2, 0x35, 0x14, 0x3d, 0x86, 0xb2, 0x48, 0x95, 0xb6, 0x4c, 0xbd, 0x61, - 0xe5, 0x2e, 0xc6, 0x49, 0x4c, 0xd1, 0x03, 0x68, 0xba, 0x32, 0xfb, 0xaf, 0xd3, 0x6c, 0xa5, 0x34, - 0xf9, 0x03, 0xfc, 0x0c, 0xb6, 0x7b, 0x0a, 0x78, 0x94, 0x7e, 0xcf, 0x36, 0x54, 0x02, 0x9f, 0x84, - 0x4c, 0xf6, 0x4b, 0xae, 0xdb, 0x72, 0x8f, 0xb6, 0x60, 0x4d, 0x14, 0x9e, 0x14, 0x28, 0x37, 0x78, - 0x04, 0x5b, 0x22, 0x2d, 0x9d, 0xe9, 0xe6, 0x4e, 0xb0, 0x92, 0x67, 0xf7, 0x37, 0x03, 0x2a, 0xc3, - 0x38, 0x1e, 0x44, 0x3e, 0xa1, 0xa8, 0x0e, 0xf0, 0x2a, 0x24, 0x17, 0xe7, 0xc4, 0x63, 0xc4, 0xb7, - 0x0a, 0xa8, 0x01, 0xeb, 0x83, 0xf1, 0xc1, 0x8b, 0x88, 0x8d, 0xa2, 0x79, 0xe8, 0x5b, 0x06, 0xaa, - 0x41, 0x75, 0x14, 0xc5, 0x93, 0xc0, 0xf7, 0x49, 0x68, 0x15, 0x51, 0x13, 0x6a, 0x22, 0xfe, 0xf0, - 0xc2, 0x23, 0xc4, 0x27, 0xbe, 0x55, 0x42, 0x77, 0xa1, 0xf9, 0x72, 0x4e, 0xe2, 0xcb, 0xa3, 0xe0, - 0x17, 0xb2, 0x84, 0x4d, 0xee, 0xf8, 0x3a, 0x8e, 0xc2, 0xe3, 0xa7, 0x2e, 0x3d, 0xb1, 0xd6, 0x10, - 0x82, 0xfa, 0x8b, 0x88, 0x0d, 0xc3, 0x68, 0x7e, 0x7c, 0x22, 0xca, 0xb0, 0xca, 0xc8, 0x82, 0xf5, - 0x61, 0x1c, 0x47, 0xf1, 0xe1, 0x74, 0x4a, 0x09, 0xb3, 0xde, 0x1a, 0xbb, 0x7d, 0x40, 0xf9, 0x1e, - 0xce, 0xa9, 0xb8, 0xef, 0x45, 0x40, 0x19, 0xb5, 0x0a, 0x08, 0xa0, 0x9c, 0xac, 0x0d, 0x9e, 0x8f, - 0x5c, 0x8f, 0x43, 0xc9, 0x5a, 0xdc, 0xff, 0xbd, 0x0c, 0x26, 0x6f, 0x08, 0xa8, 0x07, 0x95, 0xc5, - 0x74, 0x46, 0x1f, 0x6b, 0xc3, 0x28, 0xed, 0x2c, 0xb6, 0xbd, 0xea, 0x28, 0xf9, 0x28, 0x3f, 0x87, - 0xea, 0x72, 0x4c, 0x23, 0xdd, 0x50, 0x99, 0xdd, 0xf6, 0x46, 0x7a, 0x76, 0x78, 0x8a, 0x9e, 0xc1, - 0xba, 0x32, 0x2d, 0xd1, 0x8e, 0xe6, 0x98, 0x19, 0xc4, 0xf6, 0x27, 0x37, 0x9c, 0x26, 0x29, 0x7c, - 0x01, 0x90, 0x0e, 0x2e, 0xa4, 0x0f, 0x55, 0x75, 0x9c, 0xe5, 0x93, 0x50, 0x86, 0x89, 0x9a, 0x44, - 0x7e, 0x5a, 0xa9, 0x49, 0xac, 0x98, 0x40, 0xe8, 0x00, 0xaa, 0xcb, 0xc9, 0xa1, 0xea, 0xa0, 0x8f, - 0x25, 0xfb, 0xde, 0xca, 0xb3, 0x84, 0x65, 0x20, 0x07, 0x07, 0xd5, 0x2e, 0x44, 0x6b, 0xf5, 0xb6, - 0xbd, 0xea, 0x48, 0x52, 0x3c, 0x32, 0xd0, 0x13, 0x58, 0x93, 0xaa, 0x6e, 0xa7, 0x66, 0x19, 0x3d, - 0x3f, 0xca, 0xe1, 0x69, 0x11, 0xcb, 0x77, 0xad, 0x16, 0xa1, 0x37, 0x6d, 0xfb, 0x7d, 0x8d, 0x80, - 0xcb, 0xaa, 0xb4, 0x2f, 0x55, 0xd6, 0x7c, 0xb3, 0x53, 0x65, 0x5d, 0xd5, 0xf3, 0x7a, 0xd0, 0xd0, - 0xda, 0x03, 0xea, 0xe4, 0x3c, 0xb4, 0xf7, 0xae, 0xdd, 0xf2, 0x97, 0x50, 0xcb, 0x74, 0x05, 0xd4, - 0xd6, 0x92, 0x7f, 0xaf, 0x7b, 0x7f, 0xef, 0xed, 0x55, 0xdb, 0x78, 0x77, 0xd5, 0x36, 0xfe, 0xba, - 0x6a, 0x1b, 0xbf, 0x5e, 0xb7, 0x0b, 0xef, 0xae, 0xdb, 0x85, 0x3f, 0xae, 0xdb, 0x85, 0xef, 0xb6, - 0x56, 0xfd, 0x9b, 0x3d, 0x29, 0x8b, 0x3f, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xef, 0x18, - 0x68, 0x52, 0x85, 0x0b, 0x00, 0x00, -} - -func (m *Ok) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Ok) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ok) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockGetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Wait { - i-- - if m.Wait { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Cid) > 0 { - i -= len(m.Cid) - copy(dAtA[i:], m.Cid) - i = encodeVarintFile(dAtA, i, uint64(len(m.Cid))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockGetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockGetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintFile(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if len(m.Cid) > 0 { - i -= len(m.Cid) - copy(dAtA[i:], m.Cid) - i = encodeVarintFile(dAtA, i, uint64(len(m.Cid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockPushRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockPushRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockPushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintFile(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x22 - } - if len(m.Cid) > 0 { - i -= len(m.Cid) - copy(dAtA[i:], m.Cid) - i = encodeVarintFile(dAtA, i, uint64(len(m.Cid))) - i-- - dAtA[i] = 0x1a - } - if len(m.FileId) > 0 { - i -= len(m.FileId) - copy(dAtA[i:], m.FileId) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlocksCheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlocksCheckRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlocksCheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Cids) > 0 { - for iNdEx := len(m.Cids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Cids[iNdEx]) - copy(dAtA[i:], m.Cids[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.Cids[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlocksCheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlocksCheckResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlocksCheckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BlocksAvailability) > 0 { - for iNdEx := len(m.BlocksAvailability) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BlocksAvailability[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFile(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +type AccountInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BlockAvailability) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *AccountInfoRequest) Reset() { + *x = AccountInfoRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BlockAvailability) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *AccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockAvailability) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x10 - } - if len(m.Cid) > 0 { - i -= len(m.Cid) - copy(dAtA[i:], m.Cid) - i = encodeVarintFile(dAtA, i, uint64(len(m.Cid))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +func (*AccountInfoRequest) ProtoMessage() {} -func (m *BlocksBindRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlocksBindRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlocksBindRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Cids) > 0 { - for iNdEx := len(m.Cids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Cids[iNdEx]) - copy(dAtA[i:], m.Cids[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.Cids[iNdEx]))) - i-- - dAtA[i] = 0x1a +func (x *AccountInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - if len(m.FileId) > 0 { - i -= len(m.FileId) - copy(dAtA[i:], m.FileId) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *FilesDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilesDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FilesDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FileIds) > 0 { - for iNdEx := len(m.FileIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FileIds[iNdEx]) - copy(dAtA[i:], m.FileIds[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileIds[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use AccountInfoRequest.ProtoReflect.Descriptor instead. +func (*AccountInfoRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{19} } -func (m *FilesDeleteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +type AccountInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // the shared limit excluding isolated spaces + LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` + TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` + TotalCidsCount uint64 `protobuf:"varint,3,opt,name=totalCidsCount,proto3" json:"totalCidsCount,omitempty"` + Spaces []*SpaceInfoResponse `protobuf:"bytes,4,rep,name=spaces,proto3" json:"spaces,omitempty"` + // the total limit including isolated spaces + AccountLimitBytes uint64 `protobuf:"varint,5,opt,name=accountLimitBytes,proto3" json:"accountLimitBytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FilesDeleteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *AccountInfoResponse) Reset() { + *x = AccountInfoResponse{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FilesDeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (x *AccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FilesInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilesInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FilesInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FileIds) > 0 { - for iNdEx := len(m.FileIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FileIds[iNdEx]) - copy(dAtA[i:], m.FileIds[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileIds[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +func (*AccountInfoResponse) ProtoMessage() {} -func (m *FilesInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilesInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FilesInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FilesInfo) > 0 { - for iNdEx := len(m.FilesInfo) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FilesInfo[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFile(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *AccountInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil -} - -func (m *FileInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FileInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *FileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CidsCount != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.CidsCount)) - i-- - dAtA[i] = 0x18 - } - if m.UsageBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.UsageBytes)) - i-- - dAtA[i] = 0x10 - } - if len(m.FileId) > 0 { - i -= len(m.FileId) - copy(dAtA[i:], m.FileId) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use AccountInfoResponse.ProtoReflect.Descriptor instead. +func (*AccountInfoResponse) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{20} } -func (m *FilesGetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AccountInfoResponse) GetLimitBytes() uint64 { + if x != nil { + return x.LimitBytes } - return dAtA[:n], nil -} - -func (m *FilesGetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return 0 } -func (m *FilesGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa +func (x *AccountInfoResponse) GetTotalUsageBytes() uint64 { + if x != nil { + return x.TotalUsageBytes } - return len(dAtA) - i, nil + return 0 } -func (m *FilesGetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AccountInfoResponse) GetTotalCidsCount() uint64 { + if x != nil { + return x.TotalCidsCount } - return dAtA[:n], nil -} - -func (m *FilesGetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return 0 } -func (m *FilesGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FileId) > 0 { - i -= len(m.FileId) - copy(dAtA[i:], m.FileId) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) - i-- - dAtA[i] = 0xa +func (x *AccountInfoResponse) GetSpaces() []*SpaceInfoResponse { + if x != nil { + return x.Spaces } - return len(dAtA) - i, nil + return nil } -func (m *CheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AccountInfoResponse) GetAccountLimitBytes() uint64 { + if x != nil { + return x.AccountLimitBytes } - return dAtA[:n], nil + return 0 } -func (m *CheckRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type AccountLimitSetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *CheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (x *AccountLimitSetRequest) Reset() { + *x = AccountLimitSetRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *CheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *AccountLimitSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CheckResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*AccountLimitSetRequest) ProtoMessage() {} -func (m *CheckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AllowWrite { - i-- - if m.AllowWrite { - dAtA[i] = 1 - } else { - dAtA[i] = 0 +func (x *AccountLimitSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x10 + return ms } - if len(m.SpaceIds) > 0 { - for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SpaceIds[iNdEx]) - copy(dAtA[i:], m.SpaceIds[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SpaceInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *SpaceInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use AccountLimitSetRequest.ProtoReflect.Descriptor instead. +func (*AccountLimitSetRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{21} } -func (m *SpaceInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x32 - } - if m.SpaceUsageBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.SpaceUsageBytes)) - i-- - dAtA[i] = 0x28 - } - if m.FilesCount != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.FilesCount)) - i-- - dAtA[i] = 0x20 +func (x *AccountLimitSetRequest) GetIdentity() string { + if x != nil { + return x.Identity } - if m.CidsCount != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.CidsCount)) - i-- - dAtA[i] = 0x18 - } - if m.TotalUsageBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.TotalUsageBytes)) - i-- - dAtA[i] = 0x10 - } - if m.LimitBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.LimitBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return "" } -func (m *AccountInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AccountLimitSetRequest) GetLimit() uint64 { + if x != nil { + return x.Limit } - return dAtA[:n], nil + return 0 } -func (m *AccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type SpaceLimitSetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (x *SpaceLimitSetRequest) Reset() { + *x = SpaceLimitSetRequest{} + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *SpaceLimitSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*SpaceLimitSetRequest) ProtoMessage() {} -func (m *AccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AccountLimitBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.AccountLimitBytes)) - i-- - dAtA[i] = 0x28 - } - if len(m.Spaces) > 0 { - for iNdEx := len(m.Spaces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFile(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 +func (x *SpaceLimitSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonfile_fileproto_protos_file_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - if m.TotalCidsCount != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.TotalCidsCount)) - i-- - dAtA[i] = 0x18 - } - if m.TotalUsageBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.TotalUsageBytes)) - i-- - dAtA[i] = 0x10 - } - if m.LimitBytes != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.LimitBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountLimitSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountLimitSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountLimitSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Limit != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x10 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintFile(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceLimitSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *SpaceLimitSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use SpaceLimitSetRequest.ProtoReflect.Descriptor instead. +func (*SpaceLimitSetRequest) Descriptor() ([]byte, []int) { + return file_commonfile_fileproto_protos_file_proto_rawDescGZIP(), []int{22} } -func (m *SpaceLimitSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Limit != 0 { - i = encodeVarintFile(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x10 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa +func (x *SpaceLimitSetRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } - return len(dAtA) - i, nil + return "" } -func encodeVarintFile(dAtA []byte, offset int, v uint64) int { - offset -= sovFile(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Ok) Size() (n int) { - if m == nil { - return 0 +func (x *SpaceLimitSetRequest) GetLimit() uint64 { + if x != nil { + return x.Limit } - var l int - _ = l - return n + return 0 } -func (m *BlockGetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.Wait { - n += 2 - } - return n -} +var File_commonfile_fileproto_protos_file_proto protoreflect.FileDescriptor + +var file_commonfile_fileproto_protos_file_proto_rawDesc = string([]byte{ + 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x66, 0x69, 0x6c, + 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x6e, 0x63, 0x22, 0x04, 0x0a, 0x02, 0x4f, 0x6b, 0x22, 0x51, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x22, 0x38, 0x0a, 0x10, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6a, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x75, + 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x42, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x04, 0x63, 0x69, 0x64, 0x73, 0x22, 0x62, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x12, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x5b, 0x0a, 0x11, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x69, 0x64, + 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x59, 0x0a, 0x11, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x42, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x69, 0x64, + 0x73, 0x22, 0x48, 0x0a, 0x12, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x46, 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x22, 0x45, 0x0a, 0x11, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x30, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x60, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x64, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x69, 0x64, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x22, 0x2a, 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x0e, 0x0a, 0x0c, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0d, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x57, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x57, 0x72, 0x69, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x11, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, + 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x64, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x69, 0x64, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0xea, 0x01, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x69, 0x64, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x43, 0x69, 0x64, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2c, + 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x16, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x46, 0x0a, 0x14, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2a, 0x99, 0x01, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0e, 0x0a, + 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x43, 0x49, 0x44, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x02, 0x12, 0x11, 0x0a, + 0x0d, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x03, + 0x12, 0x15, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x45, 0x78, 0x63, + 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x72, 0x6f, 0x6e, 0x67, + 0x48, 0x61, 0x73, 0x68, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, + 0x75, 0x67, 0x68, 0x53, 0x70, 0x61, 0x63, 0x65, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x10, 0xc8, 0x01, 0x2a, 0x42, 0x0a, 0x12, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x10, 0x01, 0x12, 0x11, 0x0a, + 0x0d, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x10, 0x02, + 0x32, 0xaa, 0x06, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x47, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x2e, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x4f, 0x6b, 0x12, 0x4a, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x12, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x37, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x12, 0x1b, 0x2e, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, + 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x6b, 0x12, 0x4a, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x1a, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x47, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, + 0x38, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4a, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, + 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x12, 0x20, + 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x6b, 0x12, 0x3d, + 0x0a, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x12, + 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x6b, 0x42, 0x16, 0x5a, + 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x66, 0x69, 0x6c, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *BlockGetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} +var ( + file_commonfile_fileproto_protos_file_proto_rawDescOnce sync.Once + file_commonfile_fileproto_protos_file_proto_rawDescData []byte +) -func (m *BlockPushRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.FileId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n +func file_commonfile_fileproto_protos_file_proto_rawDescGZIP() []byte { + file_commonfile_fileproto_protos_file_proto_rawDescOnce.Do(func() { + file_commonfile_fileproto_protos_file_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_commonfile_fileproto_protos_file_proto_rawDesc), len(file_commonfile_fileproto_protos_file_proto_rawDesc))) + }) + return file_commonfile_fileproto_protos_file_proto_rawDescData +} + +var file_commonfile_fileproto_protos_file_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_commonfile_fileproto_protos_file_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_commonfile_fileproto_protos_file_proto_goTypes = []any{ + (ErrCodes)(0), // 0: filesync.ErrCodes + (AvailabilityStatus)(0), // 1: filesync.AvailabilityStatus + (*Ok)(nil), // 2: filesync.Ok + (*BlockGetRequest)(nil), // 3: filesync.BlockGetRequest + (*BlockGetResponse)(nil), // 4: filesync.BlockGetResponse + (*BlockPushRequest)(nil), // 5: filesync.BlockPushRequest + (*BlocksCheckRequest)(nil), // 6: filesync.BlocksCheckRequest + (*BlocksCheckResponse)(nil), // 7: filesync.BlocksCheckResponse + (*BlockAvailability)(nil), // 8: filesync.BlockAvailability + (*BlocksBindRequest)(nil), // 9: filesync.BlocksBindRequest + (*FilesDeleteRequest)(nil), // 10: filesync.FilesDeleteRequest + (*FilesDeleteResponse)(nil), // 11: filesync.FilesDeleteResponse + (*FilesInfoRequest)(nil), // 12: filesync.FilesInfoRequest + (*FilesInfoResponse)(nil), // 13: filesync.FilesInfoResponse + (*FileInfo)(nil), // 14: filesync.FileInfo + (*FilesGetRequest)(nil), // 15: filesync.FilesGetRequest + (*FilesGetResponse)(nil), // 16: filesync.FilesGetResponse + (*CheckRequest)(nil), // 17: filesync.CheckRequest + (*CheckResponse)(nil), // 18: filesync.CheckResponse + (*SpaceInfoRequest)(nil), // 19: filesync.SpaceInfoRequest + (*SpaceInfoResponse)(nil), // 20: filesync.SpaceInfoResponse + (*AccountInfoRequest)(nil), // 21: filesync.AccountInfoRequest + (*AccountInfoResponse)(nil), // 22: filesync.AccountInfoResponse + (*AccountLimitSetRequest)(nil), // 23: filesync.AccountLimitSetRequest + (*SpaceLimitSetRequest)(nil), // 24: filesync.SpaceLimitSetRequest +} +var file_commonfile_fileproto_protos_file_proto_depIdxs = []int32{ + 8, // 0: filesync.BlocksCheckResponse.blocksAvailability:type_name -> filesync.BlockAvailability + 1, // 1: filesync.BlockAvailability.status:type_name -> filesync.AvailabilityStatus + 14, // 2: filesync.FilesInfoResponse.filesInfo:type_name -> filesync.FileInfo + 20, // 3: filesync.AccountInfoResponse.spaces:type_name -> filesync.SpaceInfoResponse + 3, // 4: filesync.File.BlockGet:input_type -> filesync.BlockGetRequest + 5, // 5: filesync.File.BlockPush:input_type -> filesync.BlockPushRequest + 6, // 6: filesync.File.BlocksCheck:input_type -> filesync.BlocksCheckRequest + 9, // 7: filesync.File.BlocksBind:input_type -> filesync.BlocksBindRequest + 10, // 8: filesync.File.FilesDelete:input_type -> filesync.FilesDeleteRequest + 12, // 9: filesync.File.FilesInfo:input_type -> filesync.FilesInfoRequest + 15, // 10: filesync.File.FilesGet:input_type -> filesync.FilesGetRequest + 17, // 11: filesync.File.Check:input_type -> filesync.CheckRequest + 19, // 12: filesync.File.SpaceInfo:input_type -> filesync.SpaceInfoRequest + 21, // 13: filesync.File.AccountInfo:input_type -> filesync.AccountInfoRequest + 23, // 14: filesync.File.AccountLimitSet:input_type -> filesync.AccountLimitSetRequest + 24, // 15: filesync.File.SpaceLimitSet:input_type -> filesync.SpaceLimitSetRequest + 4, // 16: filesync.File.BlockGet:output_type -> filesync.BlockGetResponse + 2, // 17: filesync.File.BlockPush:output_type -> filesync.Ok + 7, // 18: filesync.File.BlocksCheck:output_type -> filesync.BlocksCheckResponse + 2, // 19: filesync.File.BlocksBind:output_type -> filesync.Ok + 11, // 20: filesync.File.FilesDelete:output_type -> filesync.FilesDeleteResponse + 13, // 21: filesync.File.FilesInfo:output_type -> filesync.FilesInfoResponse + 16, // 22: filesync.File.FilesGet:output_type -> filesync.FilesGetResponse + 18, // 23: filesync.File.Check:output_type -> filesync.CheckResponse + 20, // 24: filesync.File.SpaceInfo:output_type -> filesync.SpaceInfoResponse + 22, // 25: filesync.File.AccountInfo:output_type -> filesync.AccountInfoResponse + 2, // 26: filesync.File.AccountLimitSet:output_type -> filesync.Ok + 2, // 27: filesync.File.SpaceLimitSet:output_type -> filesync.Ok + 16, // [16:28] is the sub-list for method output_type + 4, // [4:16] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_commonfile_fileproto_protos_file_proto_init() } +func file_commonfile_fileproto_protos_file_proto_init() { + if File_commonfile_fileproto_protos_file_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_commonfile_fileproto_protos_file_proto_rawDesc), len(file_commonfile_fileproto_protos_file_proto_rawDesc)), + NumEnums: 2, + NumMessages: 23, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_commonfile_fileproto_protos_file_proto_goTypes, + DependencyIndexes: file_commonfile_fileproto_protos_file_proto_depIdxs, + EnumInfos: file_commonfile_fileproto_protos_file_proto_enumTypes, + MessageInfos: file_commonfile_fileproto_protos_file_proto_msgTypes, + }.Build() + File_commonfile_fileproto_protos_file_proto = out.File + file_commonfile_fileproto_protos_file_proto_goTypes = nil + file_commonfile_fileproto_protos_file_proto_depIdxs = nil } - -func (m *BlocksCheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if len(m.Cids) > 0 { - for _, b := range m.Cids { - l = len(b) - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *BlocksCheckResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BlocksAvailability) > 0 { - for _, e := range m.BlocksAvailability { - l = e.Size() - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *BlockAvailability) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovFile(uint64(m.Status)) - } - return n -} - -func (m *BlocksBindRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - l = len(m.FileId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if len(m.Cids) > 0 { - for _, b := range m.Cids { - l = len(b) - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *FilesDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if len(m.FileIds) > 0 { - for _, s := range m.FileIds { - l = len(s) - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *FilesDeleteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *FilesInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if len(m.FileIds) > 0 { - for _, s := range m.FileIds { - l = len(s) - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *FilesInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.FilesInfo) > 0 { - for _, e := range m.FilesInfo { - l = e.Size() - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *FileInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.UsageBytes != 0 { - n += 1 + sovFile(uint64(m.UsageBytes)) - } - if m.CidsCount != 0 { - n += 1 + sovFile(uint64(m.CidsCount)) - } - return n -} - -func (m *FilesGetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *FilesGetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *CheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CheckResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SpaceIds) > 0 { - for _, s := range m.SpaceIds { - l = len(s) - n += 1 + l + sovFile(uint64(l)) - } - } - if m.AllowWrite { - n += 2 - } - return n -} - -func (m *SpaceInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *SpaceInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LimitBytes != 0 { - n += 1 + sovFile(uint64(m.LimitBytes)) - } - if m.TotalUsageBytes != 0 { - n += 1 + sovFile(uint64(m.TotalUsageBytes)) - } - if m.CidsCount != 0 { - n += 1 + sovFile(uint64(m.CidsCount)) - } - if m.FilesCount != 0 { - n += 1 + sovFile(uint64(m.FilesCount)) - } - if m.SpaceUsageBytes != 0 { - n += 1 + sovFile(uint64(m.SpaceUsageBytes)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - return n -} - -func (m *AccountInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AccountInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LimitBytes != 0 { - n += 1 + sovFile(uint64(m.LimitBytes)) - } - if m.TotalUsageBytes != 0 { - n += 1 + sovFile(uint64(m.TotalUsageBytes)) - } - if m.TotalCidsCount != 0 { - n += 1 + sovFile(uint64(m.TotalCidsCount)) - } - if len(m.Spaces) > 0 { - for _, e := range m.Spaces { - l = e.Size() - n += 1 + l + sovFile(uint64(l)) - } - } - if m.AccountLimitBytes != 0 { - n += 1 + sovFile(uint64(m.AccountLimitBytes)) - } - return n -} - -func (m *AccountLimitSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovFile(uint64(m.Limit)) - } - return n -} - -func (m *SpaceLimitSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovFile(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovFile(uint64(m.Limit)) - } - return n -} - -func sovFile(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFile(x uint64) (n int) { - return sovFile(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Ok) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Ok: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockGetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockGetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) - if m.Cid == nil { - m.Cid = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Wait", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Wait = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockGetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockGetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) - if m.Cid == nil { - m.Cid = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockPushRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockPushRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockPushRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) - if m.Cid == nil { - m.Cid = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlocksCheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlocksCheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlocksCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cids = append(m.Cids, make([]byte, postIndex-iNdEx)) - copy(m.Cids[len(m.Cids)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlocksCheckResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlocksCheckResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlocksCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlocksAvailability", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlocksAvailability = append(m.BlocksAvailability, &BlockAvailability{}) - if err := m.BlocksAvailability[len(m.BlocksAvailability)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockAvailability) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockAvailability: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockAvailability: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) - if m.Cid == nil { - m.Cid = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AvailabilityStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlocksBindRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlocksBindRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlocksBindRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cids = append(m.Cids, make([]byte, postIndex-iNdEx)) - copy(m.Cids[len(m.Cids)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilesDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileIds = append(m.FileIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesDeleteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilesDeleteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilesInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileIds = append(m.FileIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilesInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilesInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilesInfo = append(m.FilesInfo, &FileInfo{}) - if err := m.FilesInfo[len(m.FilesInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FileInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UsageBytes", wireType) - } - m.UsageBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UsageBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CidsCount", wireType) - } - m.CidsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CidsCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesGetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilesGetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesGetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilesGetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowWrite", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowWrite = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) - } - m.LimitBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LimitBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUsageBytes", wireType) - } - m.TotalUsageBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalUsageBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CidsCount", wireType) - } - m.CidsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CidsCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilesCount", wireType) - } - m.FilesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FilesCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceUsageBytes", wireType) - } - m.SpaceUsageBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpaceUsageBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) - } - m.LimitBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LimitBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUsageBytes", wireType) - } - m.TotalUsageBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalUsageBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalCidsCount", wireType) - } - m.TotalCidsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalCidsCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spaces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spaces = append(m.Spaces, &SpaceInfoResponse{}) - if err := m.Spaces[len(m.Spaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountLimitBytes", wireType) - } - m.AccountLimitBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountLimitBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountLimitSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountLimitSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountLimitSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceLimitSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceLimitSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceLimitSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFile(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFile - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFile - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFile - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFile - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFile - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFile - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFile = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFile = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFile = fmt.Errorf("proto: unexpected end of group") -) diff --git a/commonfile/fileproto/file_drpc.pb.go b/commonfile/fileproto/file_drpc.pb.go index 60299e89b..3ae9ae722 100644 --- a/commonfile/fileproto/file_drpc.pb.go +++ b/commonfile/fileproto/file_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: commonfile/fileproto/protos/file.proto package fileproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_commonfile_fileproto_protos_file_proto struct{} func (drpcEncoding_File_commonfile_fileproto_protos_file_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_commonfile_fileproto_protos_file_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_commonfile_fileproto_protos_file_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_commonfile_fileproto_protos_file_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCFileClient interface { diff --git a/commonfile/fileproto/file_vtproto.pb.go b/commonfile/fileproto/file_vtproto.pb.go new file mode 100644 index 000000000..44e17800c --- /dev/null +++ b/commonfile/fileproto/file_vtproto.pb.go @@ -0,0 +1,3932 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: commonfile/fileproto/protos/file.proto + +package fileproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Ok) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Ok) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Ok) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *BlockGetRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockGetRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockGetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Wait { + i-- + if m.Wait { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockGetResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockGetResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockGetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockPushRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockPushRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockPushRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x1a + } + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlocksCheckRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlocksCheckRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlocksCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Cids) > 0 { + for iNdEx := len(m.Cids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Cids[iNdEx]) + copy(dAtA[i:], m.Cids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cids[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlocksCheckResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlocksCheckResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlocksCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.BlocksAvailability) > 0 { + for iNdEx := len(m.BlocksAvailability) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.BlocksAvailability[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *BlockAvailability) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockAvailability) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockAvailability) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlocksBindRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlocksBindRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlocksBindRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Cids) > 0 { + for iNdEx := len(m.Cids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Cids[iNdEx]) + copy(dAtA[i:], m.Cids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cids[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FilesDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FilesDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FileIds) > 0 { + for iNdEx := len(m.FileIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FileIds[iNdEx]) + copy(dAtA[i:], m.FileIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FilesDeleteResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesDeleteResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FilesDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *FilesInfoRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesInfoRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FilesInfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FileIds) > 0 { + for iNdEx := len(m.FileIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FileIds[iNdEx]) + copy(dAtA[i:], m.FileIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FilesInfoResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesInfoResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FilesInfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FilesInfo) > 0 { + for iNdEx := len(m.FilesInfo) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.FilesInfo[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *FileInfo) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FileInfo) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FileInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.CidsCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CidsCount)) + i-- + dAtA[i] = 0x18 + } + if m.UsageBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.UsageBytes)) + i-- + dAtA[i] = 0x10 + } + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FilesGetRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesGetRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FilesGetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FilesGetResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesGetResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FilesGetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CheckRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *CheckResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AllowWrite { + i-- + if m.AllowWrite { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.SpaceIds) > 0 { + for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpaceIds[iNdEx]) + copy(dAtA[i:], m.SpaceIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SpaceInfoRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceInfoRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceInfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceInfoResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceInfoResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceInfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x32 + } + if m.SpaceUsageBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpaceUsageBytes)) + i-- + dAtA[i] = 0x28 + } + if m.FilesCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FilesCount)) + i-- + dAtA[i] = 0x20 + } + if m.CidsCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CidsCount)) + i-- + dAtA[i] = 0x18 + } + if m.TotalUsageBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TotalUsageBytes)) + i-- + dAtA[i] = 0x10 + } + if m.LimitBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LimitBytes)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccountInfoRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountInfoRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountInfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *AccountInfoResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountInfoResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountInfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AccountLimitBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AccountLimitBytes)) + i-- + dAtA[i] = 0x28 + } + if len(m.Spaces) > 0 { + for iNdEx := len(m.Spaces) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Spaces[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.TotalCidsCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TotalCidsCount)) + i-- + dAtA[i] = 0x18 + } + if m.TotalUsageBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TotalUsageBytes)) + i-- + dAtA[i] = 0x10 + } + if m.LimitBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LimitBytes)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccountLimitSetRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountLimitSetRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountLimitSetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Limit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceLimitSetRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceLimitSetRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceLimitSetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Limit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Ok) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *BlockGetRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Wait { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *BlockGetResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Cid) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BlockPushRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.FileId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BlocksCheckRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Cids) > 0 { + for _, b := range m.Cids { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *BlocksCheckResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BlocksAvailability) > 0 { + for _, e := range m.BlocksAvailability { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *BlockAvailability) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Cid) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + n += len(m.unknownFields) + return n +} + +func (m *BlocksBindRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.FileId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Cids) > 0 { + for _, b := range m.Cids { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *FilesDeleteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.FileIds) > 0 { + for _, s := range m.FileIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *FilesDeleteResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *FilesInfoRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.FileIds) > 0 { + for _, s := range m.FileIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *FilesInfoResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FilesInfo) > 0 { + for _, e := range m.FilesInfo { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *FileInfo) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.UsageBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.UsageBytes)) + } + if m.CidsCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.CidsCount)) + } + n += len(m.unknownFields) + return n +} + +func (m *FilesGetRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *FilesGetResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CheckRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *CheckResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpaceIds) > 0 { + for _, s := range m.SpaceIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.AllowWrite { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceInfoRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceInfoResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LimitBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.LimitBytes)) + } + if m.TotalUsageBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.TotalUsageBytes)) + } + if m.CidsCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.CidsCount)) + } + if m.FilesCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FilesCount)) + } + if m.SpaceUsageBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SpaceUsageBytes)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountInfoRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *AccountInfoResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LimitBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.LimitBytes)) + } + if m.TotalUsageBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.TotalUsageBytes)) + } + if m.TotalCidsCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.TotalCidsCount)) + } + if len(m.Spaces) > 0 { + for _, e := range m.Spaces { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.AccountLimitBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AccountLimitBytes)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountLimitSetRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Limit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Limit)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceLimitSetRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Limit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Limit)) + } + n += len(m.unknownFields) + return n +} + +func (m *Ok) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ok: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockGetRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockGetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) + if m.Cid == nil { + m.Cid = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Wait", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Wait = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockGetResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockGetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) + if m.Cid == nil { + m.Cid = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockPushRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockPushRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockPushRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) + if m.Cid == nil { + m.Cid = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlocksCheckRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlocksCheckRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlocksCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cids = append(m.Cids, make([]byte, postIndex-iNdEx)) + copy(m.Cids[len(m.Cids)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlocksCheckResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlocksCheckResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlocksCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksAvailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlocksAvailability = append(m.BlocksAvailability, &BlockAvailability{}) + if err := m.BlocksAvailability[len(m.BlocksAvailability)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockAvailability) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockAvailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockAvailability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...) + if m.Cid == nil { + m.Cid = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AvailabilityStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlocksBindRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlocksBindRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlocksBindRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cids = append(m.Cids, make([]byte, postIndex-iNdEx)) + copy(m.Cids[len(m.Cids)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesDeleteRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesDeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileIds = append(m.FileIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesDeleteResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesDeleteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesInfoRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileIds = append(m.FileIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesInfoResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilesInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FilesInfo = append(m.FilesInfo, &FileInfo{}) + if err := m.FilesInfo[len(m.FilesInfo)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FileInfo) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FileInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UsageBytes", wireType) + } + m.UsageBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UsageBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CidsCount", wireType) + } + m.CidsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CidsCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesGetRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesGetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesGetResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesGetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowWrite", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowWrite = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceInfoRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceInfoResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) + } + m.LimitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LimitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUsageBytes", wireType) + } + m.TotalUsageBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalUsageBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CidsCount", wireType) + } + m.CidsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CidsCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FilesCount", wireType) + } + m.FilesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FilesCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceUsageBytes", wireType) + } + m.SpaceUsageBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpaceUsageBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountInfoRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountInfoResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) + } + m.LimitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LimitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUsageBytes", wireType) + } + m.TotalUsageBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalUsageBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalCidsCount", wireType) + } + m.TotalCidsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalCidsCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spaces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Spaces = append(m.Spaces, &SpaceInfoResponse{}) + if err := m.Spaces[len(m.Spaces)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountLimitBytes", wireType) + } + m.AccountLimitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountLimitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountLimitSetRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountLimitSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimitSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceLimitSetRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceLimitSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceLimitSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/commonspace/acl/aclclient/aclspaceclient_test.go b/commonspace/acl/aclclient/aclspaceclient_test.go index bfe94a536..d5a758b5f 100644 --- a/commonspace/acl/aclclient/aclspaceclient_test.go +++ b/commonspace/acl/aclclient/aclspaceclient_test.go @@ -79,7 +79,7 @@ func (a *namedAcl) Init(app *app.App) error { } func marshallRecord(t *testing.T, rec *consensusproto.RawRecord) *consensusproto.RawRecordWithId { - data, err := rec.Marshal() + data, err := rec.MarshalVT() require.NoError(t, err) recId, err := cidutil.NewCidFromBytes(data) require.NoError(t, err) diff --git a/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go b/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go index 6cd1b2799..0fafcf0e5 100644 --- a/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go +++ b/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_aclclient/mock_aclclient.go github.com/anyproto/any-sync/commonspace/acl/aclclient AclJoiningClient,AclSpaceClient // + // Package mock_aclclient is a generated GoMock package. package mock_aclclient @@ -23,6 +24,7 @@ import ( type MockAclJoiningClient struct { ctrl *gomock.Controller recorder *MockAclJoiningClientMockRecorder + isgomock struct{} } // MockAclJoiningClientMockRecorder is the mock recorder for MockAclJoiningClient. @@ -43,60 +45,60 @@ func (m *MockAclJoiningClient) EXPECT() *MockAclJoiningClientMockRecorder { } // AclGetRecords mocks base method. -func (m *MockAclJoiningClient) AclGetRecords(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockAclJoiningClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclGetRecords", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AclGetRecords", ctx, spaceId, aclHead) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AclGetRecords indicates an expected call of AclGetRecords. -func (mr *MockAclJoiningClientMockRecorder) AclGetRecords(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclJoiningClientMockRecorder) AclGetRecords(ctx, spaceId, aclHead any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockAclJoiningClient)(nil).AclGetRecords), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockAclJoiningClient)(nil).AclGetRecords), ctx, spaceId, aclHead) } // CancelJoin mocks base method. -func (m *MockAclJoiningClient) CancelJoin(arg0 context.Context, arg1 string) error { +func (m *MockAclJoiningClient) CancelJoin(ctx context.Context, spaceId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CancelJoin", arg0, arg1) + ret := m.ctrl.Call(m, "CancelJoin", ctx, spaceId) ret0, _ := ret[0].(error) return ret0 } // CancelJoin indicates an expected call of CancelJoin. -func (mr *MockAclJoiningClientMockRecorder) CancelJoin(arg0, arg1 any) *gomock.Call { +func (mr *MockAclJoiningClientMockRecorder) CancelJoin(ctx, spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelJoin", reflect.TypeOf((*MockAclJoiningClient)(nil).CancelJoin), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelJoin", reflect.TypeOf((*MockAclJoiningClient)(nil).CancelJoin), ctx, spaceId) } // CancelRemoveSelf mocks base method. -func (m *MockAclJoiningClient) CancelRemoveSelf(arg0 context.Context, arg1 string) error { +func (m *MockAclJoiningClient) CancelRemoveSelf(ctx context.Context, spaceId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CancelRemoveSelf", arg0, arg1) + ret := m.ctrl.Call(m, "CancelRemoveSelf", ctx, spaceId) ret0, _ := ret[0].(error) return ret0 } // CancelRemoveSelf indicates an expected call of CancelRemoveSelf. -func (mr *MockAclJoiningClientMockRecorder) CancelRemoveSelf(arg0, arg1 any) *gomock.Call { +func (mr *MockAclJoiningClientMockRecorder) CancelRemoveSelf(ctx, spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRemoveSelf", reflect.TypeOf((*MockAclJoiningClient)(nil).CancelRemoveSelf), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRemoveSelf", reflect.TypeOf((*MockAclJoiningClient)(nil).CancelRemoveSelf), ctx, spaceId) } // Init mocks base method. -func (m *MockAclJoiningClient) Init(arg0 *app.App) error { +func (m *MockAclJoiningClient) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockAclJoiningClientMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockAclJoiningClientMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclJoiningClient)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclJoiningClient)(nil).Init), a) } // Name mocks base method. @@ -114,24 +116,25 @@ func (mr *MockAclJoiningClientMockRecorder) Name() *gomock.Call { } // RequestJoin mocks base method. -func (m *MockAclJoiningClient) RequestJoin(arg0 context.Context, arg1 string, arg2 list.RequestJoinPayload) (string, error) { +func (m *MockAclJoiningClient) RequestJoin(ctx context.Context, spaceId string, payload list.RequestJoinPayload) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RequestJoin", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RequestJoin", ctx, spaceId, payload) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // RequestJoin indicates an expected call of RequestJoin. -func (mr *MockAclJoiningClientMockRecorder) RequestJoin(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclJoiningClientMockRecorder) RequestJoin(ctx, spaceId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestJoin", reflect.TypeOf((*MockAclJoiningClient)(nil).RequestJoin), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestJoin", reflect.TypeOf((*MockAclJoiningClient)(nil).RequestJoin), ctx, spaceId, payload) } // MockAclSpaceClient is a mock of AclSpaceClient interface. type MockAclSpaceClient struct { ctrl *gomock.Controller recorder *MockAclSpaceClientMockRecorder + isgomock struct{} } // MockAclSpaceClientMockRecorder is the mock recorder for MockAclSpaceClient. @@ -152,87 +155,87 @@ func (m *MockAclSpaceClient) EXPECT() *MockAclSpaceClientMockRecorder { } // AcceptRequest mocks base method. -func (m *MockAclSpaceClient) AcceptRequest(arg0 context.Context, arg1 list.RequestAcceptPayload) error { +func (m *MockAclSpaceClient) AcceptRequest(ctx context.Context, payload list.RequestAcceptPayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AcceptRequest", arg0, arg1) + ret := m.ctrl.Call(m, "AcceptRequest", ctx, payload) ret0, _ := ret[0].(error) return ret0 } // AcceptRequest indicates an expected call of AcceptRequest. -func (mr *MockAclSpaceClientMockRecorder) AcceptRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) AcceptRequest(ctx, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).AcceptRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).AcceptRequest), ctx, payload) } // AddAccounts mocks base method. -func (m *MockAclSpaceClient) AddAccounts(arg0 context.Context, arg1 list.AccountsAddPayload) error { +func (m *MockAclSpaceClient) AddAccounts(ctx context.Context, add list.AccountsAddPayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddAccounts", arg0, arg1) + ret := m.ctrl.Call(m, "AddAccounts", ctx, add) ret0, _ := ret[0].(error) return ret0 } // AddAccounts indicates an expected call of AddAccounts. -func (mr *MockAclSpaceClientMockRecorder) AddAccounts(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) AddAccounts(ctx, add any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAccounts", reflect.TypeOf((*MockAclSpaceClient)(nil).AddAccounts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAccounts", reflect.TypeOf((*MockAclSpaceClient)(nil).AddAccounts), ctx, add) } // AddRecord mocks base method. -func (m *MockAclSpaceClient) AddRecord(arg0 context.Context, arg1 *consensusproto.RawRecord) error { +func (m *MockAclSpaceClient) AddRecord(ctx context.Context, consRec *consensusproto.RawRecord) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRecord", arg0, arg1) + ret := m.ctrl.Call(m, "AddRecord", ctx, consRec) ret0, _ := ret[0].(error) return ret0 } // AddRecord indicates an expected call of AddRecord. -func (mr *MockAclSpaceClientMockRecorder) AddRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) AddRecord(ctx, consRec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclSpaceClient)(nil).AddRecord), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclSpaceClient)(nil).AddRecord), ctx, consRec) } // CancelRequest mocks base method. -func (m *MockAclSpaceClient) CancelRequest(arg0 context.Context) error { +func (m *MockAclSpaceClient) CancelRequest(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CancelRequest", arg0) + ret := m.ctrl.Call(m, "CancelRequest", ctx) ret0, _ := ret[0].(error) return ret0 } // CancelRequest indicates an expected call of CancelRequest. -func (mr *MockAclSpaceClientMockRecorder) CancelRequest(arg0 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) CancelRequest(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).CancelRequest), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).CancelRequest), ctx) } // ChangePermissions mocks base method. -func (m *MockAclSpaceClient) ChangePermissions(arg0 context.Context, arg1 list.PermissionChangesPayload) error { +func (m *MockAclSpaceClient) ChangePermissions(ctx context.Context, permChange list.PermissionChangesPayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangePermissions", arg0, arg1) + ret := m.ctrl.Call(m, "ChangePermissions", ctx, permChange) ret0, _ := ret[0].(error) return ret0 } // ChangePermissions indicates an expected call of ChangePermissions. -func (mr *MockAclSpaceClientMockRecorder) ChangePermissions(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) ChangePermissions(ctx, permChange any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangePermissions", reflect.TypeOf((*MockAclSpaceClient)(nil).ChangePermissions), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangePermissions", reflect.TypeOf((*MockAclSpaceClient)(nil).ChangePermissions), ctx, permChange) } // DeclineRequest mocks base method. -func (m *MockAclSpaceClient) DeclineRequest(arg0 context.Context, arg1 crypto.PubKey) error { +func (m *MockAclSpaceClient) DeclineRequest(ctx context.Context, identity crypto.PubKey) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeclineRequest", arg0, arg1) + ret := m.ctrl.Call(m, "DeclineRequest", ctx, identity) ret0, _ := ret[0].(error) return ret0 } // DeclineRequest indicates an expected call of DeclineRequest. -func (mr *MockAclSpaceClientMockRecorder) DeclineRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) DeclineRequest(ctx, identity any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeclineRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).DeclineRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeclineRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).DeclineRequest), ctx, identity) } // GenerateInvite mocks base method. @@ -251,17 +254,17 @@ func (mr *MockAclSpaceClientMockRecorder) GenerateInvite() *gomock.Call { } // Init mocks base method. -func (m *MockAclSpaceClient) Init(arg0 *app.App) error { +func (m *MockAclSpaceClient) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockAclSpaceClientMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclSpaceClient)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclSpaceClient)(nil).Init), a) } // Name mocks base method. @@ -279,71 +282,71 @@ func (mr *MockAclSpaceClientMockRecorder) Name() *gomock.Call { } // RemoveAccounts mocks base method. -func (m *MockAclSpaceClient) RemoveAccounts(arg0 context.Context, arg1 list.AccountRemovePayload) error { +func (m *MockAclSpaceClient) RemoveAccounts(ctx context.Context, payload list.AccountRemovePayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveAccounts", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveAccounts", ctx, payload) ret0, _ := ret[0].(error) return ret0 } // RemoveAccounts indicates an expected call of RemoveAccounts. -func (mr *MockAclSpaceClientMockRecorder) RemoveAccounts(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) RemoveAccounts(ctx, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccounts", reflect.TypeOf((*MockAclSpaceClient)(nil).RemoveAccounts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccounts", reflect.TypeOf((*MockAclSpaceClient)(nil).RemoveAccounts), ctx, payload) } // RequestSelfRemove mocks base method. -func (m *MockAclSpaceClient) RequestSelfRemove(arg0 context.Context) error { +func (m *MockAclSpaceClient) RequestSelfRemove(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RequestSelfRemove", arg0) + ret := m.ctrl.Call(m, "RequestSelfRemove", ctx) ret0, _ := ret[0].(error) return ret0 } // RequestSelfRemove indicates an expected call of RequestSelfRemove. -func (mr *MockAclSpaceClientMockRecorder) RequestSelfRemove(arg0 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) RequestSelfRemove(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestSelfRemove", reflect.TypeOf((*MockAclSpaceClient)(nil).RequestSelfRemove), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestSelfRemove", reflect.TypeOf((*MockAclSpaceClient)(nil).RequestSelfRemove), ctx) } // RevokeAllInvites mocks base method. -func (m *MockAclSpaceClient) RevokeAllInvites(arg0 context.Context) error { +func (m *MockAclSpaceClient) RevokeAllInvites(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RevokeAllInvites", arg0) + ret := m.ctrl.Call(m, "RevokeAllInvites", ctx) ret0, _ := ret[0].(error) return ret0 } // RevokeAllInvites indicates an expected call of RevokeAllInvites. -func (mr *MockAclSpaceClientMockRecorder) RevokeAllInvites(arg0 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) RevokeAllInvites(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeAllInvites", reflect.TypeOf((*MockAclSpaceClient)(nil).RevokeAllInvites), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeAllInvites", reflect.TypeOf((*MockAclSpaceClient)(nil).RevokeAllInvites), ctx) } // RevokeInvite mocks base method. -func (m *MockAclSpaceClient) RevokeInvite(arg0 context.Context, arg1 string) error { +func (m *MockAclSpaceClient) RevokeInvite(ctx context.Context, inviteRecordId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RevokeInvite", arg0, arg1) + ret := m.ctrl.Call(m, "RevokeInvite", ctx, inviteRecordId) ret0, _ := ret[0].(error) return ret0 } // RevokeInvite indicates an expected call of RevokeInvite. -func (mr *MockAclSpaceClientMockRecorder) RevokeInvite(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) RevokeInvite(ctx, inviteRecordId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeInvite", reflect.TypeOf((*MockAclSpaceClient)(nil).RevokeInvite), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeInvite", reflect.TypeOf((*MockAclSpaceClient)(nil).RevokeInvite), ctx, inviteRecordId) } // StopSharing mocks base method. -func (m *MockAclSpaceClient) StopSharing(arg0 context.Context, arg1 list.ReadKeyChangePayload) error { +func (m *MockAclSpaceClient) StopSharing(ctx context.Context, readKeyChange list.ReadKeyChangePayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StopSharing", arg0, arg1) + ret := m.ctrl.Call(m, "StopSharing", ctx, readKeyChange) ret0, _ := ret[0].(error) return ret0 } // StopSharing indicates an expected call of StopSharing. -func (mr *MockAclSpaceClientMockRecorder) StopSharing(arg0, arg1 any) *gomock.Call { +func (mr *MockAclSpaceClientMockRecorder) StopSharing(ctx, readKeyChange any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopSharing", reflect.TypeOf((*MockAclSpaceClient)(nil).StopSharing), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopSharing", reflect.TypeOf((*MockAclSpaceClient)(nil).StopSharing), ctx, readKeyChange) } diff --git a/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go b/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go index 00c3f1391..e1a5a0308 100644 --- a/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go +++ b/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_credentialprovider/mock_credentialprovider.go github.com/anyproto/any-sync/commonspace/credentialprovider CredentialProvider // + // Package mock_credentialprovider is a generated GoMock package. package mock_credentialprovider @@ -21,6 +22,7 @@ import ( type MockCredentialProvider struct { ctrl *gomock.Controller recorder *MockCredentialProviderMockRecorder + isgomock struct{} } // MockCredentialProviderMockRecorder is the mock recorder for MockCredentialProvider. @@ -41,32 +43,32 @@ func (m *MockCredentialProvider) EXPECT() *MockCredentialProviderMockRecorder { } // GetCredential mocks base method. -func (m *MockCredentialProvider) GetCredential(arg0 context.Context, arg1 *spacesyncproto.RawSpaceHeaderWithId) ([]byte, error) { +func (m *MockCredentialProvider) GetCredential(ctx context.Context, spaceHeader *spacesyncproto.RawSpaceHeaderWithId) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCredential", arg0, arg1) + ret := m.ctrl.Call(m, "GetCredential", ctx, spaceHeader) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // GetCredential indicates an expected call of GetCredential. -func (mr *MockCredentialProviderMockRecorder) GetCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockCredentialProviderMockRecorder) GetCredential(ctx, spaceHeader any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCredential", reflect.TypeOf((*MockCredentialProvider)(nil).GetCredential), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCredential", reflect.TypeOf((*MockCredentialProvider)(nil).GetCredential), ctx, spaceHeader) } // Init mocks base method. -func (m *MockCredentialProvider) Init(arg0 *app.App) error { +func (m *MockCredentialProvider) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockCredentialProviderMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockCredentialProviderMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockCredentialProvider)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockCredentialProvider)(nil).Init), a) } // Name mocks base method. diff --git a/commonspace/deletionmanager/mock_deletionmanager/mock_deletionmanager.go b/commonspace/deletionmanager/mock_deletionmanager/mock_deletionmanager.go index a5a4c57e2..3ac5b508b 100644 --- a/commonspace/deletionmanager/mock_deletionmanager/mock_deletionmanager.go +++ b/commonspace/deletionmanager/mock_deletionmanager/mock_deletionmanager.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_deletionmanager/mock_deletionmanager.go github.com/anyproto/any-sync/commonspace/deletionmanager DeletionManager,Deleter // + // Package mock_deletionmanager is a generated GoMock package. package mock_deletionmanager @@ -21,6 +22,7 @@ import ( type MockDeletionManager struct { ctrl *gomock.Controller recorder *MockDeletionManagerMockRecorder + isgomock struct{} } // MockDeletionManagerMockRecorder is the mock recorder for MockDeletionManager. @@ -41,31 +43,31 @@ func (m *MockDeletionManager) EXPECT() *MockDeletionManagerMockRecorder { } // Close mocks base method. -func (m *MockDeletionManager) Close(arg0 context.Context) error { +func (m *MockDeletionManager) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockDeletionManagerMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockDeletionManagerMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDeletionManager)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDeletionManager)(nil).Close), ctx) } // Init mocks base method. -func (m *MockDeletionManager) Init(arg0 *app.App) error { +func (m *MockDeletionManager) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockDeletionManagerMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockDeletionManagerMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockDeletionManager)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockDeletionManager)(nil).Init), a) } // Name mocks base method. @@ -83,37 +85,38 @@ func (mr *MockDeletionManagerMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockDeletionManager) Run(arg0 context.Context) error { +func (m *MockDeletionManager) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockDeletionManagerMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockDeletionManagerMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockDeletionManager)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockDeletionManager)(nil).Run), ctx) } // UpdateState mocks base method. -func (m *MockDeletionManager) UpdateState(arg0 context.Context, arg1 *settingsstate.State) error { +func (m *MockDeletionManager) UpdateState(ctx context.Context, state *settingsstate.State) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateState", arg0, arg1) + ret := m.ctrl.Call(m, "UpdateState", ctx, state) ret0, _ := ret[0].(error) return ret0 } // UpdateState indicates an expected call of UpdateState. -func (mr *MockDeletionManagerMockRecorder) UpdateState(arg0, arg1 any) *gomock.Call { +func (mr *MockDeletionManagerMockRecorder) UpdateState(ctx, state any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateState", reflect.TypeOf((*MockDeletionManager)(nil).UpdateState), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateState", reflect.TypeOf((*MockDeletionManager)(nil).UpdateState), ctx, state) } // MockDeleter is a mock of Deleter interface. type MockDeleter struct { ctrl *gomock.Controller recorder *MockDeleterMockRecorder + isgomock struct{} } // MockDeleterMockRecorder is the mock recorder for MockDeleter. @@ -134,13 +137,13 @@ func (m *MockDeleter) EXPECT() *MockDeleterMockRecorder { } // Delete mocks base method. -func (m *MockDeleter) Delete(arg0 context.Context) { +func (m *MockDeleter) Delete(ctx context.Context) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Delete", arg0) + m.ctrl.Call(m, "Delete", ctx) } // Delete indicates an expected call of Delete. -func (mr *MockDeleterMockRecorder) Delete(arg0 any) *gomock.Call { +func (mr *MockDeleterMockRecorder) Delete(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDeleter)(nil).Delete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDeleter)(nil).Delete), ctx) } diff --git a/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go b/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go index 1faf94a7b..23f8d5ccd 100644 --- a/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go +++ b/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_deletionstate/mock_deletionstate.go github.com/anyproto/any-sync/commonspace/deletionstate ObjectDeletionState // + // Package mock_deletionstate is a generated GoMock package. package mock_deletionstate @@ -20,6 +21,7 @@ import ( type MockObjectDeletionState struct { ctrl *gomock.Controller recorder *MockObjectDeletionStateMockRecorder + isgomock struct{} } // MockObjectDeletionStateMockRecorder is the mock recorder for MockObjectDeletionState. @@ -40,69 +42,69 @@ func (m *MockObjectDeletionState) EXPECT() *MockObjectDeletionStateMockRecorder } // Add mocks base method. -func (m *MockObjectDeletionState) Add(arg0 map[string]struct{}) { +func (m *MockObjectDeletionState) Add(ids map[string]struct{}) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Add", arg0) + m.ctrl.Call(m, "Add", ids) } // Add indicates an expected call of Add. -func (mr *MockObjectDeletionStateMockRecorder) Add(arg0 any) *gomock.Call { +func (mr *MockObjectDeletionStateMockRecorder) Add(ids any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockObjectDeletionState)(nil).Add), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockObjectDeletionState)(nil).Add), ids) } // AddObserver mocks base method. -func (m *MockObjectDeletionState) AddObserver(arg0 deletionstate.StateUpdateObserver) { +func (m *MockObjectDeletionState) AddObserver(observer deletionstate.StateUpdateObserver) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddObserver", arg0) + m.ctrl.Call(m, "AddObserver", observer) } // AddObserver indicates an expected call of AddObserver. -func (mr *MockObjectDeletionStateMockRecorder) AddObserver(arg0 any) *gomock.Call { +func (mr *MockObjectDeletionStateMockRecorder) AddObserver(observer any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddObserver", reflect.TypeOf((*MockObjectDeletionState)(nil).AddObserver), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddObserver", reflect.TypeOf((*MockObjectDeletionState)(nil).AddObserver), observer) } // Delete mocks base method. -func (m *MockObjectDeletionState) Delete(arg0 string) error { +func (m *MockObjectDeletionState) Delete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) + ret := m.ctrl.Call(m, "Delete", id) ret0, _ := ret[0].(error) return ret0 } // Delete indicates an expected call of Delete. -func (mr *MockObjectDeletionStateMockRecorder) Delete(arg0 any) *gomock.Call { +func (mr *MockObjectDeletionStateMockRecorder) Delete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockObjectDeletionState)(nil).Delete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockObjectDeletionState)(nil).Delete), id) } // Exists mocks base method. -func (m *MockObjectDeletionState) Exists(arg0 string) bool { +func (m *MockObjectDeletionState) Exists(id string) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Exists", arg0) + ret := m.ctrl.Call(m, "Exists", id) ret0, _ := ret[0].(bool) return ret0 } // Exists indicates an expected call of Exists. -func (mr *MockObjectDeletionStateMockRecorder) Exists(arg0 any) *gomock.Call { +func (mr *MockObjectDeletionStateMockRecorder) Exists(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockObjectDeletionState)(nil).Exists), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockObjectDeletionState)(nil).Exists), id) } // Filter mocks base method. -func (m *MockObjectDeletionState) Filter(arg0 []string) []string { +func (m *MockObjectDeletionState) Filter(ids []string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Filter", arg0) + ret := m.ctrl.Call(m, "Filter", ids) ret0, _ := ret[0].([]string) return ret0 } // Filter indicates an expected call of Filter. -func (mr *MockObjectDeletionStateMockRecorder) Filter(arg0 any) *gomock.Call { +func (mr *MockObjectDeletionStateMockRecorder) Filter(ids any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockObjectDeletionState)(nil).Filter), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockObjectDeletionState)(nil).Filter), ids) } // GetQueued mocks base method. @@ -120,17 +122,17 @@ func (mr *MockObjectDeletionStateMockRecorder) GetQueued() *gomock.Call { } // Init mocks base method. -func (m *MockObjectDeletionState) Init(arg0 *app.App) error { +func (m *MockObjectDeletionState) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockObjectDeletionStateMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockObjectDeletionStateMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockObjectDeletionState)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockObjectDeletionState)(nil).Init), a) } // Name mocks base method. diff --git a/commonspace/headsync/diffsyncer.go b/commonspace/headsync/diffsyncer.go index 845646f47..a556f51c6 100644 --- a/commonspace/headsync/diffsyncer.go +++ b/commonspace/headsync/diffsyncer.go @@ -284,7 +284,7 @@ func (d *diffSyncer) subscribe(ctx context.Context, peerId string) (err error) { SpaceIds: []string{d.spaceId}, Action: spacesyncproto.SpaceSubscriptionAction_Subscribe, } - payload, err := msg.Marshal() + payload, err := msg.MarshalVT() if err != nil { return } diff --git a/commonspace/headsync/headstorage/mock_headstorage/mock_headstorage.go b/commonspace/headsync/headstorage/mock_headstorage/mock_headstorage.go index 71cdec39e..d3f06fc48 100644 --- a/commonspace/headsync/headstorage/mock_headstorage/mock_headstorage.go +++ b/commonspace/headsync/headstorage/mock_headstorage/mock_headstorage.go @@ -5,21 +5,23 @@ // // mockgen -destination mock_headstorage/mock_headstorage.go github.com/anyproto/any-sync/commonspace/headsync/headstorage HeadStorage // + // Package mock_headstorage is a generated GoMock package. package mock_headstorage import ( - context "context" reflect "reflect" headstorage "github.com/anyproto/any-sync/commonspace/headsync/headstorage" gomock "go.uber.org/mock/gomock" + context "golang.org/x/net/context" ) // MockHeadStorage is a mock of HeadStorage interface. type MockHeadStorage struct { ctrl *gomock.Controller recorder *MockHeadStorageMockRecorder + isgomock struct{} } // MockHeadStorageMockRecorder is the mock recorder for MockHeadStorage. @@ -40,84 +42,84 @@ func (m *MockHeadStorage) EXPECT() *MockHeadStorageMockRecorder { } // AddObserver mocks base method. -func (m *MockHeadStorage) AddObserver(arg0 headstorage.Observer) { +func (m *MockHeadStorage) AddObserver(observer headstorage.Observer) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddObserver", arg0) + m.ctrl.Call(m, "AddObserver", observer) } // AddObserver indicates an expected call of AddObserver. -func (mr *MockHeadStorageMockRecorder) AddObserver(arg0 any) *gomock.Call { +func (mr *MockHeadStorageMockRecorder) AddObserver(observer any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddObserver", reflect.TypeOf((*MockHeadStorage)(nil).AddObserver), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddObserver", reflect.TypeOf((*MockHeadStorage)(nil).AddObserver), observer) } // DeleteEntryTx mocks base method. -func (m *MockHeadStorage) DeleteEntryTx(arg0 context.Context, arg1 string) error { +func (m *MockHeadStorage) DeleteEntryTx(txCtx context.Context, id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteEntryTx", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteEntryTx", txCtx, id) ret0, _ := ret[0].(error) return ret0 } // DeleteEntryTx indicates an expected call of DeleteEntryTx. -func (mr *MockHeadStorageMockRecorder) DeleteEntryTx(arg0, arg1 any) *gomock.Call { +func (mr *MockHeadStorageMockRecorder) DeleteEntryTx(txCtx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEntryTx", reflect.TypeOf((*MockHeadStorage)(nil).DeleteEntryTx), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEntryTx", reflect.TypeOf((*MockHeadStorage)(nil).DeleteEntryTx), txCtx, id) } // GetEntry mocks base method. -func (m *MockHeadStorage) GetEntry(arg0 context.Context, arg1 string) (headstorage.HeadsEntry, error) { +func (m *MockHeadStorage) GetEntry(ctx context.Context, id string) (headstorage.HeadsEntry, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetEntry", arg0, arg1) + ret := m.ctrl.Call(m, "GetEntry", ctx, id) ret0, _ := ret[0].(headstorage.HeadsEntry) ret1, _ := ret[1].(error) return ret0, ret1 } // GetEntry indicates an expected call of GetEntry. -func (mr *MockHeadStorageMockRecorder) GetEntry(arg0, arg1 any) *gomock.Call { +func (mr *MockHeadStorageMockRecorder) GetEntry(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEntry", reflect.TypeOf((*MockHeadStorage)(nil).GetEntry), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEntry", reflect.TypeOf((*MockHeadStorage)(nil).GetEntry), ctx, id) } // IterateEntries mocks base method. -func (m *MockHeadStorage) IterateEntries(arg0 context.Context, arg1 headstorage.IterOpts, arg2 headstorage.EntryIterator) error { +func (m *MockHeadStorage) IterateEntries(ctx context.Context, iterOpts headstorage.IterOpts, iter headstorage.EntryIterator) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IterateEntries", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "IterateEntries", ctx, iterOpts, iter) ret0, _ := ret[0].(error) return ret0 } // IterateEntries indicates an expected call of IterateEntries. -func (mr *MockHeadStorageMockRecorder) IterateEntries(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockHeadStorageMockRecorder) IterateEntries(ctx, iterOpts, iter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateEntries", reflect.TypeOf((*MockHeadStorage)(nil).IterateEntries), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateEntries", reflect.TypeOf((*MockHeadStorage)(nil).IterateEntries), ctx, iterOpts, iter) } // UpdateEntry mocks base method. -func (m *MockHeadStorage) UpdateEntry(arg0 context.Context, arg1 headstorage.HeadsUpdate) error { +func (m *MockHeadStorage) UpdateEntry(ctx context.Context, update headstorage.HeadsUpdate) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateEntry", arg0, arg1) + ret := m.ctrl.Call(m, "UpdateEntry", ctx, update) ret0, _ := ret[0].(error) return ret0 } // UpdateEntry indicates an expected call of UpdateEntry. -func (mr *MockHeadStorageMockRecorder) UpdateEntry(arg0, arg1 any) *gomock.Call { +func (mr *MockHeadStorageMockRecorder) UpdateEntry(ctx, update any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEntry", reflect.TypeOf((*MockHeadStorage)(nil).UpdateEntry), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEntry", reflect.TypeOf((*MockHeadStorage)(nil).UpdateEntry), ctx, update) } // UpdateEntryTx mocks base method. -func (m *MockHeadStorage) UpdateEntryTx(arg0 context.Context, arg1 headstorage.HeadsUpdate) error { +func (m *MockHeadStorage) UpdateEntryTx(txCtx context.Context, update headstorage.HeadsUpdate) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateEntryTx", arg0, arg1) + ret := m.ctrl.Call(m, "UpdateEntryTx", txCtx, update) ret0, _ := ret[0].(error) return ret0 } // UpdateEntryTx indicates an expected call of UpdateEntryTx. -func (mr *MockHeadStorageMockRecorder) UpdateEntryTx(arg0, arg1 any) *gomock.Call { +func (mr *MockHeadStorageMockRecorder) UpdateEntryTx(txCtx, update any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEntryTx", reflect.TypeOf((*MockHeadStorage)(nil).UpdateEntryTx), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEntryTx", reflect.TypeOf((*MockHeadStorage)(nil).UpdateEntryTx), txCtx, update) } diff --git a/commonspace/headsync/mock_headsync/mock_headsync.go b/commonspace/headsync/mock_headsync/mock_headsync.go index 83d5c8120..07e2afa54 100644 --- a/commonspace/headsync/mock_headsync/mock_headsync.go +++ b/commonspace/headsync/mock_headsync/mock_headsync.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_headsync/mock_headsync.go github.com/anyproto/any-sync/commonspace/headsync DiffSyncer // + // Package mock_headsync is a generated GoMock package. package mock_headsync @@ -19,6 +20,7 @@ import ( type MockDiffSyncer struct { ctrl *gomock.Controller recorder *MockDiffSyncerMockRecorder + isgomock struct{} } // MockDiffSyncerMockRecorder is the mock recorder for MockDiffSyncer. @@ -63,15 +65,15 @@ func (mr *MockDiffSyncerMockRecorder) Init() *gomock.Call { } // Sync mocks base method. -func (m *MockDiffSyncer) Sync(arg0 context.Context) error { +func (m *MockDiffSyncer) Sync(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Sync", arg0) + ret := m.ctrl.Call(m, "Sync", ctx) ret0, _ := ret[0].(error) return ret0 } // Sync indicates an expected call of Sync. -func (mr *MockDiffSyncerMockRecorder) Sync(arg0 any) *gomock.Call { +func (mr *MockDiffSyncerMockRecorder) Sync(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sync", reflect.TypeOf((*MockDiffSyncer)(nil).Sync), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sync", reflect.TypeOf((*MockDiffSyncer)(nil).Sync), ctx) } diff --git a/commonspace/headsync/remotediff_test.go b/commonspace/headsync/remotediff_test.go index a9a6c65b4..cd0dfe47b 100644 --- a/commonspace/headsync/remotediff_test.go +++ b/commonspace/headsync/remotediff_test.go @@ -83,14 +83,14 @@ type mockClient struct { } func (m *mockClient) HeadSync(ctx context.Context, in *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { - res, err := in.Marshal() + res, err := in.MarshalVT() require.NoError(m.t, err) m.totalInSent += len(res) resp, err := HandleRangeRequest(ctx, m.l, in) if err != nil { return nil, err } - marsh, err := resp.Marshal() + marsh, err := resp.MarshalVT() require.NoError(m.t, err) m.totalOutSent += len(marsh) return resp, nil diff --git a/commonspace/headsync/statestorage/mock_statestorage/mock_statestorage.go b/commonspace/headsync/statestorage/mock_statestorage/mock_statestorage.go index 139b73a3e..0b13c6e81 100644 --- a/commonspace/headsync/statestorage/mock_statestorage/mock_statestorage.go +++ b/commonspace/headsync/statestorage/mock_statestorage/mock_statestorage.go @@ -5,21 +5,23 @@ // // mockgen -destination mock_statestorage/mock_statestorage.go github.com/anyproto/any-sync/commonspace/headsync/statestorage StateStorage // + // Package mock_statestorage is a generated GoMock package. package mock_statestorage import ( - context "context" reflect "reflect" statestorage "github.com/anyproto/any-sync/commonspace/headsync/statestorage" gomock "go.uber.org/mock/gomock" + context "golang.org/x/net/context" ) // MockStateStorage is a mock of StateStorage interface. type MockStateStorage struct { ctrl *gomock.Controller recorder *MockStateStorageMockRecorder + isgomock struct{} } // MockStateStorageMockRecorder is the mock recorder for MockStateStorage. @@ -40,44 +42,44 @@ func (m *MockStateStorage) EXPECT() *MockStateStorageMockRecorder { } // GetState mocks base method. -func (m *MockStateStorage) GetState(arg0 context.Context) (statestorage.State, error) { +func (m *MockStateStorage) GetState(ctx context.Context) (statestorage.State, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetState", arg0) + ret := m.ctrl.Call(m, "GetState", ctx) ret0, _ := ret[0].(statestorage.State) ret1, _ := ret[1].(error) return ret0, ret1 } // GetState indicates an expected call of GetState. -func (mr *MockStateStorageMockRecorder) GetState(arg0 any) *gomock.Call { +func (mr *MockStateStorageMockRecorder) GetState(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetState", reflect.TypeOf((*MockStateStorage)(nil).GetState), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetState", reflect.TypeOf((*MockStateStorage)(nil).GetState), ctx) } // SetHash mocks base method. -func (m *MockStateStorage) SetHash(arg0 context.Context, arg1, arg2 string) error { +func (m *MockStateStorage) SetHash(ctx context.Context, oldHash, newHash string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetHash", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SetHash", ctx, oldHash, newHash) ret0, _ := ret[0].(error) return ret0 } // SetHash indicates an expected call of SetHash. -func (mr *MockStateStorageMockRecorder) SetHash(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStateStorageMockRecorder) SetHash(ctx, oldHash, newHash any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHash", reflect.TypeOf((*MockStateStorage)(nil).SetHash), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHash", reflect.TypeOf((*MockStateStorage)(nil).SetHash), ctx, oldHash, newHash) } // SetObserver mocks base method. -func (m *MockStateStorage) SetObserver(arg0 statestorage.Observer) { +func (m *MockStateStorage) SetObserver(observer statestorage.Observer) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetObserver", arg0) + m.ctrl.Call(m, "SetObserver", observer) } // SetObserver indicates an expected call of SetObserver. -func (mr *MockStateStorageMockRecorder) SetObserver(arg0 any) *gomock.Call { +func (mr *MockStateStorageMockRecorder) SetObserver(observer any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObserver", reflect.TypeOf((*MockStateStorage)(nil).SetObserver), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetObserver", reflect.TypeOf((*MockStateStorage)(nil).SetObserver), observer) } // SettingsId mocks base method. diff --git a/commonspace/mock_commonspace/mock_commonspace.go b/commonspace/mock_commonspace/mock_commonspace.go index 652ccdc03..b87cb729d 100644 --- a/commonspace/mock_commonspace/mock_commonspace.go +++ b/commonspace/mock_commonspace/mock_commonspace.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_commonspace/mock_commonspace.go github.com/anyproto/any-sync/commonspace Space // + // Package mock_commonspace is a generated GoMock package. package mock_commonspace @@ -33,6 +34,7 @@ import ( type MockSpace struct { ctrl *gomock.Controller recorder *MockSpaceMockRecorder + isgomock struct{} } // MockSpaceMockRecorder is the mock recorder for MockSpace. @@ -109,90 +111,90 @@ func (mr *MockSpaceMockRecorder) DebugAllHeads() *gomock.Call { } // DeleteTree mocks base method. -func (m *MockSpace) DeleteTree(arg0 context.Context, arg1 string) error { +func (m *MockSpace) DeleteTree(ctx context.Context, id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteTree", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteTree", ctx, id) ret0, _ := ret[0].(error) return ret0 } // DeleteTree indicates an expected call of DeleteTree. -func (mr *MockSpaceMockRecorder) DeleteTree(arg0, arg1 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) DeleteTree(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockSpace)(nil).DeleteTree), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockSpace)(nil).DeleteTree), ctx, id) } // Description mocks base method. -func (m *MockSpace) Description(arg0 context.Context) (commonspace.SpaceDescription, error) { +func (m *MockSpace) Description(ctx context.Context) (commonspace.SpaceDescription, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Description", arg0) + ret := m.ctrl.Call(m, "Description", ctx) ret0, _ := ret[0].(commonspace.SpaceDescription) ret1, _ := ret[1].(error) return ret0, ret1 } // Description indicates an expected call of Description. -func (mr *MockSpaceMockRecorder) Description(arg0 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) Description(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockSpace)(nil).Description), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockSpace)(nil).Description), ctx) } // GetNodePeers mocks base method. -func (m *MockSpace) GetNodePeers(arg0 context.Context) ([]peer.Peer, error) { +func (m *MockSpace) GetNodePeers(ctx context.Context) ([]peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodePeers", arg0) + ret := m.ctrl.Call(m, "GetNodePeers", ctx) ret0, _ := ret[0].([]peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // GetNodePeers indicates an expected call of GetNodePeers. -func (mr *MockSpaceMockRecorder) GetNodePeers(arg0 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) GetNodePeers(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodePeers", reflect.TypeOf((*MockSpace)(nil).GetNodePeers), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodePeers", reflect.TypeOf((*MockSpace)(nil).GetNodePeers), ctx) } // HandleMessage mocks base method. -func (m *MockSpace) HandleMessage(arg0 context.Context, arg1 *objectmessages.HeadUpdate) error { +func (m *MockSpace) HandleMessage(ctx context.Context, msg *objectmessages.HeadUpdate) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleMessage", arg0, arg1) + ret := m.ctrl.Call(m, "HandleMessage", ctx, msg) ret0, _ := ret[0].(error) return ret0 } // HandleMessage indicates an expected call of HandleMessage. -func (mr *MockSpaceMockRecorder) HandleMessage(arg0, arg1 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) HandleMessage(ctx, msg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockSpace)(nil).HandleMessage), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockSpace)(nil).HandleMessage), ctx, msg) } // HandleRangeRequest mocks base method. -func (m *MockSpace) HandleRangeRequest(arg0 context.Context, arg1 *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { +func (m *MockSpace) HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleRangeRequest", arg0, arg1) + ret := m.ctrl.Call(m, "HandleRangeRequest", ctx, req) ret0, _ := ret[0].(*spacesyncproto.HeadSyncResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleRangeRequest indicates an expected call of HandleRangeRequest. -func (mr *MockSpaceMockRecorder) HandleRangeRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) HandleRangeRequest(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleRangeRequest", reflect.TypeOf((*MockSpace)(nil).HandleRangeRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleRangeRequest", reflect.TypeOf((*MockSpace)(nil).HandleRangeRequest), ctx, req) } // HandleStreamSyncRequest mocks base method. -func (m *MockSpace) HandleStreamSyncRequest(arg0 context.Context, arg1 *spacesyncproto.ObjectSyncMessage, arg2 drpc.Stream) error { +func (m *MockSpace) HandleStreamSyncRequest(ctx context.Context, req *spacesyncproto.ObjectSyncMessage, stream drpc.Stream) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleStreamSyncRequest", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "HandleStreamSyncRequest", ctx, req, stream) ret0, _ := ret[0].(error) return ret0 } // HandleStreamSyncRequest indicates an expected call of HandleStreamSyncRequest. -func (mr *MockSpaceMockRecorder) HandleStreamSyncRequest(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) HandleStreamSyncRequest(ctx, req, stream any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamSyncRequest", reflect.TypeOf((*MockSpace)(nil).HandleStreamSyncRequest), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamSyncRequest", reflect.TypeOf((*MockSpace)(nil).HandleStreamSyncRequest), ctx, req, stream) } // Id mocks base method. @@ -210,17 +212,17 @@ func (mr *MockSpaceMockRecorder) Id() *gomock.Call { } // Init mocks base method. -func (m *MockSpace) Init(arg0 context.Context) error { +func (m *MockSpace) Init(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", ctx) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockSpaceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) Init(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSpace)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSpace)(nil).Init), ctx) } // KeyValue mocks base method. @@ -308,16 +310,16 @@ func (mr *MockSpaceMockRecorder) TreeSyncer() *gomock.Call { } // TryClose mocks base method. -func (m *MockSpace) TryClose(arg0 time.Duration) (bool, error) { +func (m *MockSpace) TryClose(objectTTL time.Duration) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryClose", arg0) + ret := m.ctrl.Call(m, "TryClose", objectTTL) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // TryClose indicates an expected call of TryClose. -func (mr *MockSpaceMockRecorder) TryClose(arg0 any) *gomock.Call { +func (mr *MockSpaceMockRecorder) TryClose(objectTTL any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockSpace)(nil).TryClose), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockSpace)(nil).TryClose), objectTTL) } diff --git a/commonspace/object/acl/aclrecordproto/aclrecord.pb.go b/commonspace/object/acl/aclrecordproto/aclrecord.pb.go index d81b26840..44fe4c30d 100644 --- a/commonspace/object/acl/aclrecordproto/aclrecord.pb.go +++ b/commonspace/object/acl/aclrecordproto/aclrecord.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: commonspace/object/acl/aclrecordproto/protos/aclrecord.proto +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 +// source: aclrecord.proto package aclrecordproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // AclUserPermissions contains different possible user roles type AclUserPermissions int32 @@ -34,1008 +33,910 @@ const ( AclUserPermissions_Guest AclUserPermissions = 5 ) -var AclUserPermissions_name = map[int32]string{ - 0: "None", - 1: "Owner", - 2: "Admin", - 3: "Writer", - 4: "Reader", - 5: "Guest", -} +// Enum value maps for AclUserPermissions. +var ( + AclUserPermissions_name = map[int32]string{ + 0: "None", + 1: "Owner", + 2: "Admin", + 3: "Writer", + 4: "Reader", + 5: "Guest", + } + AclUserPermissions_value = map[string]int32{ + "None": 0, + "Owner": 1, + "Admin": 2, + "Writer": 3, + "Reader": 4, + "Guest": 5, + } +) -var AclUserPermissions_value = map[string]int32{ - "None": 0, - "Owner": 1, - "Admin": 2, - "Writer": 3, - "Reader": 4, - "Guest": 5, +func (x AclUserPermissions) Enum() *AclUserPermissions { + p := new(AclUserPermissions) + *p = x + return p } func (x AclUserPermissions) String() string { - return proto.EnumName(AclUserPermissions_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AclUserPermissions) Descriptor() protoreflect.EnumDescriptor { + return file_aclrecord_proto_enumTypes[0].Descriptor() +} + +func (AclUserPermissions) Type() protoreflect.EnumType { + return &file_aclrecord_proto_enumTypes[0] +} + +func (x AclUserPermissions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use AclUserPermissions.Descriptor instead. func (AclUserPermissions) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{0} + return file_aclrecord_proto_rawDescGZIP(), []int{0} } // AclRoot is a root of access control list type AclRoot struct { - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - MasterKey []byte `protobuf:"bytes,2,opt,name=masterKey,proto3" json:"masterKey,omitempty"` - SpaceId string `protobuf:"bytes,3,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - EncryptedReadKey []byte `protobuf:"bytes,4,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - IdentitySignature []byte `protobuf:"bytes,6,opt,name=identitySignature,proto3" json:"identitySignature,omitempty"` - MetadataPubKey []byte `protobuf:"bytes,7,opt,name=metadataPubKey,proto3" json:"metadataPubKey,omitempty"` - EncryptedMetadataPrivKey []byte `protobuf:"bytes,8,opt,name=encryptedMetadataPrivKey,proto3" json:"encryptedMetadataPrivKey,omitempty"` - EncryptedOwnerMetadata []byte `protobuf:"bytes,9,opt,name=encryptedOwnerMetadata,proto3" json:"encryptedOwnerMetadata,omitempty"` -} - -func (m *AclRoot) Reset() { *m = AclRoot{} } -func (m *AclRoot) String() string { return proto.CompactTextString(m) } -func (*AclRoot) ProtoMessage() {} -func (*AclRoot) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{0} -} -func (m *AclRoot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclRoot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + state protoimpl.MessageState `protogen:"open.v1"` + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + MasterKey []byte `protobuf:"bytes,2,opt,name=masterKey,proto3" json:"masterKey,omitempty"` + SpaceId string `protobuf:"bytes,3,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + EncryptedReadKey []byte `protobuf:"bytes,4,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + IdentitySignature []byte `protobuf:"bytes,6,opt,name=identitySignature,proto3" json:"identitySignature,omitempty"` + MetadataPubKey []byte `protobuf:"bytes,7,opt,name=metadataPubKey,proto3" json:"metadataPubKey,omitempty"` + EncryptedMetadataPrivKey []byte `protobuf:"bytes,8,opt,name=encryptedMetadataPrivKey,proto3" json:"encryptedMetadataPrivKey,omitempty"` + EncryptedOwnerMetadata []byte `protobuf:"bytes,9,opt,name=encryptedOwnerMetadata,proto3" json:"encryptedOwnerMetadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclRoot) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclRoot) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclRoot.Merge(m, src) + +func (x *AclRoot) Reset() { + *x = AclRoot{} + mi := &file_aclrecord_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclRoot) XXX_Size() int { - return m.Size() + +func (x *AclRoot) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclRoot) XXX_DiscardUnknown() { - xxx_messageInfo_AclRoot.DiscardUnknown(m) + +func (*AclRoot) ProtoMessage() {} + +func (x *AclRoot) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclRoot proto.InternalMessageInfo +// Deprecated: Use AclRoot.ProtoReflect.Descriptor instead. +func (*AclRoot) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{0} +} -func (m *AclRoot) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *AclRoot) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *AclRoot) GetMasterKey() []byte { - if m != nil { - return m.MasterKey +func (x *AclRoot) GetMasterKey() []byte { + if x != nil { + return x.MasterKey } return nil } -func (m *AclRoot) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *AclRoot) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *AclRoot) GetEncryptedReadKey() []byte { - if m != nil { - return m.EncryptedReadKey +func (x *AclRoot) GetEncryptedReadKey() []byte { + if x != nil { + return x.EncryptedReadKey } return nil } -func (m *AclRoot) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *AclRoot) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *AclRoot) GetIdentitySignature() []byte { - if m != nil { - return m.IdentitySignature +func (x *AclRoot) GetIdentitySignature() []byte { + if x != nil { + return x.IdentitySignature } return nil } -func (m *AclRoot) GetMetadataPubKey() []byte { - if m != nil { - return m.MetadataPubKey +func (x *AclRoot) GetMetadataPubKey() []byte { + if x != nil { + return x.MetadataPubKey } return nil } -func (m *AclRoot) GetEncryptedMetadataPrivKey() []byte { - if m != nil { - return m.EncryptedMetadataPrivKey +func (x *AclRoot) GetEncryptedMetadataPrivKey() []byte { + if x != nil { + return x.EncryptedMetadataPrivKey } return nil } -func (m *AclRoot) GetEncryptedOwnerMetadata() []byte { - if m != nil { - return m.EncryptedOwnerMetadata +func (x *AclRoot) GetEncryptedOwnerMetadata() []byte { + if x != nil { + return x.EncryptedOwnerMetadata } return nil } // AclAccountInvite contains the public invite key, the private part of which is sent to the user directly type AclAccountInvite struct { - InviteKey []byte `protobuf:"bytes,1,opt,name=inviteKey,proto3" json:"inviteKey,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + InviteKey []byte `protobuf:"bytes,1,opt,name=inviteKey,proto3" json:"inviteKey,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountInvite) Reset() { *m = AclAccountInvite{} } -func (m *AclAccountInvite) String() string { return proto.CompactTextString(m) } -func (*AclAccountInvite) ProtoMessage() {} -func (*AclAccountInvite) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{1} -} -func (m *AclAccountInvite) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountInvite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountInvite.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountInvite) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountInvite) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountInvite.Merge(m, src) +func (x *AclAccountInvite) Reset() { + *x = AclAccountInvite{} + mi := &file_aclrecord_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountInvite) XXX_Size() int { - return m.Size() + +func (x *AclAccountInvite) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountInvite) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountInvite.DiscardUnknown(m) + +func (*AclAccountInvite) ProtoMessage() {} + +func (x *AclAccountInvite) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountInvite proto.InternalMessageInfo +// Deprecated: Use AclAccountInvite.ProtoReflect.Descriptor instead. +func (*AclAccountInvite) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{1} +} -func (m *AclAccountInvite) GetInviteKey() []byte { - if m != nil { - return m.InviteKey +func (x *AclAccountInvite) GetInviteKey() []byte { + if x != nil { + return x.InviteKey } return nil } // AclAccountRequestJoin contains the reference to the invite record and the data of the person who wants to join, confirmed by the private invite key type AclAccountRequestJoin struct { - InviteIdentity []byte `protobuf:"bytes,1,opt,name=inviteIdentity,proto3" json:"inviteIdentity,omitempty"` - InviteRecordId string `protobuf:"bytes,2,opt,name=inviteRecordId,proto3" json:"inviteRecordId,omitempty"` - InviteIdentitySignature []byte `protobuf:"bytes,3,opt,name=inviteIdentitySignature,proto3" json:"inviteIdentitySignature,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + InviteIdentity []byte `protobuf:"bytes,1,opt,name=inviteIdentity,proto3" json:"inviteIdentity,omitempty"` + InviteRecordId string `protobuf:"bytes,2,opt,name=inviteRecordId,proto3" json:"inviteRecordId,omitempty"` + InviteIdentitySignature []byte `protobuf:"bytes,3,opt,name=inviteIdentitySignature,proto3" json:"inviteIdentitySignature,omitempty"` // Metadata is encrypted with metadata key of the space - Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountRequestJoin) Reset() { *m = AclAccountRequestJoin{} } -func (m *AclAccountRequestJoin) String() string { return proto.CompactTextString(m) } -func (*AclAccountRequestJoin) ProtoMessage() {} -func (*AclAccountRequestJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{2} -} -func (m *AclAccountRequestJoin) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountRequestJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountRequestJoin.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountRequestJoin) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AclAccountRequestJoin) Reset() { + *x = AclAccountRequestJoin{} + mi := &file_aclrecord_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountRequestJoin) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountRequestJoin.Merge(m, src) -} -func (m *AclAccountRequestJoin) XXX_Size() int { - return m.Size() + +func (x *AclAccountRequestJoin) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountRequestJoin) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountRequestJoin.DiscardUnknown(m) + +func (*AclAccountRequestJoin) ProtoMessage() {} + +func (x *AclAccountRequestJoin) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountRequestJoin proto.InternalMessageInfo +// Deprecated: Use AclAccountRequestJoin.ProtoReflect.Descriptor instead. +func (*AclAccountRequestJoin) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{2} +} -func (m *AclAccountRequestJoin) GetInviteIdentity() []byte { - if m != nil { - return m.InviteIdentity +func (x *AclAccountRequestJoin) GetInviteIdentity() []byte { + if x != nil { + return x.InviteIdentity } return nil } -func (m *AclAccountRequestJoin) GetInviteRecordId() string { - if m != nil { - return m.InviteRecordId +func (x *AclAccountRequestJoin) GetInviteRecordId() string { + if x != nil { + return x.InviteRecordId } return "" } -func (m *AclAccountRequestJoin) GetInviteIdentitySignature() []byte { - if m != nil { - return m.InviteIdentitySignature +func (x *AclAccountRequestJoin) GetInviteIdentitySignature() []byte { + if x != nil { + return x.InviteIdentitySignature } return nil } -func (m *AclAccountRequestJoin) GetMetadata() []byte { - if m != nil { - return m.Metadata +func (x *AclAccountRequestJoin) GetMetadata() []byte { + if x != nil { + return x.Metadata } return nil } // AclAccountRequestAccept contains the reference to join record and all read keys, encrypted with the identity of the requestor type AclAccountRequestAccept struct { - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - RequestRecordId string `protobuf:"bytes,2,opt,name=requestRecordId,proto3" json:"requestRecordId,omitempty"` - EncryptedReadKey []byte `protobuf:"bytes,3,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` - Permissions AclUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + RequestRecordId string `protobuf:"bytes,2,opt,name=requestRecordId,proto3" json:"requestRecordId,omitempty"` + EncryptedReadKey []byte `protobuf:"bytes,3,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` + Permissions AclUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountRequestAccept) Reset() { *m = AclAccountRequestAccept{} } -func (m *AclAccountRequestAccept) String() string { return proto.CompactTextString(m) } -func (*AclAccountRequestAccept) ProtoMessage() {} -func (*AclAccountRequestAccept) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{3} -} -func (m *AclAccountRequestAccept) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountRequestAccept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountRequestAccept.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountRequestAccept) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountRequestAccept) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountRequestAccept.Merge(m, src) +func (x *AclAccountRequestAccept) Reset() { + *x = AclAccountRequestAccept{} + mi := &file_aclrecord_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountRequestAccept) XXX_Size() int { - return m.Size() + +func (x *AclAccountRequestAccept) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountRequestAccept) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountRequestAccept.DiscardUnknown(m) + +func (*AclAccountRequestAccept) ProtoMessage() {} + +func (x *AclAccountRequestAccept) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountRequestAccept proto.InternalMessageInfo +// Deprecated: Use AclAccountRequestAccept.ProtoReflect.Descriptor instead. +func (*AclAccountRequestAccept) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{3} +} -func (m *AclAccountRequestAccept) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *AclAccountRequestAccept) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *AclAccountRequestAccept) GetRequestRecordId() string { - if m != nil { - return m.RequestRecordId +func (x *AclAccountRequestAccept) GetRequestRecordId() string { + if x != nil { + return x.RequestRecordId } return "" } -func (m *AclAccountRequestAccept) GetEncryptedReadKey() []byte { - if m != nil { - return m.EncryptedReadKey +func (x *AclAccountRequestAccept) GetEncryptedReadKey() []byte { + if x != nil { + return x.EncryptedReadKey } return nil } -func (m *AclAccountRequestAccept) GetPermissions() AclUserPermissions { - if m != nil { - return m.Permissions +func (x *AclAccountRequestAccept) GetPermissions() AclUserPermissions { + if x != nil { + return x.Permissions } return AclUserPermissions_None } // AclAccountRequestDecline contains the reference to join record type AclAccountRequestDecline struct { - RequestRecordId string `protobuf:"bytes,1,opt,name=requestRecordId,proto3" json:"requestRecordId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RequestRecordId string `protobuf:"bytes,1,opt,name=requestRecordId,proto3" json:"requestRecordId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountRequestDecline) Reset() { *m = AclAccountRequestDecline{} } -func (m *AclAccountRequestDecline) String() string { return proto.CompactTextString(m) } -func (*AclAccountRequestDecline) ProtoMessage() {} -func (*AclAccountRequestDecline) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{4} -} -func (m *AclAccountRequestDecline) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountRequestDecline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountRequestDecline.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AclAccountRequestDecline) Reset() { + *x = AclAccountRequestDecline{} + mi := &file_aclrecord_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountRequestDecline) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountRequestDecline) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountRequestDecline.Merge(m, src) -} -func (m *AclAccountRequestDecline) XXX_Size() int { - return m.Size() + +func (x *AclAccountRequestDecline) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountRequestDecline) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountRequestDecline.DiscardUnknown(m) + +func (*AclAccountRequestDecline) ProtoMessage() {} + +func (x *AclAccountRequestDecline) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountRequestDecline proto.InternalMessageInfo +// Deprecated: Use AclAccountRequestDecline.ProtoReflect.Descriptor instead. +func (*AclAccountRequestDecline) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{4} +} -func (m *AclAccountRequestDecline) GetRequestRecordId() string { - if m != nil { - return m.RequestRecordId +func (x *AclAccountRequestDecline) GetRequestRecordId() string { + if x != nil { + return x.RequestRecordId } return "" } // AclAccountInviteRevoke revokes the invite record type AclAccountInviteRevoke struct { - InviteRecordId string `protobuf:"bytes,1,opt,name=inviteRecordId,proto3" json:"inviteRecordId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + InviteRecordId string `protobuf:"bytes,1,opt,name=inviteRecordId,proto3" json:"inviteRecordId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountInviteRevoke) Reset() { *m = AclAccountInviteRevoke{} } -func (m *AclAccountInviteRevoke) String() string { return proto.CompactTextString(m) } -func (*AclAccountInviteRevoke) ProtoMessage() {} -func (*AclAccountInviteRevoke) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{5} -} -func (m *AclAccountInviteRevoke) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountInviteRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountInviteRevoke.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountInviteRevoke) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountInviteRevoke) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountInviteRevoke.Merge(m, src) +func (x *AclAccountInviteRevoke) Reset() { + *x = AclAccountInviteRevoke{} + mi := &file_aclrecord_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountInviteRevoke) XXX_Size() int { - return m.Size() + +func (x *AclAccountInviteRevoke) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountInviteRevoke) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountInviteRevoke.DiscardUnknown(m) + +func (*AclAccountInviteRevoke) ProtoMessage() {} + +func (x *AclAccountInviteRevoke) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountInviteRevoke proto.InternalMessageInfo +// Deprecated: Use AclAccountInviteRevoke.ProtoReflect.Descriptor instead. +func (*AclAccountInviteRevoke) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{5} +} -func (m *AclAccountInviteRevoke) GetInviteRecordId() string { - if m != nil { - return m.InviteRecordId +func (x *AclAccountInviteRevoke) GetInviteRecordId() string { + if x != nil { + return x.InviteRecordId } return "" } // AclEncryptedReadKeys are new key for specific identity type AclEncryptedReadKey struct { - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - EncryptedReadKey []byte `protobuf:"bytes,2,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + EncryptedReadKey []byte `protobuf:"bytes,2,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclEncryptedReadKey) Reset() { *m = AclEncryptedReadKey{} } -func (m *AclEncryptedReadKey) String() string { return proto.CompactTextString(m) } -func (*AclEncryptedReadKey) ProtoMessage() {} -func (*AclEncryptedReadKey) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{6} -} -func (m *AclEncryptedReadKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclEncryptedReadKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclEncryptedReadKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclEncryptedReadKey) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AclEncryptedReadKey) Reset() { + *x = AclEncryptedReadKey{} + mi := &file_aclrecord_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclEncryptedReadKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclEncryptedReadKey.Merge(m, src) -} -func (m *AclEncryptedReadKey) XXX_Size() int { - return m.Size() + +func (x *AclEncryptedReadKey) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclEncryptedReadKey) XXX_DiscardUnknown() { - xxx_messageInfo_AclEncryptedReadKey.DiscardUnknown(m) + +func (*AclEncryptedReadKey) ProtoMessage() {} + +func (x *AclEncryptedReadKey) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_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) } -var xxx_messageInfo_AclEncryptedReadKey proto.InternalMessageInfo +// Deprecated: Use AclEncryptedReadKey.ProtoReflect.Descriptor instead. +func (*AclEncryptedReadKey) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{6} +} -func (m *AclEncryptedReadKey) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *AclEncryptedReadKey) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *AclEncryptedReadKey) GetEncryptedReadKey() []byte { - if m != nil { - return m.EncryptedReadKey +func (x *AclEncryptedReadKey) GetEncryptedReadKey() []byte { + if x != nil { + return x.EncryptedReadKey } return nil } // AclAccountPermissionChanges contains permission changes for certain identities type AclAccountPermissionChanges struct { - Changes []*AclAccountPermissionChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Changes []*AclAccountPermissionChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountPermissionChanges) Reset() { *m = AclAccountPermissionChanges{} } -func (m *AclAccountPermissionChanges) String() string { return proto.CompactTextString(m) } -func (*AclAccountPermissionChanges) ProtoMessage() {} -func (*AclAccountPermissionChanges) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{7} -} -func (m *AclAccountPermissionChanges) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountPermissionChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountPermissionChanges.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountPermissionChanges) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountPermissionChanges) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountPermissionChanges.Merge(m, src) +func (x *AclAccountPermissionChanges) Reset() { + *x = AclAccountPermissionChanges{} + mi := &file_aclrecord_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountPermissionChanges) XXX_Size() int { - return m.Size() + +func (x *AclAccountPermissionChanges) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountPermissionChanges) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountPermissionChanges.DiscardUnknown(m) + +func (*AclAccountPermissionChanges) ProtoMessage() {} + +func (x *AclAccountPermissionChanges) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountPermissionChanges proto.InternalMessageInfo +// Deprecated: Use AclAccountPermissionChanges.ProtoReflect.Descriptor instead. +func (*AclAccountPermissionChanges) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{7} +} -func (m *AclAccountPermissionChanges) GetChanges() []*AclAccountPermissionChange { - if m != nil { - return m.Changes +func (x *AclAccountPermissionChanges) GetChanges() []*AclAccountPermissionChange { + if x != nil { + return x.Changes } return nil } // AclAccountsAdd contains new accounts to be added type AclAccountsAdd struct { - Additions []*AclAccountAdd `protobuf:"bytes,1,rep,name=additions,proto3" json:"additions,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Additions []*AclAccountAdd `protobuf:"bytes,1,rep,name=additions,proto3" json:"additions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountsAdd) Reset() { *m = AclAccountsAdd{} } -func (m *AclAccountsAdd) String() string { return proto.CompactTextString(m) } -func (*AclAccountsAdd) ProtoMessage() {} -func (*AclAccountsAdd) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{8} -} -func (m *AclAccountsAdd) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountsAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountsAdd.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AclAccountsAdd) Reset() { + *x = AclAccountsAdd{} + mi := &file_aclrecord_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountsAdd) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountsAdd) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountsAdd.Merge(m, src) -} -func (m *AclAccountsAdd) XXX_Size() int { - return m.Size() + +func (x *AclAccountsAdd) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountsAdd) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountsAdd.DiscardUnknown(m) + +func (*AclAccountsAdd) ProtoMessage() {} + +func (x *AclAccountsAdd) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountsAdd proto.InternalMessageInfo +// Deprecated: Use AclAccountsAdd.ProtoReflect.Descriptor instead. +func (*AclAccountsAdd) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{8} +} -func (m *AclAccountsAdd) GetAdditions() []*AclAccountAdd { - if m != nil { - return m.Additions +func (x *AclAccountsAdd) GetAdditions() []*AclAccountAdd { + if x != nil { + return x.Additions } return nil } // AclAccountAdd contains new account to be added type AclAccountAdd struct { - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Permissions AclUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"` - Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - EncryptedReadKey []byte `protobuf:"bytes,4,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Permissions AclUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"` + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + EncryptedReadKey []byte `protobuf:"bytes,4,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountAdd) Reset() { *m = AclAccountAdd{} } -func (m *AclAccountAdd) String() string { return proto.CompactTextString(m) } -func (*AclAccountAdd) ProtoMessage() {} -func (*AclAccountAdd) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{9} -} -func (m *AclAccountAdd) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountAdd.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountAdd) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountAdd) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountAdd.Merge(m, src) +func (x *AclAccountAdd) Reset() { + *x = AclAccountAdd{} + mi := &file_aclrecord_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountAdd) XXX_Size() int { - return m.Size() + +func (x *AclAccountAdd) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountAdd) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountAdd.DiscardUnknown(m) + +func (*AclAccountAdd) ProtoMessage() {} + +func (x *AclAccountAdd) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountAdd proto.InternalMessageInfo +// Deprecated: Use AclAccountAdd.ProtoReflect.Descriptor instead. +func (*AclAccountAdd) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{9} +} -func (m *AclAccountAdd) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *AclAccountAdd) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *AclAccountAdd) GetPermissions() AclUserPermissions { - if m != nil { - return m.Permissions +func (x *AclAccountAdd) GetPermissions() AclUserPermissions { + if x != nil { + return x.Permissions } return AclUserPermissions_None } -func (m *AclAccountAdd) GetMetadata() []byte { - if m != nil { - return m.Metadata +func (x *AclAccountAdd) GetMetadata() []byte { + if x != nil { + return x.Metadata } return nil } -func (m *AclAccountAdd) GetEncryptedReadKey() []byte { - if m != nil { - return m.EncryptedReadKey +func (x *AclAccountAdd) GetEncryptedReadKey() []byte { + if x != nil { + return x.EncryptedReadKey } return nil } // AclRequestCancel contains reference to the request that is canceled by the account type AclAccountRequestCancel struct { - RecordId string `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RecordId string `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountRequestCancel) Reset() { *m = AclAccountRequestCancel{} } -func (m *AclAccountRequestCancel) String() string { return proto.CompactTextString(m) } -func (*AclAccountRequestCancel) ProtoMessage() {} -func (*AclAccountRequestCancel) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{10} -} -func (m *AclAccountRequestCancel) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountRequestCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountRequestCancel.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountRequestCancel) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AclAccountRequestCancel) Reset() { + *x = AclAccountRequestCancel{} + mi := &file_aclrecord_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountRequestCancel) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountRequestCancel.Merge(m, src) -} -func (m *AclAccountRequestCancel) XXX_Size() int { - return m.Size() + +func (x *AclAccountRequestCancel) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountRequestCancel) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountRequestCancel.DiscardUnknown(m) + +func (*AclAccountRequestCancel) ProtoMessage() {} + +func (x *AclAccountRequestCancel) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountRequestCancel proto.InternalMessageInfo +// Deprecated: Use AclAccountRequestCancel.ProtoReflect.Descriptor instead. +func (*AclAccountRequestCancel) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{10} +} -func (m *AclAccountRequestCancel) GetRecordId() string { - if m != nil { - return m.RecordId +func (x *AclAccountRequestCancel) GetRecordId() string { + if x != nil { + return x.RecordId } return "" } // AclAccountPermissionChange changes permissions of specific account type AclAccountPermissionChange struct { - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Permissions AclUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Permissions AclUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountPermissionChange) Reset() { *m = AclAccountPermissionChange{} } -func (m *AclAccountPermissionChange) String() string { return proto.CompactTextString(m) } -func (*AclAccountPermissionChange) ProtoMessage() {} -func (*AclAccountPermissionChange) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{11} -} -func (m *AclAccountPermissionChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountPermissionChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountPermissionChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountPermissionChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountPermissionChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountPermissionChange.Merge(m, src) +func (x *AclAccountPermissionChange) Reset() { + *x = AclAccountPermissionChange{} + mi := &file_aclrecord_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountPermissionChange) XXX_Size() int { - return m.Size() + +func (x *AclAccountPermissionChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountPermissionChange) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountPermissionChange.DiscardUnknown(m) + +func (*AclAccountPermissionChange) ProtoMessage() {} + +func (x *AclAccountPermissionChange) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountPermissionChange proto.InternalMessageInfo +// Deprecated: Use AclAccountPermissionChange.ProtoReflect.Descriptor instead. +func (*AclAccountPermissionChange) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{11} +} -func (m *AclAccountPermissionChange) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *AclAccountPermissionChange) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *AclAccountPermissionChange) GetPermissions() AclUserPermissions { - if m != nil { - return m.Permissions +func (x *AclAccountPermissionChange) GetPermissions() AclUserPermissions { + if x != nil { + return x.Permissions } return AclUserPermissions_None } // AclReadKeyChange changes the key for a space type AclReadKeyChange struct { + state protoimpl.MessageState `protogen:"open.v1"` AccountKeys []*AclEncryptedReadKey `protobuf:"bytes,1,rep,name=accountKeys,proto3" json:"accountKeys,omitempty"` MetadataPubKey []byte `protobuf:"bytes,2,opt,name=metadataPubKey,proto3" json:"metadataPubKey,omitempty"` // EncryptedMetadataPrivKey is encrypted with new read key EncryptedMetadataPrivKey []byte `protobuf:"bytes,3,opt,name=encryptedMetadataPrivKey,proto3" json:"encryptedMetadataPrivKey,omitempty"` // EncryptedOldReadKey is encrypted with new read key EncryptedOldReadKey []byte `protobuf:"bytes,4,opt,name=encryptedOldReadKey,proto3" json:"encryptedOldReadKey,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclReadKeyChange) Reset() { *m = AclReadKeyChange{} } -func (m *AclReadKeyChange) String() string { return proto.CompactTextString(m) } -func (*AclReadKeyChange) ProtoMessage() {} -func (*AclReadKeyChange) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{12} -} -func (m *AclReadKeyChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclReadKeyChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclReadKeyChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AclReadKeyChange) Reset() { + *x = AclReadKeyChange{} + mi := &file_aclrecord_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclReadKeyChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclReadKeyChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclReadKeyChange.Merge(m, src) -} -func (m *AclReadKeyChange) XXX_Size() int { - return m.Size() + +func (x *AclReadKeyChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclReadKeyChange) XXX_DiscardUnknown() { - xxx_messageInfo_AclReadKeyChange.DiscardUnknown(m) + +func (*AclReadKeyChange) ProtoMessage() {} + +func (x *AclReadKeyChange) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclReadKeyChange proto.InternalMessageInfo +// Deprecated: Use AclReadKeyChange.ProtoReflect.Descriptor instead. +func (*AclReadKeyChange) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{12} +} -func (m *AclReadKeyChange) GetAccountKeys() []*AclEncryptedReadKey { - if m != nil { - return m.AccountKeys +func (x *AclReadKeyChange) GetAccountKeys() []*AclEncryptedReadKey { + if x != nil { + return x.AccountKeys } return nil } -func (m *AclReadKeyChange) GetMetadataPubKey() []byte { - if m != nil { - return m.MetadataPubKey +func (x *AclReadKeyChange) GetMetadataPubKey() []byte { + if x != nil { + return x.MetadataPubKey } return nil } -func (m *AclReadKeyChange) GetEncryptedMetadataPrivKey() []byte { - if m != nil { - return m.EncryptedMetadataPrivKey +func (x *AclReadKeyChange) GetEncryptedMetadataPrivKey() []byte { + if x != nil { + return x.EncryptedMetadataPrivKey } return nil } -func (m *AclReadKeyChange) GetEncryptedOldReadKey() []byte { - if m != nil { - return m.EncryptedOldReadKey +func (x *AclReadKeyChange) GetEncryptedOldReadKey() []byte { + if x != nil { + return x.EncryptedOldReadKey } return nil } // AclAccountRemove removes an account and changes read key for space type AclAccountRemove struct { - Identities [][]byte `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"` - ReadKeyChange *AclReadKeyChange `protobuf:"bytes,2,opt,name=readKeyChange,proto3" json:"readKeyChange,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identities [][]byte `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"` + ReadKeyChange *AclReadKeyChange `protobuf:"bytes,2,opt,name=readKeyChange,proto3" json:"readKeyChange,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountRemove) Reset() { *m = AclAccountRemove{} } -func (m *AclAccountRemove) String() string { return proto.CompactTextString(m) } -func (*AclAccountRemove) ProtoMessage() {} -func (*AclAccountRemove) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{13} -} -func (m *AclAccountRemove) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountRemove.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountRemove) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountRemove) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountRemove.Merge(m, src) +func (x *AclAccountRemove) Reset() { + *x = AclAccountRemove{} + mi := &file_aclrecord_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountRemove) XXX_Size() int { - return m.Size() + +func (x *AclAccountRemove) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountRemove) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountRemove.DiscardUnknown(m) + +func (*AclAccountRemove) ProtoMessage() {} + +func (x *AclAccountRemove) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountRemove proto.InternalMessageInfo +// Deprecated: Use AclAccountRemove.ProtoReflect.Descriptor instead. +func (*AclAccountRemove) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{13} +} -func (m *AclAccountRemove) GetIdentities() [][]byte { - if m != nil { - return m.Identities +func (x *AclAccountRemove) GetIdentities() [][]byte { + if x != nil { + return x.Identities } return nil } -func (m *AclAccountRemove) GetReadKeyChange() *AclReadKeyChange { - if m != nil { - return m.ReadKeyChange +func (x *AclAccountRemove) GetReadKeyChange() *AclReadKeyChange { + if x != nil { + return x.ReadKeyChange } return nil } // AclAccountRequestRemove adds a request to remove an account type AclAccountRequestRemove struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountRequestRemove) Reset() { *m = AclAccountRequestRemove{} } -func (m *AclAccountRequestRemove) String() string { return proto.CompactTextString(m) } -func (*AclAccountRequestRemove) ProtoMessage() {} -func (*AclAccountRequestRemove) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{14} -} -func (m *AclAccountRequestRemove) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAccountRequestRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAccountRequestRemove.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAccountRequestRemove) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAccountRequestRemove) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAccountRequestRemove.Merge(m, src) +func (x *AclAccountRequestRemove) Reset() { + *x = AclAccountRequestRemove{} + mi := &file_aclrecord_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountRequestRemove) XXX_Size() int { - return m.Size() + +func (x *AclAccountRequestRemove) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountRequestRemove) XXX_DiscardUnknown() { - xxx_messageInfo_AclAccountRequestRemove.DiscardUnknown(m) + +func (*AclAccountRequestRemove) ProtoMessage() {} + +func (x *AclAccountRequestRemove) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAccountRequestRemove proto.InternalMessageInfo +// Deprecated: Use AclAccountRequestRemove.ProtoReflect.Descriptor instead. +func (*AclAccountRequestRemove) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{14} +} // AclContentValue contains possible values for Acl type AclContentValue struct { + state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Value: // // *AclContentValue_Invite @@ -1050,4352 +951,576 @@ type AclContentValue struct { // *AclContentValue_PermissionChanges // *AclContentValue_AccountsAdd // *AclContentValue_RequestCancel - Value isAclContentValueValue `protobuf_oneof:"value"` + Value isAclContentValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclContentValue) Reset() { *m = AclContentValue{} } -func (m *AclContentValue) String() string { return proto.CompactTextString(m) } -func (*AclContentValue) ProtoMessage() {} -func (*AclContentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{15} -} -func (m *AclContentValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclContentValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclContentValue) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclContentValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclContentValue.Merge(m, src) -} -func (m *AclContentValue) XXX_Size() int { - return m.Size() +func (x *AclContentValue) Reset() { + *x = AclContentValue{} + mi := &file_aclrecord_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclContentValue) XXX_DiscardUnknown() { - xxx_messageInfo_AclContentValue.DiscardUnknown(m) + +func (x *AclContentValue) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_AclContentValue proto.InternalMessageInfo +func (*AclContentValue) ProtoMessage() {} -type isAclContentValueValue interface { - isAclContentValueValue() - MarshalTo([]byte) (int, error) - Size() int +func (x *AclContentValue) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type AclContentValue_Invite struct { - Invite *AclAccountInvite `protobuf:"bytes,1,opt,name=invite,proto3,oneof" json:"invite,omitempty"` -} -type AclContentValue_InviteRevoke struct { - InviteRevoke *AclAccountInviteRevoke `protobuf:"bytes,2,opt,name=inviteRevoke,proto3,oneof" json:"inviteRevoke,omitempty"` -} -type AclContentValue_RequestJoin struct { - RequestJoin *AclAccountRequestJoin `protobuf:"bytes,3,opt,name=requestJoin,proto3,oneof" json:"requestJoin,omitempty"` -} -type AclContentValue_RequestAccept struct { - RequestAccept *AclAccountRequestAccept `protobuf:"bytes,4,opt,name=requestAccept,proto3,oneof" json:"requestAccept,omitempty"` -} -type AclContentValue_PermissionChange struct { - PermissionChange *AclAccountPermissionChange `protobuf:"bytes,5,opt,name=permissionChange,proto3,oneof" json:"permissionChange,omitempty"` -} -type AclContentValue_AccountRemove struct { - AccountRemove *AclAccountRemove `protobuf:"bytes,6,opt,name=accountRemove,proto3,oneof" json:"accountRemove,omitempty"` -} -type AclContentValue_ReadKeyChange struct { - ReadKeyChange *AclReadKeyChange `protobuf:"bytes,7,opt,name=readKeyChange,proto3,oneof" json:"readKeyChange,omitempty"` -} -type AclContentValue_RequestDecline struct { - RequestDecline *AclAccountRequestDecline `protobuf:"bytes,8,opt,name=requestDecline,proto3,oneof" json:"requestDecline,omitempty"` -} -type AclContentValue_AccountRequestRemove struct { - AccountRequestRemove *AclAccountRequestRemove `protobuf:"bytes,9,opt,name=accountRequestRemove,proto3,oneof" json:"accountRequestRemove,omitempty"` -} -type AclContentValue_PermissionChanges struct { - PermissionChanges *AclAccountPermissionChanges `protobuf:"bytes,10,opt,name=permissionChanges,proto3,oneof" json:"permissionChanges,omitempty"` -} -type AclContentValue_AccountsAdd struct { - AccountsAdd *AclAccountsAdd `protobuf:"bytes,11,opt,name=accountsAdd,proto3,oneof" json:"accountsAdd,omitempty"` +// Deprecated: Use AclContentValue.ProtoReflect.Descriptor instead. +func (*AclContentValue) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{15} } -type AclContentValue_RequestCancel struct { - RequestCancel *AclAccountRequestCancel `protobuf:"bytes,12,opt,name=requestCancel,proto3,oneof" json:"requestCancel,omitempty"` -} - -func (*AclContentValue_Invite) isAclContentValueValue() {} -func (*AclContentValue_InviteRevoke) isAclContentValueValue() {} -func (*AclContentValue_RequestJoin) isAclContentValueValue() {} -func (*AclContentValue_RequestAccept) isAclContentValueValue() {} -func (*AclContentValue_PermissionChange) isAclContentValueValue() {} -func (*AclContentValue_AccountRemove) isAclContentValueValue() {} -func (*AclContentValue_ReadKeyChange) isAclContentValueValue() {} -func (*AclContentValue_RequestDecline) isAclContentValueValue() {} -func (*AclContentValue_AccountRequestRemove) isAclContentValueValue() {} -func (*AclContentValue_PermissionChanges) isAclContentValueValue() {} -func (*AclContentValue_AccountsAdd) isAclContentValueValue() {} -func (*AclContentValue_RequestCancel) isAclContentValueValue() {} - -func (m *AclContentValue) GetValue() isAclContentValueValue { - if m != nil { - return m.Value + +func (x *AclContentValue) GetValue() isAclContentValue_Value { + if x != nil { + return x.Value } return nil } -func (m *AclContentValue) GetInvite() *AclAccountInvite { - if x, ok := m.GetValue().(*AclContentValue_Invite); ok { - return x.Invite +func (x *AclContentValue) GetInvite() *AclAccountInvite { + if x != nil { + if x, ok := x.Value.(*AclContentValue_Invite); ok { + return x.Invite + } } return nil } -func (m *AclContentValue) GetInviteRevoke() *AclAccountInviteRevoke { - if x, ok := m.GetValue().(*AclContentValue_InviteRevoke); ok { - return x.InviteRevoke +func (x *AclContentValue) GetInviteRevoke() *AclAccountInviteRevoke { + if x != nil { + if x, ok := x.Value.(*AclContentValue_InviteRevoke); ok { + return x.InviteRevoke + } } return nil } -func (m *AclContentValue) GetRequestJoin() *AclAccountRequestJoin { - if x, ok := m.GetValue().(*AclContentValue_RequestJoin); ok { - return x.RequestJoin +func (x *AclContentValue) GetRequestJoin() *AclAccountRequestJoin { + if x != nil { + if x, ok := x.Value.(*AclContentValue_RequestJoin); ok { + return x.RequestJoin + } } return nil } -func (m *AclContentValue) GetRequestAccept() *AclAccountRequestAccept { - if x, ok := m.GetValue().(*AclContentValue_RequestAccept); ok { - return x.RequestAccept +func (x *AclContentValue) GetRequestAccept() *AclAccountRequestAccept { + if x != nil { + if x, ok := x.Value.(*AclContentValue_RequestAccept); ok { + return x.RequestAccept + } } return nil } -func (m *AclContentValue) GetPermissionChange() *AclAccountPermissionChange { - if x, ok := m.GetValue().(*AclContentValue_PermissionChange); ok { - return x.PermissionChange +func (x *AclContentValue) GetPermissionChange() *AclAccountPermissionChange { + if x != nil { + if x, ok := x.Value.(*AclContentValue_PermissionChange); ok { + return x.PermissionChange + } } return nil } -func (m *AclContentValue) GetAccountRemove() *AclAccountRemove { - if x, ok := m.GetValue().(*AclContentValue_AccountRemove); ok { - return x.AccountRemove +func (x *AclContentValue) GetAccountRemove() *AclAccountRemove { + if x != nil { + if x, ok := x.Value.(*AclContentValue_AccountRemove); ok { + return x.AccountRemove + } } return nil } -func (m *AclContentValue) GetReadKeyChange() *AclReadKeyChange { - if x, ok := m.GetValue().(*AclContentValue_ReadKeyChange); ok { - return x.ReadKeyChange +func (x *AclContentValue) GetReadKeyChange() *AclReadKeyChange { + if x != nil { + if x, ok := x.Value.(*AclContentValue_ReadKeyChange); ok { + return x.ReadKeyChange + } } return nil } -func (m *AclContentValue) GetRequestDecline() *AclAccountRequestDecline { - if x, ok := m.GetValue().(*AclContentValue_RequestDecline); ok { - return x.RequestDecline +func (x *AclContentValue) GetRequestDecline() *AclAccountRequestDecline { + if x != nil { + if x, ok := x.Value.(*AclContentValue_RequestDecline); ok { + return x.RequestDecline + } } return nil } -func (m *AclContentValue) GetAccountRequestRemove() *AclAccountRequestRemove { - if x, ok := m.GetValue().(*AclContentValue_AccountRequestRemove); ok { - return x.AccountRequestRemove +func (x *AclContentValue) GetAccountRequestRemove() *AclAccountRequestRemove { + if x != nil { + if x, ok := x.Value.(*AclContentValue_AccountRequestRemove); ok { + return x.AccountRequestRemove + } } return nil } -func (m *AclContentValue) GetPermissionChanges() *AclAccountPermissionChanges { - if x, ok := m.GetValue().(*AclContentValue_PermissionChanges); ok { - return x.PermissionChanges +func (x *AclContentValue) GetPermissionChanges() *AclAccountPermissionChanges { + if x != nil { + if x, ok := x.Value.(*AclContentValue_PermissionChanges); ok { + return x.PermissionChanges + } } return nil } -func (m *AclContentValue) GetAccountsAdd() *AclAccountsAdd { - if x, ok := m.GetValue().(*AclContentValue_AccountsAdd); ok { - return x.AccountsAdd +func (x *AclContentValue) GetAccountsAdd() *AclAccountsAdd { + if x != nil { + if x, ok := x.Value.(*AclContentValue_AccountsAdd); ok { + return x.AccountsAdd + } } return nil } -func (m *AclContentValue) GetRequestCancel() *AclAccountRequestCancel { - if x, ok := m.GetValue().(*AclContentValue_RequestCancel); ok { - return x.RequestCancel +func (x *AclContentValue) GetRequestCancel() *AclAccountRequestCancel { + if x != nil { + if x, ok := x.Value.(*AclContentValue_RequestCancel); ok { + return x.RequestCancel + } } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AclContentValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AclContentValue_Invite)(nil), - (*AclContentValue_InviteRevoke)(nil), - (*AclContentValue_RequestJoin)(nil), - (*AclContentValue_RequestAccept)(nil), - (*AclContentValue_PermissionChange)(nil), - (*AclContentValue_AccountRemove)(nil), - (*AclContentValue_ReadKeyChange)(nil), - (*AclContentValue_RequestDecline)(nil), - (*AclContentValue_AccountRequestRemove)(nil), - (*AclContentValue_PermissionChanges)(nil), - (*AclContentValue_AccountsAdd)(nil), - (*AclContentValue_RequestCancel)(nil), - } -} - -// AclData contains different acl content -type AclData struct { - AclContent []*AclContentValue `protobuf:"bytes,1,rep,name=aclContent,proto3" json:"aclContent,omitempty"` -} - -func (m *AclData) Reset() { *m = AclData{} } -func (m *AclData) String() string { return proto.CompactTextString(m) } -func (*AclData) ProtoMessage() {} -func (*AclData) Descriptor() ([]byte, []int) { - return fileDescriptor_c8e9f754f34e929b, []int{16} -} -func (m *AclData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclData) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclData) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclData.Merge(m, src) -} -func (m *AclData) XXX_Size() int { - return m.Size() -} -func (m *AclData) XXX_DiscardUnknown() { - xxx_messageInfo_AclData.DiscardUnknown(m) -} - -var xxx_messageInfo_AclData proto.InternalMessageInfo - -func (m *AclData) GetAclContent() []*AclContentValue { - if m != nil { - return m.AclContent - } - return nil -} - -func init() { - proto.RegisterEnum("aclrecord.AclUserPermissions", AclUserPermissions_name, AclUserPermissions_value) - proto.RegisterType((*AclRoot)(nil), "aclrecord.AclRoot") - proto.RegisterType((*AclAccountInvite)(nil), "aclrecord.AclAccountInvite") - proto.RegisterType((*AclAccountRequestJoin)(nil), "aclrecord.AclAccountRequestJoin") - proto.RegisterType((*AclAccountRequestAccept)(nil), "aclrecord.AclAccountRequestAccept") - proto.RegisterType((*AclAccountRequestDecline)(nil), "aclrecord.AclAccountRequestDecline") - proto.RegisterType((*AclAccountInviteRevoke)(nil), "aclrecord.AclAccountInviteRevoke") - proto.RegisterType((*AclEncryptedReadKey)(nil), "aclrecord.AclEncryptedReadKey") - proto.RegisterType((*AclAccountPermissionChanges)(nil), "aclrecord.AclAccountPermissionChanges") - proto.RegisterType((*AclAccountsAdd)(nil), "aclrecord.AclAccountsAdd") - proto.RegisterType((*AclAccountAdd)(nil), "aclrecord.AclAccountAdd") - proto.RegisterType((*AclAccountRequestCancel)(nil), "aclrecord.AclAccountRequestCancel") - proto.RegisterType((*AclAccountPermissionChange)(nil), "aclrecord.AclAccountPermissionChange") - proto.RegisterType((*AclReadKeyChange)(nil), "aclrecord.AclReadKeyChange") - proto.RegisterType((*AclAccountRemove)(nil), "aclrecord.AclAccountRemove") - proto.RegisterType((*AclAccountRequestRemove)(nil), "aclrecord.AclAccountRequestRemove") - proto.RegisterType((*AclContentValue)(nil), "aclrecord.AclContentValue") - proto.RegisterType((*AclData)(nil), "aclrecord.AclData") -} - -func init() { - proto.RegisterFile("commonspace/object/acl/aclrecordproto/protos/aclrecord.proto", fileDescriptor_c8e9f754f34e929b) -} - -var fileDescriptor_c8e9f754f34e929b = []byte{ - // 1020 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0xb7, 0x77, 0x93, 0x6c, 0xf6, 0x39, 0x49, 0xdd, 0x29, 0xb4, 0x6e, 0x0a, 0xab, 0x65, 0x50, - 0xab, 0x55, 0x85, 0x9a, 0x6a, 0x51, 0x2b, 0x54, 0x81, 0x52, 0x37, 0xa9, 0xba, 0x69, 0x55, 0xa8, - 0xa6, 0xa2, 0x45, 0x48, 0x20, 0x39, 0xe3, 0x51, 0x31, 0xf8, 0xcf, 0x32, 0x9e, 0x5d, 0xb4, 0xdf, - 0x82, 0x1b, 0x5f, 0x84, 0x2b, 0x77, 0x0e, 0x1c, 0x7a, 0xe4, 0x88, 0x92, 0x1b, 0x37, 0xbe, 0x01, - 0x9a, 0xb1, 0xd7, 0xf6, 0x78, 0xbd, 0x9b, 0xe4, 0xd0, 0x43, 0x12, 0xcf, 0xfb, 0x37, 0xef, 0xfd, - 0xde, 0x6f, 0xde, 0x4c, 0xe0, 0x73, 0x9a, 0x44, 0x51, 0x12, 0xa7, 0x63, 0x8f, 0xb2, 0xbd, 0xe4, - 0xf8, 0x47, 0x46, 0xc5, 0x9e, 0x47, 0x43, 0xf9, 0xc3, 0x19, 0x4d, 0xb8, 0x3f, 0xe6, 0x89, 0x48, - 0xf6, 0xd4, 0xef, 0xb4, 0x94, 0xde, 0x51, 0x02, 0xd4, 0x2d, 0x04, 0xf8, 0xbf, 0x16, 0x74, 0x5c, - 0x1a, 0x92, 0x24, 0x11, 0x68, 0x17, 0x36, 0x03, 0x9f, 0xc5, 0x22, 0x10, 0x33, 0xc7, 0xec, 0x9b, - 0x83, 0x2d, 0x52, 0xac, 0xd1, 0x07, 0xd0, 0x8d, 0xbc, 0x54, 0x30, 0xfe, 0x8c, 0xcd, 0x9c, 0x96, - 0x52, 0x96, 0x02, 0xe4, 0x40, 0x47, 0xa5, 0x72, 0xe4, 0x3b, 0xed, 0xbe, 0x39, 0xe8, 0x92, 0xf9, - 0x12, 0xdd, 0x06, 0x9b, 0xc5, 0x94, 0xcf, 0xc6, 0x82, 0xf9, 0x84, 0x79, 0xbe, 0x74, 0x5f, 0x53, - 0xee, 0x0b, 0x72, 0xb9, 0x87, 0x08, 0x22, 0x96, 0x0a, 0x2f, 0x1a, 0x3b, 0xeb, 0x7d, 0x73, 0xd0, - 0x26, 0xa5, 0x00, 0x7d, 0x02, 0x97, 0xe7, 0xd9, 0xbc, 0x0c, 0xde, 0xc4, 0x9e, 0x98, 0x70, 0xe6, - 0x6c, 0xa8, 0x50, 0x8b, 0x0a, 0x74, 0x0b, 0x76, 0x22, 0x26, 0x3c, 0xdf, 0x13, 0xde, 0x8b, 0xc9, - 0xb1, 0xdc, 0xb5, 0xa3, 0x4c, 0x6b, 0x52, 0xf4, 0x00, 0x9c, 0x22, 0x8f, 0xe7, 0x73, 0x15, 0x0f, - 0xa6, 0xd2, 0x63, 0x53, 0x79, 0x2c, 0xd5, 0xa3, 0xfb, 0x70, 0xb5, 0xd0, 0x7d, 0xf5, 0x4b, 0xcc, - 0xf8, 0xdc, 0xc0, 0xe9, 0x2a, 0xcf, 0x25, 0x5a, 0x7c, 0x17, 0x6c, 0x97, 0x86, 0x2e, 0xa5, 0xc9, - 0x24, 0x16, 0x47, 0xf1, 0x34, 0x10, 0x4c, 0xd6, 0x1e, 0xa8, 0x2f, 0xb9, 0x71, 0x06, 0x7e, 0x29, - 0xc0, 0x7f, 0x98, 0xf0, 0x7e, 0xe9, 0x42, 0xd8, 0xcf, 0x13, 0x96, 0x8a, 0xa7, 0x49, 0x10, 0xcb, - 0x3a, 0x33, 0xb3, 0x23, 0xbd, 0x73, 0x35, 0x69, 0x69, 0x47, 0x54, 0xdf, 0x8f, 0x7c, 0xd5, 0xc4, - 0x2e, 0xa9, 0x49, 0xd1, 0x67, 0x70, 0x4d, 0xf7, 0x2c, 0xb1, 0x6e, 0xab, 0xc0, 0xcb, 0xd4, 0x92, - 0x3d, 0x73, 0x6c, 0xf3, 0x0e, 0x17, 0x6b, 0xfc, 0x97, 0x09, 0xd7, 0x16, 0xf2, 0x77, 0x29, 0x65, - 0xe3, 0xd5, 0xac, 0x1b, 0xc0, 0x25, 0x9e, 0x19, 0xd7, 0xd2, 0xae, 0x8b, 0x1b, 0x79, 0xd6, 0x5e, - 0xc2, 0xb3, 0x7d, 0xb0, 0xc6, 0x8c, 0x47, 0x41, 0x9a, 0x06, 0x49, 0x9c, 0xaa, 0x64, 0x77, 0x86, - 0x1f, 0xde, 0x29, 0x4f, 0x89, 0x4b, 0xc3, 0xaf, 0x53, 0xc6, 0x5f, 0x94, 0x46, 0xa4, 0xea, 0x81, - 0x0f, 0xc1, 0x59, 0xa8, 0xe6, 0x90, 0xd1, 0x30, 0x88, 0x59, 0x53, 0xca, 0x66, 0x63, 0xca, 0xf8, - 0x21, 0x5c, 0xad, 0xd3, 0x80, 0xb0, 0x69, 0xf2, 0x13, 0x6b, 0x68, 0x96, 0xd9, 0xd4, 0x2c, 0xfc, - 0x1d, 0x5c, 0x71, 0x69, 0xf8, 0xb8, 0x5e, 0xdf, 0x2a, 0x44, 0x9b, 0x70, 0x6a, 0x35, 0xe3, 0x84, - 0xbf, 0x87, 0x1b, 0x65, 0x82, 0x25, 0x18, 0x07, 0x3f, 0x78, 0xf1, 0x1b, 0x96, 0xa2, 0x7d, 0xe8, - 0xd0, 0xec, 0xd3, 0x31, 0xfb, 0xed, 0x81, 0x35, 0xbc, 0xa9, 0x43, 0xb8, 0xc4, 0x91, 0xcc, 0xbd, - 0xf0, 0x08, 0x76, 0x4a, 0xb3, 0xd4, 0xf5, 0x7d, 0x74, 0x1f, 0xba, 0x9e, 0xef, 0x07, 0x42, 0xf5, - 0x25, 0x0b, 0xea, 0x34, 0x06, 0x75, 0x7d, 0x9f, 0x94, 0xa6, 0xf8, 0x77, 0x13, 0xb6, 0x35, 0xe5, - 0x4a, 0x0c, 0x6a, 0xfd, 0x6f, 0x5d, 0xb4, 0xff, 0x1a, 0xd5, 0xdb, 0x3a, 0xd5, 0x2f, 0x32, 0xf0, - 0xf0, 0xbd, 0x86, 0x53, 0x71, 0xe0, 0xc5, 0x94, 0x85, 0x72, 0x0b, 0xae, 0x37, 0xbf, 0x58, 0xe3, - 0x19, 0xec, 0x2e, 0x87, 0xf7, 0x9d, 0x56, 0x8e, 0xff, 0x35, 0xd5, 0xec, 0xca, 0x0b, 0xc8, 0x77, - 0x7c, 0x08, 0x96, 0x97, 0x25, 0xf3, 0x8c, 0xcd, 0xe6, 0x7d, 0xeb, 0xe9, 0x51, 0xeb, 0x24, 0x25, - 0x55, 0x97, 0x86, 0x69, 0xdd, 0xba, 0xf0, 0xb4, 0x6e, 0x9f, 0x31, 0xad, 0xef, 0xc2, 0x95, 0x72, - 0x1e, 0x87, 0xb5, 0xde, 0x34, 0xa9, 0xf0, 0xa4, 0x3a, 0xa7, 0x09, 0x8b, 0x92, 0x29, 0x43, 0x3d, - 0x80, 0x1c, 0xcd, 0x20, 0xe7, 0xfd, 0x16, 0xa9, 0x48, 0x90, 0x0b, 0xdb, 0xbc, 0x0a, 0x8e, 0x2a, - 0xc4, 0x1a, 0xde, 0xd0, 0xd1, 0xd0, 0xf0, 0x23, 0xba, 0x07, 0xbe, 0xde, 0xc0, 0x8a, 0x6c, 0x77, - 0xfc, 0x5b, 0x07, 0x2e, 0xb9, 0x34, 0x3c, 0x48, 0x62, 0xc1, 0x62, 0xf1, 0xca, 0x0b, 0x27, 0x0c, - 0xdd, 0x83, 0x8d, 0x6c, 0x2c, 0xa8, 0x6e, 0x2f, 0x6c, 0xa5, 0xcd, 0x97, 0x91, 0x41, 0x72, 0x63, - 0xf4, 0x04, 0xb6, 0x82, 0xca, 0xcc, 0xc9, 0xf3, 0xfc, 0x68, 0x85, 0x73, 0x66, 0x38, 0x32, 0x88, - 0xe6, 0x88, 0x0e, 0xc1, 0xe2, 0xe5, 0x85, 0xa4, 0xda, 0x60, 0x0d, 0xfb, 0x8d, 0x71, 0x2a, 0x17, - 0xd7, 0xc8, 0x20, 0x55, 0x37, 0xf4, 0x54, 0xe2, 0x56, 0xb9, 0x16, 0x54, 0x5f, 0xac, 0x21, 0x5e, - 0x15, 0x27, 0xb3, 0x1c, 0x19, 0x44, 0x77, 0x45, 0x2f, 0xc1, 0x1e, 0xd7, 0x4e, 0x85, 0x7a, 0x4e, - 0x9c, 0x77, 0x42, 0x8d, 0x0c, 0xb2, 0x10, 0x00, 0x1d, 0xc0, 0xb6, 0x57, 0x65, 0x82, 0x7a, 0x7a, - 0x2c, 0x43, 0x3b, 0x33, 0x91, 0x99, 0x69, 0x3e, 0x32, 0x88, 0xce, 0x8e, 0xce, 0x99, 0xec, 0xc8, - 0xca, 0xab, 0x1e, 0xb7, 0xe7, 0xb0, 0xc3, 0xb5, 0x3b, 0x47, 0x3d, 0x54, 0xac, 0xe1, 0xc7, 0xab, - 0xb0, 0xca, 0x4d, 0x47, 0x06, 0xa9, 0x39, 0xa3, 0x6f, 0xe0, 0x3d, 0xaf, 0x81, 0x6b, 0xea, 0x0d, - 0x73, 0x46, 0x03, 0x8a, 0x32, 0x1b, 0x23, 0xa0, 0x57, 0x70, 0xb9, 0x0e, 0x63, 0xea, 0x80, 0x0a, - 0x7b, 0xeb, 0x5c, 0x8d, 0x48, 0x47, 0x06, 0x59, 0x0c, 0x81, 0xbe, 0x28, 0xe6, 0x8d, 0xbc, 0x34, - 0x1c, 0x4b, 0x45, 0xbc, 0xde, 0x18, 0x51, 0x1a, 0x48, 0xaa, 0x55, 0xec, 0x2b, 0x54, 0xcb, 0x66, - 0xad, 0xb3, 0x75, 0x76, 0xa5, 0x99, 0x65, 0x85, 0x6a, 0x99, 0xe0, 0x51, 0x07, 0xd6, 0xa7, 0xf2, - 0x14, 0xe2, 0xc7, 0xea, 0x19, 0x7d, 0x28, 0x6f, 0x80, 0x07, 0x00, 0x5e, 0x71, 0x46, 0xf3, 0x69, - 0xb8, 0xab, 0x07, 0xaf, 0x1e, 0x60, 0x52, 0xb1, 0xbe, 0xfd, 0x1a, 0xd0, 0xe2, 0x08, 0x46, 0x9b, - 0xb0, 0xf6, 0x65, 0x12, 0x33, 0xdb, 0x40, 0x5d, 0x58, 0x57, 0x6f, 0x49, 0xdb, 0x94, 0x9f, 0xae, - 0x1f, 0x05, 0xb1, 0xdd, 0x42, 0x00, 0x1b, 0xaf, 0x79, 0x20, 0x18, 0xb7, 0xdb, 0xf2, 0x5b, 0xf2, - 0x87, 0x71, 0x7b, 0x4d, 0x9a, 0x3c, 0x91, 0xc9, 0xda, 0xeb, 0x8f, 0xf6, 0xff, 0x3c, 0xe9, 0x99, - 0x6f, 0x4f, 0x7a, 0xe6, 0x3f, 0x27, 0x3d, 0xf3, 0xd7, 0xd3, 0x9e, 0xf1, 0xf6, 0xb4, 0x67, 0xfc, - 0x7d, 0xda, 0x33, 0xbe, 0xbd, 0x79, 0xae, 0x7f, 0x25, 0x8e, 0x37, 0xd4, 0x9f, 0x4f, 0xff, 0x0f, - 0x00, 0x00, 0xff, 0xff, 0xb7, 0x65, 0xd3, 0x8c, 0x7a, 0x0c, 0x00, 0x00, -} - -func (m *AclRoot) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclRoot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclRoot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EncryptedOwnerMetadata) > 0 { - i -= len(m.EncryptedOwnerMetadata) - copy(dAtA[i:], m.EncryptedOwnerMetadata) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedOwnerMetadata))) - i-- - dAtA[i] = 0x4a - } - if len(m.EncryptedMetadataPrivKey) > 0 { - i -= len(m.EncryptedMetadataPrivKey) - copy(dAtA[i:], m.EncryptedMetadataPrivKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedMetadataPrivKey))) - i-- - dAtA[i] = 0x42 - } - if len(m.MetadataPubKey) > 0 { - i -= len(m.MetadataPubKey) - copy(dAtA[i:], m.MetadataPubKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.MetadataPubKey))) - i-- - dAtA[i] = 0x3a - } - if len(m.IdentitySignature) > 0 { - i -= len(m.IdentitySignature) - copy(dAtA[i:], m.IdentitySignature) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.IdentitySignature))) - i-- - dAtA[i] = 0x32 - } - if m.Timestamp != 0 { - i = encodeVarintAclrecord(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x28 - } - if len(m.EncryptedReadKey) > 0 { - i -= len(m.EncryptedReadKey) - copy(dAtA[i:], m.EncryptedReadKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x1a - } - if len(m.MasterKey) > 0 { - i -= len(m.MasterKey) - copy(dAtA[i:], m.MasterKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.MasterKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountInvite) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountInvite) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.InviteKey) > 0 { - i -= len(m.InviteKey) - copy(dAtA[i:], m.InviteKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountRequestJoin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountRequestJoin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountRequestJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(m.InviteIdentitySignature) > 0 { - i -= len(m.InviteIdentitySignature) - copy(dAtA[i:], m.InviteIdentitySignature) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteIdentitySignature))) - i-- - dAtA[i] = 0x1a - } - if len(m.InviteRecordId) > 0 { - i -= len(m.InviteRecordId) - copy(dAtA[i:], m.InviteRecordId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteRecordId))) - i-- - dAtA[i] = 0x12 - } - if len(m.InviteIdentity) > 0 { - i -= len(m.InviteIdentity) - copy(dAtA[i:], m.InviteIdentity) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteIdentity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountRequestAccept) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountRequestAccept) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountRequestAccept) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Permissions != 0 { - i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) - i-- - dAtA[i] = 0x20 - } - if len(m.EncryptedReadKey) > 0 { - i -= len(m.EncryptedReadKey) - copy(dAtA[i:], m.EncryptedReadKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.RequestRecordId) > 0 { - i -= len(m.RequestRecordId) - copy(dAtA[i:], m.RequestRecordId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.RequestRecordId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountRequestDecline) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountRequestDecline) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountRequestDecline) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestRecordId) > 0 { - i -= len(m.RequestRecordId) - copy(dAtA[i:], m.RequestRecordId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.RequestRecordId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountInviteRevoke) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountInviteRevoke) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountInviteRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.InviteRecordId) > 0 { - i -= len(m.InviteRecordId) - copy(dAtA[i:], m.InviteRecordId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteRecordId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclEncryptedReadKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclEncryptedReadKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclEncryptedReadKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EncryptedReadKey) > 0 { - i -= len(m.EncryptedReadKey) - copy(dAtA[i:], m.EncryptedReadKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountPermissionChanges) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountPermissionChanges) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountPermissionChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AclAccountsAdd) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountsAdd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountsAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Additions) > 0 { - for iNdEx := len(m.Additions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Additions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AclAccountAdd) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountAdd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EncryptedReadKey) > 0 { - i -= len(m.EncryptedReadKey) - copy(dAtA[i:], m.EncryptedReadKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x1a - } - if m.Permissions != 0 { - i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) - i-- - dAtA[i] = 0x10 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAccountRequestCancel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountRequestCancel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountRequestCancel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RecordId) > 0 { - i -= len(m.RecordId) - copy(dAtA[i:], m.RecordId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.RecordId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type isAclContentValue_Value interface { + isAclContentValue_Value() } -func (m *AclAccountPermissionChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountPermissionChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Permissions != 0 { - i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) - i-- - dAtA[i] = 0x10 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclReadKeyChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclReadKeyChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclReadKeyChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EncryptedOldReadKey) > 0 { - i -= len(m.EncryptedOldReadKey) - copy(dAtA[i:], m.EncryptedOldReadKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedOldReadKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.EncryptedMetadataPrivKey) > 0 { - i -= len(m.EncryptedMetadataPrivKey) - copy(dAtA[i:], m.EncryptedMetadataPrivKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedMetadataPrivKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.MetadataPubKey) > 0 { - i -= len(m.MetadataPubKey) - copy(dAtA[i:], m.MetadataPubKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.MetadataPubKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.AccountKeys) > 0 { - for iNdEx := len(m.AccountKeys) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AccountKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AclAccountRemove) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountRemove) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ReadKeyChange != nil { - { - size, err := m.ReadKeyChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Identities) > 0 { - for iNdEx := len(m.Identities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Identities[iNdEx]) - copy(dAtA[i:], m.Identities[iNdEx]) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identities[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AclAccountRequestRemove) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAccountRequestRemove) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAccountRequestRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AclContentValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclContentValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *AclContentValue_Invite) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_Invite) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Invite != nil { - { - size, err := m.Invite.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_InviteRevoke) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_InviteRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InviteRevoke != nil { - { - size, err := m.InviteRevoke.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_RequestJoin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_RequestJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestJoin != nil { - { - size, err := m.RequestJoin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_RequestAccept) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_RequestAccept) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestAccept != nil { - { - size, err := m.RequestAccept.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_PermissionChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_PermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PermissionChange != nil { - { - size, err := m.PermissionChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_AccountRemove) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_AccountRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.AccountRemove != nil { - { - size, err := m.AccountRemove.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_ReadKeyChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_ReadKeyChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ReadKeyChange != nil { - { - size, err := m.ReadKeyChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_RequestDecline) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_RequestDecline) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestDecline != nil { - { - size, err := m.RequestDecline.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_AccountRequestRemove) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_AccountRequestRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.AccountRequestRemove != nil { - { - size, err := m.AccountRequestRemove.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_PermissionChanges) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_PermissionChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PermissionChanges != nil { - { - size, err := m.PermissionChanges.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_AccountsAdd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_AccountsAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.AccountsAdd != nil { - { - size, err := m.AccountsAdd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *AclContentValue_RequestCancel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclContentValue_RequestCancel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestCancel != nil { - { - size, err := m.RequestCancel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - return len(dAtA) - i, nil -} -func (m *AclData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AclContent) > 0 { - for iNdEx := len(m.AclContent) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AclContent[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAclrecord(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +type AclContentValue_Invite struct { + Invite *AclAccountInvite `protobuf:"bytes,1,opt,name=invite,proto3,oneof"` } -func encodeVarintAclrecord(dAtA []byte, offset int, v uint64) int { - offset -= sovAclrecord(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AclRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.MasterKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedReadKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovAclrecord(uint64(m.Timestamp)) - } - l = len(m.IdentitySignature) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.MetadataPubKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedMetadataPrivKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedOwnerMetadata) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_InviteRevoke struct { + InviteRevoke *AclAccountInviteRevoke `protobuf:"bytes,2,opt,name=inviteRevoke,proto3,oneof"` } -func (m *AclAccountInvite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InviteKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_RequestJoin struct { + RequestJoin *AclAccountRequestJoin `protobuf:"bytes,3,opt,name=requestJoin,proto3,oneof"` } -func (m *AclAccountRequestJoin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InviteIdentity) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.InviteRecordId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.InviteIdentitySignature) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_RequestAccept struct { + RequestAccept *AclAccountRequestAccept `protobuf:"bytes,4,opt,name=requestAccept,proto3,oneof"` } -func (m *AclAccountRequestAccept) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.RequestRecordId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedReadKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - if m.Permissions != 0 { - n += 1 + sovAclrecord(uint64(m.Permissions)) - } - return n +type AclContentValue_PermissionChange struct { + // AclAccountPermissionChange deprecated + PermissionChange *AclAccountPermissionChange `protobuf:"bytes,5,opt,name=permissionChange,proto3,oneof"` } -func (m *AclAccountRequestDecline) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RequestRecordId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_AccountRemove struct { + AccountRemove *AclAccountRemove `protobuf:"bytes,6,opt,name=accountRemove,proto3,oneof"` } -func (m *AclAccountInviteRevoke) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InviteRecordId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_ReadKeyChange struct { + ReadKeyChange *AclReadKeyChange `protobuf:"bytes,7,opt,name=readKeyChange,proto3,oneof"` } -func (m *AclEncryptedReadKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedReadKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_RequestDecline struct { + RequestDecline *AclAccountRequestDecline `protobuf:"bytes,8,opt,name=requestDecline,proto3,oneof"` } -func (m *AclAccountPermissionChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - } - return n +type AclContentValue_AccountRequestRemove struct { + AccountRequestRemove *AclAccountRequestRemove `protobuf:"bytes,9,opt,name=accountRequestRemove,proto3,oneof"` } -func (m *AclAccountsAdd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Additions) > 0 { - for _, e := range m.Additions { - l = e.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - } - return n +type AclContentValue_PermissionChanges struct { + PermissionChanges *AclAccountPermissionChanges `protobuf:"bytes,10,opt,name=permissionChanges,proto3,oneof"` } -func (m *AclAccountAdd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - if m.Permissions != 0 { - n += 1 + sovAclrecord(uint64(m.Permissions)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedReadKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_AccountsAdd struct { + AccountsAdd *AclAccountsAdd `protobuf:"bytes,11,opt,name=accountsAdd,proto3,oneof"` } -func (m *AclAccountRequestCancel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RecordId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n +type AclContentValue_RequestCancel struct { + RequestCancel *AclAccountRequestCancel `protobuf:"bytes,12,opt,name=requestCancel,proto3,oneof"` } -func (m *AclAccountPermissionChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - if m.Permissions != 0 { - n += 1 + sovAclrecord(uint64(m.Permissions)) - } - return n -} +func (*AclContentValue_Invite) isAclContentValue_Value() {} -func (m *AclReadKeyChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AccountKeys) > 0 { - for _, e := range m.AccountKeys { - l = e.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - } - l = len(m.MetadataPubKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedMetadataPrivKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - l = len(m.EncryptedOldReadKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} +func (*AclContentValue_InviteRevoke) isAclContentValue_Value() {} -func (m *AclAccountRemove) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Identities) > 0 { - for _, b := range m.Identities { - l = len(b) - n += 1 + l + sovAclrecord(uint64(l)) - } - } - if m.ReadKeyChange != nil { - l = m.ReadKeyChange.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} +func (*AclContentValue_RequestJoin) isAclContentValue_Value() {} -func (m *AclAccountRequestRemove) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} +func (*AclContentValue_RequestAccept) isAclContentValue_Value() {} -func (m *AclContentValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} +func (*AclContentValue_PermissionChange) isAclContentValue_Value() {} -func (m *AclContentValue_Invite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Invite != nil { - l = m.Invite.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_InviteRevoke) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InviteRevoke != nil { - l = m.InviteRevoke.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_RequestJoin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestJoin != nil { - l = m.RequestJoin.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_RequestAccept) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestAccept != nil { - l = m.RequestAccept.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_PermissionChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PermissionChange != nil { - l = m.PermissionChange.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_AccountRemove) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccountRemove != nil { - l = m.AccountRemove.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_ReadKeyChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ReadKeyChange != nil { - l = m.ReadKeyChange.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_RequestDecline) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestDecline != nil { - l = m.RequestDecline.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_AccountRequestRemove) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccountRequestRemove != nil { - l = m.AccountRequestRemove.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_PermissionChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PermissionChanges != nil { - l = m.PermissionChanges.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_AccountsAdd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccountsAdd != nil { - l = m.AccountsAdd.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclContentValue_RequestCancel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestCancel != nil { - l = m.RequestCancel.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - return n -} -func (m *AclData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AclContent) > 0 { - for _, e := range m.AclContent { - l = e.Size() - n += 1 + l + sovAclrecord(uint64(l)) - } - } - return n -} - -func sovAclrecord(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAclrecord(x uint64) (n int) { - return sovAclrecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AclRoot) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclRoot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclRoot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MasterKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MasterKey = append(m.MasterKey[:0], dAtA[iNdEx:postIndex]...) - if m.MasterKey == nil { - m.MasterKey = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedReadKey == nil { - m.EncryptedReadKey = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentitySignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdentitySignature = append(m.IdentitySignature[:0], dAtA[iNdEx:postIndex]...) - if m.IdentitySignature == nil { - m.IdentitySignature = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetadataPubKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MetadataPubKey = append(m.MetadataPubKey[:0], dAtA[iNdEx:postIndex]...) - if m.MetadataPubKey == nil { - m.MetadataPubKey = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedMetadataPrivKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedMetadataPrivKey = append(m.EncryptedMetadataPrivKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedMetadataPrivKey == nil { - m.EncryptedMetadataPrivKey = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedOwnerMetadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedOwnerMetadata = append(m.EncryptedOwnerMetadata[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedOwnerMetadata == nil { - m.EncryptedOwnerMetadata = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_AccountRemove) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountInvite) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountInvite: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountInvite: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InviteKey = append(m.InviteKey[:0], dAtA[iNdEx:postIndex]...) - if m.InviteKey == nil { - m.InviteKey = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_ReadKeyChange) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountRequestJoin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountRequestJoin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountRequestJoin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InviteIdentity = append(m.InviteIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.InviteIdentity == nil { - m.InviteIdentity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteRecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InviteRecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteIdentitySignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InviteIdentitySignature = append(m.InviteIdentitySignature[:0], dAtA[iNdEx:postIndex]...) - if m.InviteIdentitySignature == nil { - m.InviteIdentitySignature = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_RequestDecline) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountRequestAccept) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountRequestAccept: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountRequestAccept: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestRecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestRecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedReadKey == nil { - m.EncryptedReadKey = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - m.Permissions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Permissions |= AclUserPermissions(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_AccountRequestRemove) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountRequestDecline) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountRequestDecline: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountRequestDecline: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestRecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestRecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_PermissionChanges) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountInviteRevoke) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountInviteRevoke: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountInviteRevoke: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteRecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InviteRecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_AccountsAdd) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclEncryptedReadKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclEncryptedReadKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclEncryptedReadKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedReadKey == nil { - m.EncryptedReadKey = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclContentValue_RequestCancel) isAclContentValue_Value() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +// AclData contains different acl content +type AclData struct { + state protoimpl.MessageState `protogen:"open.v1"` + AclContent []*AclContentValue `protobuf:"bytes,1,rep,name=aclContent,proto3" json:"aclContent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAccountPermissionChanges) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountPermissionChanges: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountPermissionChanges: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &AclAccountPermissionChange{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func (x *AclData) Reset() { + *x = AclData{} + mi := &file_aclrecord_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAccountsAdd) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountsAdd: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountsAdd: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Additions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Additions = append(m.Additions, &AclAccountAdd{}) - if err := m.Additions[len(m.Additions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func (x *AclData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAccountAdd) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountAdd: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountAdd: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - m.Permissions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Permissions |= AclUserPermissions(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedReadKey == nil { - m.EncryptedReadKey = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountRequestCancel) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountRequestCancel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountRequestCancel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*AclData) ProtoMessage() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAccountPermissionChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountPermissionChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountPermissionChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - m.Permissions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Permissions |= AclUserPermissions(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy +func (x *AclData) ProtoReflect() protoreflect.Message { + mi := &file_aclrecord_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil + return mi.MessageOf(x) } -func (m *AclReadKeyChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclReadKeyChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclReadKeyChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountKeys = append(m.AccountKeys, &AclEncryptedReadKey{}) - if err := m.AccountKeys[len(m.AccountKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetadataPubKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MetadataPubKey = append(m.MetadataPubKey[:0], dAtA[iNdEx:postIndex]...) - if m.MetadataPubKey == nil { - m.MetadataPubKey = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedMetadataPrivKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedMetadataPrivKey = append(m.EncryptedMetadataPrivKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedMetadataPrivKey == nil { - m.EncryptedMetadataPrivKey = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedOldReadKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedOldReadKey = append(m.EncryptedOldReadKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedOldReadKey == nil { - m.EncryptedOldReadKey = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +// Deprecated: Use AclData.ProtoReflect.Descriptor instead. +func (*AclData) Descriptor() ([]byte, []int) { + return file_aclrecord_proto_rawDescGZIP(), []int{16} } -func (m *AclAccountRemove) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountRemove: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountRemove: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identities", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identities = append(m.Identities, make([]byte, postIndex-iNdEx)) - copy(m.Identities[len(m.Identities)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReadKeyChange == nil { - m.ReadKeyChange = &AclReadKeyChange{} - } - if err := m.ReadKeyChange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *AclData) GetAclContent() []*AclContentValue { + if x != nil { + return x.AclContent } return nil } -func (m *AclAccountRequestRemove) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAccountRequestRemove: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAccountRequestRemove: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclContentValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclContentValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclContentValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Invite", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountInvite{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_Invite{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteRevoke", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountInviteRevoke{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_InviteRevoke{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestJoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountRequestJoin{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_RequestJoin{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestAccept", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountRequestAccept{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_RequestAccept{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PermissionChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountPermissionChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_PermissionChange{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountRemove", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountRemove{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_AccountRemove{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclReadKeyChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_ReadKeyChange{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestDecline", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountRequestDecline{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_RequestDecline{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountRequestRemove", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountRequestRemove{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_AccountRequestRemove{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PermissionChanges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountPermissionChanges{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_PermissionChanges{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountsAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountsAdd{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_AccountsAdd{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestCancel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AclAccountRequestCancel{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AclContentValue_RequestCancel{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +var File_aclrecord_proto protoreflect.FileDescriptor + +var file_aclrecord_proto_rawDesc = string([]byte{ + 0x0a, 0x0f, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x09, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0xf1, 0x02, 0x0a, + 0x07, 0x41, 0x63, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x18, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x18, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x30, 0x0a, 0x10, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x22, 0xbd, 0x01, 0x0a, 0x15, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, + 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, + 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x69, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x22, 0xcc, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, + 0x12, 0x3f, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x44, 0x0a, 0x18, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x28, 0x0a, + 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x41, 0x63, 0x6c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x13, 0x41, 0x63, 0x6c, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x10, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x5e, 0x0a, 0x1b, 0x41, 0x63, 0x6c, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x48, 0x0a, 0x0e, 0x41, 0x63, 0x6c, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x41, 0x64, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x09, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x3f, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, + 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x35, 0x0a, 0x17, 0x41, 0x63, 0x6c, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, + 0x22, 0x79, 0x0a, 0x1a, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x55, + 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x10, + 0x41, 0x63, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x61, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, + 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x18, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, + 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x4f, 0x6c, 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4f, 0x6c, + 0x64, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x75, 0x0a, 0x10, 0x41, 0x63, 0x6c, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, + 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, + 0x41, 0x63, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, + 0x19, 0x0a, 0x17, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x97, 0x07, 0x0a, 0x0f, 0x41, + 0x63, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x35, + 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x06, 0x69, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, + 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x48, 0x00, + 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x44, + 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, + 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, + 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x48, + 0x00, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, + 0x12, 0x53, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x63, 0x6c, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, + 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x72, 0x65, + 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, + 0x6c, 0x52, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, + 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x4d, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x0e, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x58, + 0x0a, 0x14, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, + 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x48, 0x00, 0x52, 0x14, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, + 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x48, 0x00, 0x52, 0x11, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x12, 0x3d, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x41, 0x64, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x41, 0x64, 0x64, + 0x48, 0x00, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x41, 0x64, 0x64, 0x12, + 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x2e, 0x41, 0x63, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x07, 0x41, 0x63, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x3a, 0x0a, 0x0a, 0x61, 0x63, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, + 0x41, 0x63, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0a, 0x61, 0x63, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x57, 0x0a, 0x12, 0x41, + 0x63, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a, 0x0a, + 0x06, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x75, 0x65, + 0x73, 0x74, 0x10, 0x05, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x61, + 0x63, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclContent = append(m.AclContent, &AclContentValue{}) - if err := m.AclContent[len(m.AclContent)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAclrecord(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAclrecord - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +var ( + file_aclrecord_proto_rawDescOnce sync.Once + file_aclrecord_proto_rawDescData []byte +) - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAclrecord(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAclrecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAclrecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAclrecord - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAclrecord - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAclrecord - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAclrecord - } - if depth == 0 { - return iNdEx, nil - } +func file_aclrecord_proto_rawDescGZIP() []byte { + file_aclrecord_proto_rawDescOnce.Do(func() { + file_aclrecord_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_aclrecord_proto_rawDesc), len(file_aclrecord_proto_rawDesc))) + }) + return file_aclrecord_proto_rawDescData +} + +var file_aclrecord_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_aclrecord_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_aclrecord_proto_goTypes = []any{ + (AclUserPermissions)(0), // 0: aclrecord.AclUserPermissions + (*AclRoot)(nil), // 1: aclrecord.AclRoot + (*AclAccountInvite)(nil), // 2: aclrecord.AclAccountInvite + (*AclAccountRequestJoin)(nil), // 3: aclrecord.AclAccountRequestJoin + (*AclAccountRequestAccept)(nil), // 4: aclrecord.AclAccountRequestAccept + (*AclAccountRequestDecline)(nil), // 5: aclrecord.AclAccountRequestDecline + (*AclAccountInviteRevoke)(nil), // 6: aclrecord.AclAccountInviteRevoke + (*AclEncryptedReadKey)(nil), // 7: aclrecord.AclEncryptedReadKey + (*AclAccountPermissionChanges)(nil), // 8: aclrecord.AclAccountPermissionChanges + (*AclAccountsAdd)(nil), // 9: aclrecord.AclAccountsAdd + (*AclAccountAdd)(nil), // 10: aclrecord.AclAccountAdd + (*AclAccountRequestCancel)(nil), // 11: aclrecord.AclAccountRequestCancel + (*AclAccountPermissionChange)(nil), // 12: aclrecord.AclAccountPermissionChange + (*AclReadKeyChange)(nil), // 13: aclrecord.AclReadKeyChange + (*AclAccountRemove)(nil), // 14: aclrecord.AclAccountRemove + (*AclAccountRequestRemove)(nil), // 15: aclrecord.AclAccountRequestRemove + (*AclContentValue)(nil), // 16: aclrecord.AclContentValue + (*AclData)(nil), // 17: aclrecord.AclData +} +var file_aclrecord_proto_depIdxs = []int32{ + 0, // 0: aclrecord.AclAccountRequestAccept.permissions:type_name -> aclrecord.AclUserPermissions + 12, // 1: aclrecord.AclAccountPermissionChanges.changes:type_name -> aclrecord.AclAccountPermissionChange + 10, // 2: aclrecord.AclAccountsAdd.additions:type_name -> aclrecord.AclAccountAdd + 0, // 3: aclrecord.AclAccountAdd.permissions:type_name -> aclrecord.AclUserPermissions + 0, // 4: aclrecord.AclAccountPermissionChange.permissions:type_name -> aclrecord.AclUserPermissions + 7, // 5: aclrecord.AclReadKeyChange.accountKeys:type_name -> aclrecord.AclEncryptedReadKey + 13, // 6: aclrecord.AclAccountRemove.readKeyChange:type_name -> aclrecord.AclReadKeyChange + 2, // 7: aclrecord.AclContentValue.invite:type_name -> aclrecord.AclAccountInvite + 6, // 8: aclrecord.AclContentValue.inviteRevoke:type_name -> aclrecord.AclAccountInviteRevoke + 3, // 9: aclrecord.AclContentValue.requestJoin:type_name -> aclrecord.AclAccountRequestJoin + 4, // 10: aclrecord.AclContentValue.requestAccept:type_name -> aclrecord.AclAccountRequestAccept + 12, // 11: aclrecord.AclContentValue.permissionChange:type_name -> aclrecord.AclAccountPermissionChange + 14, // 12: aclrecord.AclContentValue.accountRemove:type_name -> aclrecord.AclAccountRemove + 13, // 13: aclrecord.AclContentValue.readKeyChange:type_name -> aclrecord.AclReadKeyChange + 5, // 14: aclrecord.AclContentValue.requestDecline:type_name -> aclrecord.AclAccountRequestDecline + 15, // 15: aclrecord.AclContentValue.accountRequestRemove:type_name -> aclrecord.AclAccountRequestRemove + 8, // 16: aclrecord.AclContentValue.permissionChanges:type_name -> aclrecord.AclAccountPermissionChanges + 9, // 17: aclrecord.AclContentValue.accountsAdd:type_name -> aclrecord.AclAccountsAdd + 11, // 18: aclrecord.AclContentValue.requestCancel:type_name -> aclrecord.AclAccountRequestCancel + 16, // 19: aclrecord.AclData.aclContent:type_name -> aclrecord.AclContentValue + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_aclrecord_proto_init() } +func file_aclrecord_proto_init() { + if File_aclrecord_proto != nil { + return + } + file_aclrecord_proto_msgTypes[15].OneofWrappers = []any{ + (*AclContentValue_Invite)(nil), + (*AclContentValue_InviteRevoke)(nil), + (*AclContentValue_RequestJoin)(nil), + (*AclContentValue_RequestAccept)(nil), + (*AclContentValue_PermissionChange)(nil), + (*AclContentValue_AccountRemove)(nil), + (*AclContentValue_ReadKeyChange)(nil), + (*AclContentValue_RequestDecline)(nil), + (*AclContentValue_AccountRequestRemove)(nil), + (*AclContentValue_PermissionChanges)(nil), + (*AclContentValue_AccountsAdd)(nil), + (*AclContentValue_RequestCancel)(nil), } - return 0, io.ErrUnexpectedEOF + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_aclrecord_proto_rawDesc), len(file_aclrecord_proto_rawDesc)), + NumEnums: 1, + NumMessages: 17, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_aclrecord_proto_goTypes, + DependencyIndexes: file_aclrecord_proto_depIdxs, + EnumInfos: file_aclrecord_proto_enumTypes, + MessageInfos: file_aclrecord_proto_msgTypes, + }.Build() + File_aclrecord_proto = out.File + file_aclrecord_proto_goTypes = nil + file_aclrecord_proto_depIdxs = nil } - -var ( - ErrInvalidLengthAclrecord = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAclrecord = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAclrecord = fmt.Errorf("proto: unexpected end of group") -) diff --git a/commonspace/object/acl/aclrecordproto/aclrecord_vtproto.pb.go b/commonspace/object/acl/aclrecordproto/aclrecord_vtproto.pb.go new file mode 100644 index 000000000..375ea8de8 --- /dev/null +++ b/commonspace/object/acl/aclrecordproto/aclrecord_vtproto.pb.go @@ -0,0 +1,4227 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: aclrecord.proto + +package aclrecordproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *AclRoot) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclRoot) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclRoot) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.EncryptedOwnerMetadata) > 0 { + i -= len(m.EncryptedOwnerMetadata) + copy(dAtA[i:], m.EncryptedOwnerMetadata) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedOwnerMetadata))) + i-- + dAtA[i] = 0x4a + } + if len(m.EncryptedMetadataPrivKey) > 0 { + i -= len(m.EncryptedMetadataPrivKey) + copy(dAtA[i:], m.EncryptedMetadataPrivKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedMetadataPrivKey))) + i-- + dAtA[i] = 0x42 + } + if len(m.MetadataPubKey) > 0 { + i -= len(m.MetadataPubKey) + copy(dAtA[i:], m.MetadataPubKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MetadataPubKey))) + i-- + dAtA[i] = 0x3a + } + if len(m.IdentitySignature) > 0 { + i -= len(m.IdentitySignature) + copy(dAtA[i:], m.IdentitySignature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.IdentitySignature))) + i-- + dAtA[i] = 0x32 + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.EncryptedReadKey) > 0 { + i -= len(m.EncryptedReadKey) + copy(dAtA[i:], m.EncryptedReadKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedReadKey))) + i-- + dAtA[i] = 0x22 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x1a + } + if len(m.MasterKey) > 0 { + i -= len(m.MasterKey) + copy(dAtA[i:], m.MasterKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MasterKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountInvite) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountInvite) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountInvite) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.InviteKey) > 0 { + i -= len(m.InviteKey) + copy(dAtA[i:], m.InviteKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InviteKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountRequestJoin) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountRequestJoin) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountRequestJoin) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 + } + if len(m.InviteIdentitySignature) > 0 { + i -= len(m.InviteIdentitySignature) + copy(dAtA[i:], m.InviteIdentitySignature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InviteIdentitySignature))) + i-- + dAtA[i] = 0x1a + } + if len(m.InviteRecordId) > 0 { + i -= len(m.InviteRecordId) + copy(dAtA[i:], m.InviteRecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InviteRecordId))) + i-- + dAtA[i] = 0x12 + } + if len(m.InviteIdentity) > 0 { + i -= len(m.InviteIdentity) + copy(dAtA[i:], m.InviteIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InviteIdentity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountRequestAccept) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountRequestAccept) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountRequestAccept) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Permissions != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissions)) + i-- + dAtA[i] = 0x20 + } + if len(m.EncryptedReadKey) > 0 { + i -= len(m.EncryptedReadKey) + copy(dAtA[i:], m.EncryptedReadKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedReadKey))) + i-- + dAtA[i] = 0x1a + } + if len(m.RequestRecordId) > 0 { + i -= len(m.RequestRecordId) + copy(dAtA[i:], m.RequestRecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestRecordId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountRequestDecline) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountRequestDecline) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountRequestDecline) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.RequestRecordId) > 0 { + i -= len(m.RequestRecordId) + copy(dAtA[i:], m.RequestRecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestRecordId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountInviteRevoke) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountInviteRevoke) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountInviteRevoke) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.InviteRecordId) > 0 { + i -= len(m.InviteRecordId) + copy(dAtA[i:], m.InviteRecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InviteRecordId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclEncryptedReadKey) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclEncryptedReadKey) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclEncryptedReadKey) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.EncryptedReadKey) > 0 { + i -= len(m.EncryptedReadKey) + copy(dAtA[i:], m.EncryptedReadKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedReadKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountPermissionChanges) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountPermissionChanges) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountPermissionChanges) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Changes) > 0 { + for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Changes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclAccountsAdd) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountsAdd) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountsAdd) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Additions) > 0 { + for iNdEx := len(m.Additions) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Additions[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclAccountAdd) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountAdd) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountAdd) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.EncryptedReadKey) > 0 { + i -= len(m.EncryptedReadKey) + copy(dAtA[i:], m.EncryptedReadKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedReadKey))) + i-- + dAtA[i] = 0x22 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if m.Permissions != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissions)) + i-- + dAtA[i] = 0x10 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountRequestCancel) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountRequestCancel) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountRequestCancel) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.RecordId) > 0 { + i -= len(m.RecordId) + copy(dAtA[i:], m.RecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RecordId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAccountPermissionChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountPermissionChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountPermissionChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Permissions != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissions)) + i-- + dAtA[i] = 0x10 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclReadKeyChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclReadKeyChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclReadKeyChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.EncryptedOldReadKey) > 0 { + i -= len(m.EncryptedOldReadKey) + copy(dAtA[i:], m.EncryptedOldReadKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedOldReadKey))) + i-- + dAtA[i] = 0x22 + } + if len(m.EncryptedMetadataPrivKey) > 0 { + i -= len(m.EncryptedMetadataPrivKey) + copy(dAtA[i:], m.EncryptedMetadataPrivKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EncryptedMetadataPrivKey))) + i-- + dAtA[i] = 0x1a + } + if len(m.MetadataPubKey) > 0 { + i -= len(m.MetadataPubKey) + copy(dAtA[i:], m.MetadataPubKey) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MetadataPubKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.AccountKeys) > 0 { + for iNdEx := len(m.AccountKeys) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.AccountKeys[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclAccountRemove) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountRemove) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountRemove) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ReadKeyChange != nil { + size, err := m.ReadKeyChange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Identities) > 0 { + for iNdEx := len(m.Identities) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Identities[iNdEx]) + copy(dAtA[i:], m.Identities[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identities[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclAccountRequestRemove) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAccountRequestRemove) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAccountRequestRemove) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *AclContentValue) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclContentValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Value.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *AclContentValue_Invite) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_Invite) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Invite != nil { + size, err := m.Invite.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_InviteRevoke) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_InviteRevoke) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InviteRevoke != nil { + size, err := m.InviteRevoke.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_RequestJoin) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_RequestJoin) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.RequestJoin != nil { + size, err := m.RequestJoin.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_RequestAccept) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_RequestAccept) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.RequestAccept != nil { + size, err := m.RequestAccept.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_PermissionChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_PermissionChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PermissionChange != nil { + size, err := m.PermissionChange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_AccountRemove) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_AccountRemove) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AccountRemove != nil { + size, err := m.AccountRemove.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_ReadKeyChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_ReadKeyChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ReadKeyChange != nil { + size, err := m.ReadKeyChange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_RequestDecline) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_RequestDecline) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.RequestDecline != nil { + size, err := m.RequestDecline.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_AccountRequestRemove) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_AccountRequestRemove) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AccountRequestRemove != nil { + size, err := m.AccountRequestRemove.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_PermissionChanges) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_PermissionChanges) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PermissionChanges != nil { + size, err := m.PermissionChanges.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_AccountsAdd) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_AccountsAdd) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AccountsAdd != nil { + size, err := m.AccountsAdd.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *AclContentValue_RequestCancel) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclContentValue_RequestCancel) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.RequestCancel != nil { + size, err := m.RequestCancel.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x62 + } + return len(dAtA) - i, nil +} +func (m *AclData) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclData) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclData) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AclContent) > 0 { + for iNdEx := len(m.AclContent) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.AclContent[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclRoot) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MasterKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedReadKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.IdentitySignature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MetadataPubKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedMetadataPrivKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedOwnerMetadata) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountInvite) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InviteKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountRequestJoin) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InviteIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.InviteRecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.InviteIdentitySignature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountRequestAccept) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.RequestRecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedReadKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Permissions != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissions)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountRequestDecline) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RequestRecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountInviteRevoke) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InviteRecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclEncryptedReadKey) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedReadKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountPermissionChanges) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Changes) > 0 { + for _, e := range m.Changes { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountsAdd) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Additions) > 0 { + for _, e := range m.Additions { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountAdd) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Permissions != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissions)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedReadKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountRequestCancel) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountPermissionChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Permissions != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissions)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclReadKeyChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AccountKeys) > 0 { + for _, e := range m.AccountKeys { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.MetadataPubKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedMetadataPrivKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EncryptedOldReadKey) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountRemove) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Identities) > 0 { + for _, b := range m.Identities { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.ReadKeyChange != nil { + l = m.ReadKeyChange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAccountRequestRemove) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *AclContentValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *AclContentValue_Invite) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Invite != nil { + l = m.Invite.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_InviteRevoke) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InviteRevoke != nil { + l = m.InviteRevoke.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_RequestJoin) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestJoin != nil { + l = m.RequestJoin.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_RequestAccept) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestAccept != nil { + l = m.RequestAccept.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_PermissionChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PermissionChange != nil { + l = m.PermissionChange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_AccountRemove) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccountRemove != nil { + l = m.AccountRemove.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_ReadKeyChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReadKeyChange != nil { + l = m.ReadKeyChange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_RequestDecline) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestDecline != nil { + l = m.RequestDecline.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_AccountRequestRemove) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccountRequestRemove != nil { + l = m.AccountRequestRemove.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_PermissionChanges) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PermissionChanges != nil { + l = m.PermissionChanges.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_AccountsAdd) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccountsAdd != nil { + l = m.AccountsAdd.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclContentValue_RequestCancel) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestCancel != nil { + l = m.RequestCancel.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *AclData) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AclContent) > 0 { + for _, e := range m.AclContent { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *AclRoot) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclRoot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclRoot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MasterKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MasterKey = append(m.MasterKey[:0], dAtA[iNdEx:postIndex]...) + if m.MasterKey == nil { + m.MasterKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedReadKey == nil { + m.EncryptedReadKey = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentitySignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdentitySignature = append(m.IdentitySignature[:0], dAtA[iNdEx:postIndex]...) + if m.IdentitySignature == nil { + m.IdentitySignature = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetadataPubKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetadataPubKey = append(m.MetadataPubKey[:0], dAtA[iNdEx:postIndex]...) + if m.MetadataPubKey == nil { + m.MetadataPubKey = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedMetadataPrivKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedMetadataPrivKey = append(m.EncryptedMetadataPrivKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedMetadataPrivKey == nil { + m.EncryptedMetadataPrivKey = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedOwnerMetadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedOwnerMetadata = append(m.EncryptedOwnerMetadata[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedOwnerMetadata == nil { + m.EncryptedOwnerMetadata = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountInvite) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountInvite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountInvite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InviteKey = append(m.InviteKey[:0], dAtA[iNdEx:postIndex]...) + if m.InviteKey == nil { + m.InviteKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountRequestJoin) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountRequestJoin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountRequestJoin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InviteIdentity = append(m.InviteIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.InviteIdentity == nil { + m.InviteIdentity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteRecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InviteRecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteIdentitySignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InviteIdentitySignature = append(m.InviteIdentitySignature[:0], dAtA[iNdEx:postIndex]...) + if m.InviteIdentitySignature == nil { + m.InviteIdentitySignature = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountRequestAccept) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountRequestAccept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountRequestAccept: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestRecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestRecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedReadKey == nil { + m.EncryptedReadKey = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + m.Permissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Permissions |= AclUserPermissions(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountRequestDecline) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountRequestDecline: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountRequestDecline: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestRecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestRecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountInviteRevoke) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountInviteRevoke: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountInviteRevoke: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteRecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InviteRecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclEncryptedReadKey) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclEncryptedReadKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclEncryptedReadKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedReadKey == nil { + m.EncryptedReadKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountPermissionChanges) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountPermissionChanges: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountPermissionChanges: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Changes = append(m.Changes, &AclAccountPermissionChange{}) + if err := m.Changes[len(m.Changes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountsAdd) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountsAdd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountsAdd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Additions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Additions = append(m.Additions, &AclAccountAdd{}) + if err := m.Additions[len(m.Additions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountAdd) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountAdd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountAdd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + m.Permissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Permissions |= AclUserPermissions(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedReadKey == nil { + m.EncryptedReadKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountRequestCancel) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountRequestCancel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountRequestCancel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountPermissionChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountPermissionChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountPermissionChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + m.Permissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Permissions |= AclUserPermissions(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclReadKeyChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclReadKeyChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclReadKeyChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountKeys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountKeys = append(m.AccountKeys, &AclEncryptedReadKey{}) + if err := m.AccountKeys[len(m.AccountKeys)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetadataPubKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetadataPubKey = append(m.MetadataPubKey[:0], dAtA[iNdEx:postIndex]...) + if m.MetadataPubKey == nil { + m.MetadataPubKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedMetadataPrivKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedMetadataPrivKey = append(m.EncryptedMetadataPrivKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedMetadataPrivKey == nil { + m.EncryptedMetadataPrivKey = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptedOldReadKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncryptedOldReadKey = append(m.EncryptedOldReadKey[:0], dAtA[iNdEx:postIndex]...) + if m.EncryptedOldReadKey == nil { + m.EncryptedOldReadKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountRemove) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountRemove: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountRemove: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identities", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identities = append(m.Identities, make([]byte, postIndex-iNdEx)) + copy(m.Identities[len(m.Identities)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyChange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReadKeyChange == nil { + m.ReadKeyChange = &AclReadKeyChange{} + } + if err := m.ReadKeyChange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAccountRequestRemove) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAccountRequestRemove: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAccountRequestRemove: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclContentValue) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclContentValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclContentValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Invite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_Invite); ok { + if err := oneof.Invite.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountInvite{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_Invite{Invite: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteRevoke", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_InviteRevoke); ok { + if err := oneof.InviteRevoke.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountInviteRevoke{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_InviteRevoke{InviteRevoke: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestJoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_RequestJoin); ok { + if err := oneof.RequestJoin.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountRequestJoin{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_RequestJoin{RequestJoin: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestAccept", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_RequestAccept); ok { + if err := oneof.RequestAccept.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountRequestAccept{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_RequestAccept{RequestAccept: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PermissionChange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_PermissionChange); ok { + if err := oneof.PermissionChange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountPermissionChange{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_PermissionChange{PermissionChange: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountRemove", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_AccountRemove); ok { + if err := oneof.AccountRemove.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountRemove{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_AccountRemove{AccountRemove: v} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyChange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_ReadKeyChange); ok { + if err := oneof.ReadKeyChange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclReadKeyChange{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_ReadKeyChange{ReadKeyChange: v} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestDecline", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_RequestDecline); ok { + if err := oneof.RequestDecline.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountRequestDecline{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_RequestDecline{RequestDecline: v} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountRequestRemove", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_AccountRequestRemove); ok { + if err := oneof.AccountRequestRemove.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountRequestRemove{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_AccountRequestRemove{AccountRequestRemove: v} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PermissionChanges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_PermissionChanges); ok { + if err := oneof.PermissionChanges.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountPermissionChanges{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_PermissionChanges{PermissionChanges: v} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountsAdd", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_AccountsAdd); ok { + if err := oneof.AccountsAdd.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountsAdd{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_AccountsAdd{AccountsAdd: v} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestCancel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*AclContentValue_RequestCancel); ok { + if err := oneof.RequestCancel.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &AclAccountRequestCancel{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AclContentValue_RequestCancel{RequestCancel: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclData) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclContent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclContent = append(m.AclContent, &AclContentValue{}) + if err := m.AclContent[len(m.AclContent)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/commonspace/object/acl/list/aclrecordbuilder.go b/commonspace/object/acl/list/aclrecordbuilder.go index e71f94d1d..c9cdd7d78 100644 --- a/commonspace/object/acl/list/aclrecordbuilder.go +++ b/commonspace/object/acl/list/aclrecordbuilder.go @@ -4,8 +4,6 @@ import ( "errors" "time" - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/object/accountdata" "github.com/anyproto/any-sync/commonspace/object/acl/aclrecordproto" "github.com/anyproto/any-sync/consensus/consensusproto" @@ -164,7 +162,7 @@ func (a *aclRecordBuilder) buildRecord(aclContent *aclrecordproto.AclContentValu func (a *aclRecordBuilder) buildRecords(aclContent []*aclrecordproto.AclContentValue) (rawRec *consensusproto.RawRecord, err error) { aclData := &aclrecordproto.AclData{AclContent: aclContent} - marshalledData, err := aclData.Marshal() + marshalledData, err := aclData.MarshalVT() if err != nil { return } @@ -178,7 +176,7 @@ func (a *aclRecordBuilder) buildRecords(aclContent []*aclrecordproto.AclContentV Data: marshalledData, Timestamp: time.Now().Unix(), } - marshalledRec, err := rec.Marshal() + marshalledRec, err := rec.MarshalVT() if err != nil { return } @@ -226,7 +224,7 @@ func (a *aclRecordBuilder) buildPermissionChanges(payload PermissionChangesPaylo }) } return &aclrecordproto.AclContentValue{Value: &aclrecordproto.AclContentValue_PermissionChanges{ - &aclrecordproto.AclAccountPermissionChanges{changes}, + &aclrecordproto.AclAccountPermissionChanges{Changes: changes}, }}, nil } @@ -282,7 +280,7 @@ func (a *aclRecordBuilder) buildAccountsAdd(payload AccountsAddPayload) (value * }) } return &aclrecordproto.AclContentValue{Value: &aclrecordproto.AclContentValue_AccountsAdd{ - &aclrecordproto.AclAccountsAdd{accs}, + &aclrecordproto.AclAccountsAdd{Additions: accs}, }}, nil } @@ -622,7 +620,7 @@ func (a *aclRecordBuilder) BuildRequestRemove() (rawRecord *consensusproto.RawRe func (a *aclRecordBuilder) Unmarshall(rawRecord *consensusproto.RawRecord) (rec *AclRecord, err error) { aclRecord := &consensusproto.Record{} - err = proto.Unmarshal(rawRecord.Payload, aclRecord) + err = aclRecord.UnmarshalVT(rawRecord.Payload) if err != nil { return } @@ -631,7 +629,7 @@ func (a *aclRecordBuilder) Unmarshall(rawRecord *consensusproto.RawRecord) (rec return } aclData := &aclrecordproto.AclData{} - err = proto.Unmarshal(aclRecord.Data, aclData) + err = aclData.UnmarshalVT(aclRecord.Data) if err != nil { return } @@ -660,13 +658,13 @@ func (a *aclRecordBuilder) UnmarshallWithId(rawIdRecord *consensusproto.RawRecor rawRec = &consensusproto.RawRecord{} pubKey crypto.PubKey ) - err = proto.Unmarshal(rawIdRecord.Payload, rawRec) + err = rawRec.UnmarshalVT(rawIdRecord.Payload) if err != nil { return } if rawIdRecord.Id == a.id { aclRoot := &aclrecordproto.AclRoot{} - err = proto.Unmarshal(rawRec.Payload, aclRoot) + err = aclRoot.UnmarshalVT(rawRec.Payload) if err != nil { return } @@ -687,7 +685,7 @@ func (a *aclRecordBuilder) UnmarshallWithId(rawIdRecord *consensusproto.RawRecor return } aclRecord := &consensusproto.Record{} - err = proto.Unmarshal(rawRec.Payload, aclRecord) + err = aclRecord.UnmarshalVT(rawRec.Payload) if err != nil { return } @@ -696,7 +694,7 @@ func (a *aclRecordBuilder) UnmarshallWithId(rawIdRecord *consensusproto.RawRecor return } aclData := &aclrecordproto.AclData{} - err = proto.Unmarshal(aclRecord.Data, aclData) + err = aclData.UnmarshalVT(aclRecord.Data) if err != nil { return } @@ -791,7 +789,7 @@ func verifyRaw( } func marshalAclRoot(aclRoot *aclrecordproto.AclRoot, key crypto.PrivKey) (rawWithId *consensusproto.RawRecordWithId, err error) { - marshalledRoot, err := aclRoot.Marshal() + marshalledRoot, err := aclRoot.MarshalVT() if err != nil { return } @@ -803,7 +801,7 @@ func marshalAclRoot(aclRoot *aclrecordproto.AclRoot, key crypto.PrivKey) (rawWit Payload: marshalledRoot, Signature: signature, } - marshalledRaw, err := raw.Marshal() + marshalledRaw, err := raw.MarshalVT() if err != nil { return } diff --git a/commonspace/object/acl/list/aclstate.go b/commonspace/object/acl/list/aclstate.go index 2697c7815..970306446 100644 --- a/commonspace/object/acl/list/aclstate.go +++ b/commonspace/object/acl/list/aclstate.go @@ -3,7 +3,6 @@ package list import ( "errors" - "github.com/anyproto/protobuf/proto" "go.uber.org/zap" "github.com/anyproto/any-sync/app/logger" @@ -237,7 +236,7 @@ func (st *AclState) ApplyRecord(record *AclRecord) (err error) { // if the model is not cached if record.Model == nil { aclData := &aclrecordproto.AclData{} - err = proto.Unmarshal(record.Data, aclData) + err = aclData.UnmarshalVT(record.Data) if err != nil { return } diff --git a/commonspace/object/acl/list/list.go b/commonspace/object/acl/list/list.go index 6640efbd4..34fd5f7a9 100644 --- a/commonspace/object/acl/list/list.go +++ b/commonspace/object/acl/list/list.go @@ -355,7 +355,7 @@ func (a *aclList) Close(ctx context.Context) (err error) { } func WrapAclRecord(rawRec *consensusproto.RawRecord) *consensusproto.RawRecordWithId { - payload, err := rawRec.Marshal() + payload, err := rawRec.MarshalVT() if err != nil { panic(err) } diff --git a/commonspace/object/acl/list/mock_list/mock_list.go b/commonspace/object/acl/list/mock_list/mock_list.go index 91365261e..10d9c7a5b 100644 --- a/commonspace/object/acl/list/mock_list/mock_list.go +++ b/commonspace/object/acl/list/mock_list/mock_list.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_list/mock_list.go github.com/anyproto/any-sync/commonspace/object/acl/list AclList,Storage // + // Package mock_list is a generated GoMock package. package mock_list @@ -22,6 +23,7 @@ import ( type MockAclList struct { ctrl *gomock.Controller recorder *MockAclListMockRecorder + isgomock struct{} } // MockAclListMockRecorder is the mock recorder for MockAclList. @@ -56,89 +58,89 @@ func (mr *MockAclListMockRecorder) AclState() *gomock.Call { } // AddRawRecord mocks base method. -func (m *MockAclList) AddRawRecord(arg0 *consensusproto.RawRecordWithId) error { +func (m *MockAclList) AddRawRecord(rawRec *consensusproto.RawRecordWithId) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawRecord", arg0) + ret := m.ctrl.Call(m, "AddRawRecord", rawRec) ret0, _ := ret[0].(error) return ret0 } // AddRawRecord indicates an expected call of AddRawRecord. -func (mr *MockAclListMockRecorder) AddRawRecord(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) AddRawRecord(rawRec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecord", reflect.TypeOf((*MockAclList)(nil).AddRawRecord), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecord", reflect.TypeOf((*MockAclList)(nil).AddRawRecord), rawRec) } // AddRawRecords mocks base method. -func (m *MockAclList) AddRawRecords(arg0 []*consensusproto.RawRecordWithId) error { +func (m *MockAclList) AddRawRecords(rawRecords []*consensusproto.RawRecordWithId) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawRecords", arg0) + ret := m.ctrl.Call(m, "AddRawRecords", rawRecords) ret0, _ := ret[0].(error) return ret0 } // AddRawRecords indicates an expected call of AddRawRecords. -func (mr *MockAclListMockRecorder) AddRawRecords(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) AddRawRecords(rawRecords any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecords", reflect.TypeOf((*MockAclList)(nil).AddRawRecords), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecords", reflect.TypeOf((*MockAclList)(nil).AddRawRecords), rawRecords) } // Close mocks base method. -func (m *MockAclList) Close(arg0 context.Context) error { +func (m *MockAclList) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockAclListMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAclList)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAclList)(nil).Close), ctx) } // Get mocks base method. -func (m *MockAclList) Get(arg0 string) (*list.AclRecord, error) { +func (m *MockAclList) Get(id string) (*list.AclRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) + ret := m.ctrl.Call(m, "Get", id) ret0, _ := ret[0].(*list.AclRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockAclListMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) Get(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockAclList)(nil).Get), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockAclList)(nil).Get), id) } // GetIndex mocks base method. -func (m *MockAclList) GetIndex(arg0 int) (*list.AclRecord, error) { +func (m *MockAclList) GetIndex(idx int) (*list.AclRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetIndex", arg0) + ret := m.ctrl.Call(m, "GetIndex", idx) ret0, _ := ret[0].(*list.AclRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // GetIndex indicates an expected call of GetIndex. -func (mr *MockAclListMockRecorder) GetIndex(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) GetIndex(idx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndex", reflect.TypeOf((*MockAclList)(nil).GetIndex), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndex", reflect.TypeOf((*MockAclList)(nil).GetIndex), idx) } // HasHead mocks base method. -func (m *MockAclList) HasHead(arg0 string) bool { +func (m *MockAclList) HasHead(head string) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasHead", arg0) + ret := m.ctrl.Call(m, "HasHead", head) ret0, _ := ret[0].(bool) return ret0 } // HasHead indicates an expected call of HasHead. -func (mr *MockAclListMockRecorder) HasHead(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) HasHead(head any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasHead", reflect.TypeOf((*MockAclList)(nil).HasHead), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasHead", reflect.TypeOf((*MockAclList)(nil).HasHead), head) } // Head mocks base method. @@ -170,42 +172,42 @@ func (mr *MockAclListMockRecorder) Id() *gomock.Call { } // IsAfter mocks base method. -func (m *MockAclList) IsAfter(arg0, arg1 string) (bool, error) { +func (m *MockAclList) IsAfter(first, second string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsAfter", arg0, arg1) + ret := m.ctrl.Call(m, "IsAfter", first, second) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // IsAfter indicates an expected call of IsAfter. -func (mr *MockAclListMockRecorder) IsAfter(arg0, arg1 any) *gomock.Call { +func (mr *MockAclListMockRecorder) IsAfter(first, second any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAfter", reflect.TypeOf((*MockAclList)(nil).IsAfter), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAfter", reflect.TypeOf((*MockAclList)(nil).IsAfter), first, second) } // Iterate mocks base method. -func (m *MockAclList) Iterate(arg0 func(*list.AclRecord) bool) { +func (m *MockAclList) Iterate(iterFunc func(*list.AclRecord) bool) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Iterate", arg0) + m.ctrl.Call(m, "Iterate", iterFunc) } // Iterate indicates an expected call of Iterate. -func (mr *MockAclListMockRecorder) Iterate(arg0 any) *gomock.Call { +func (mr *MockAclListMockRecorder) Iterate(iterFunc any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterate", reflect.TypeOf((*MockAclList)(nil).Iterate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterate", reflect.TypeOf((*MockAclList)(nil).Iterate), iterFunc) } // IterateFrom mocks base method. -func (m *MockAclList) IterateFrom(arg0 string, arg1 func(*list.AclRecord) bool) { +func (m *MockAclList) IterateFrom(startId string, iterFunc func(*list.AclRecord) bool) { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateFrom", arg0, arg1) + m.ctrl.Call(m, "IterateFrom", startId, iterFunc) } // IterateFrom indicates an expected call of IterateFrom. -func (mr *MockAclListMockRecorder) IterateFrom(arg0, arg1 any) *gomock.Call { +func (mr *MockAclListMockRecorder) IterateFrom(startId, iterFunc any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockAclList)(nil).IterateFrom), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockAclList)(nil).IterateFrom), startId, iterFunc) } // KeyStorage mocks base method. @@ -287,33 +289,33 @@ func (mr *MockAclListMockRecorder) Records() *gomock.Call { } // RecordsAfter mocks base method. -func (m *MockAclList) RecordsAfter(arg0 context.Context, arg1 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockAclList) RecordsAfter(ctx context.Context, id string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecordsAfter", arg0, arg1) + ret := m.ctrl.Call(m, "RecordsAfter", ctx, id) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // RecordsAfter indicates an expected call of RecordsAfter. -func (mr *MockAclListMockRecorder) RecordsAfter(arg0, arg1 any) *gomock.Call { +func (mr *MockAclListMockRecorder) RecordsAfter(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockAclList)(nil).RecordsAfter), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockAclList)(nil).RecordsAfter), ctx, id) } // RecordsBefore mocks base method. -func (m *MockAclList) RecordsBefore(arg0 context.Context, arg1 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockAclList) RecordsBefore(ctx context.Context, headId string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecordsBefore", arg0, arg1) + ret := m.ctrl.Call(m, "RecordsBefore", ctx, headId) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // RecordsBefore indicates an expected call of RecordsBefore. -func (mr *MockAclListMockRecorder) RecordsBefore(arg0, arg1 any) *gomock.Call { +func (mr *MockAclListMockRecorder) RecordsBefore(ctx, headId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsBefore", reflect.TypeOf((*MockAclList)(nil).RecordsBefore), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsBefore", reflect.TypeOf((*MockAclList)(nil).RecordsBefore), ctx, headId) } // Root mocks base method. @@ -343,23 +345,24 @@ func (mr *MockAclListMockRecorder) Unlock() *gomock.Call { } // ValidateRawRecord mocks base method. -func (m *MockAclList) ValidateRawRecord(arg0 *consensusproto.RawRecord, arg1 func(*list.AclState) error) error { +func (m *MockAclList) ValidateRawRecord(rawRec *consensusproto.RawRecord, afterValid func(*list.AclState) error) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateRawRecord", arg0, arg1) + ret := m.ctrl.Call(m, "ValidateRawRecord", rawRec, afterValid) ret0, _ := ret[0].(error) return ret0 } // ValidateRawRecord indicates an expected call of ValidateRawRecord. -func (mr *MockAclListMockRecorder) ValidateRawRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockAclListMockRecorder) ValidateRawRecord(rawRec, afterValid any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRawRecord", reflect.TypeOf((*MockAclList)(nil).ValidateRawRecord), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRawRecord", reflect.TypeOf((*MockAclList)(nil).ValidateRawRecord), rawRec, afterValid) } // MockStorage is a mock of Storage interface. type MockStorage struct { ctrl *gomock.Controller recorder *MockStorageMockRecorder + isgomock struct{} } // MockStorageMockRecorder is the mock recorder for MockStorage. @@ -380,90 +383,90 @@ func (m *MockStorage) EXPECT() *MockStorageMockRecorder { } // AddAll mocks base method. -func (m *MockStorage) AddAll(arg0 context.Context, arg1 []list.StorageRecord) error { +func (m *MockStorage) AddAll(ctx context.Context, records []list.StorageRecord) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddAll", arg0, arg1) + ret := m.ctrl.Call(m, "AddAll", ctx, records) ret0, _ := ret[0].(error) return ret0 } // AddAll indicates an expected call of AddAll. -func (mr *MockStorageMockRecorder) AddAll(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageMockRecorder) AddAll(ctx, records any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAll", reflect.TypeOf((*MockStorage)(nil).AddAll), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAll", reflect.TypeOf((*MockStorage)(nil).AddAll), ctx, records) } // Get mocks base method. -func (m *MockStorage) Get(arg0 context.Context, arg1 string) (list.StorageRecord, error) { +func (m *MockStorage) Get(ctx context.Context, id string) (list.StorageRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, id) ret0, _ := ret[0].(list.StorageRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockStorageMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Get(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), ctx, id) } // GetAfterOrder mocks base method. -func (m *MockStorage) GetAfterOrder(arg0 context.Context, arg1 int, arg2 func(context.Context, list.StorageRecord) (bool, error)) error { +func (m *MockStorage) GetAfterOrder(ctx context.Context, order int, iter func(context.Context, list.StorageRecord) (bool, error)) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAfterOrder", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetAfterOrder", ctx, order, iter) ret0, _ := ret[0].(error) return ret0 } // GetAfterOrder indicates an expected call of GetAfterOrder. -func (mr *MockStorageMockRecorder) GetAfterOrder(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageMockRecorder) GetAfterOrder(ctx, order, iter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAfterOrder", reflect.TypeOf((*MockStorage)(nil).GetAfterOrder), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAfterOrder", reflect.TypeOf((*MockStorage)(nil).GetAfterOrder), ctx, order, iter) } // GetBeforeOrder mocks base method. -func (m *MockStorage) GetBeforeOrder(arg0 context.Context, arg1 int, arg2 func(context.Context, list.StorageRecord) (bool, error)) error { +func (m *MockStorage) GetBeforeOrder(ctx context.Context, order int, iter func(context.Context, list.StorageRecord) (bool, error)) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBeforeOrder", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetBeforeOrder", ctx, order, iter) ret0, _ := ret[0].(error) return ret0 } // GetBeforeOrder indicates an expected call of GetBeforeOrder. -func (mr *MockStorageMockRecorder) GetBeforeOrder(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageMockRecorder) GetBeforeOrder(ctx, order, iter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBeforeOrder", reflect.TypeOf((*MockStorage)(nil).GetBeforeOrder), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBeforeOrder", reflect.TypeOf((*MockStorage)(nil).GetBeforeOrder), ctx, order, iter) } // Has mocks base method. -func (m *MockStorage) Has(arg0 context.Context, arg1 string) (bool, error) { +func (m *MockStorage) Has(ctx context.Context, id string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Has", arg0, arg1) + ret := m.ctrl.Call(m, "Has", ctx, id) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // Has indicates an expected call of Has. -func (mr *MockStorageMockRecorder) Has(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Has(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), ctx, id) } // Head mocks base method. -func (m *MockStorage) Head(arg0 context.Context) (string, error) { +func (m *MockStorage) Head(ctx context.Context) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Head", arg0) + ret := m.ctrl.Call(m, "Head", ctx) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // Head indicates an expected call of Head. -func (mr *MockStorageMockRecorder) Head(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Head(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Head", reflect.TypeOf((*MockStorage)(nil).Head), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Head", reflect.TypeOf((*MockStorage)(nil).Head), ctx) } // Id mocks base method. @@ -481,16 +484,16 @@ func (mr *MockStorageMockRecorder) Id() *gomock.Call { } // Root mocks base method. -func (m *MockStorage) Root(arg0 context.Context) (list.StorageRecord, error) { +func (m *MockStorage) Root(ctx context.Context) (list.StorageRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Root", arg0) + ret := m.ctrl.Call(m, "Root", ctx) ret0, _ := ret[0].(list.StorageRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // Root indicates an expected call of Root. -func (mr *MockStorageMockRecorder) Root(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Root(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Root", reflect.TypeOf((*MockStorage)(nil).Root), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Root", reflect.TypeOf((*MockStorage)(nil).Root), ctx) } diff --git a/commonspace/object/acl/syncacl/headupdate.go b/commonspace/object/acl/syncacl/headupdate.go index 0cd189a52..30b09e0a8 100644 --- a/commonspace/object/acl/syncacl/headupdate.go +++ b/commonspace/object/acl/syncacl/headupdate.go @@ -34,7 +34,7 @@ func (h *InnerHeadUpdate) Prepare() error { Head: h.head, Records: h.records, }, h.root) - bytes, err := logMsg.Marshal() + bytes, err := logMsg.MarshalVT() if err != nil { return err } @@ -51,7 +51,7 @@ func (h *InnerHeadUpdate) Marshall(data objectmessages.ObjectMeta) ([]byte, erro Head: h.head, Records: h.records, }, h.root) - return logMsg.Marshal() + return logMsg.MarshalVT() } func (h *InnerHeadUpdate) Heads() []string { diff --git a/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go b/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go index 3a3011809..08552459d 100644 --- a/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go +++ b/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_syncacl/mock_syncacl.go github.com/anyproto/any-sync/commonspace/object/acl/syncacl SyncClient,SyncAcl // + // Package mock_syncacl is a generated GoMock package. package mock_syncacl @@ -22,8 +23,8 @@ import ( consensusproto "github.com/anyproto/any-sync/consensus/consensusproto" peer "github.com/anyproto/any-sync/net/peer" crypto "github.com/anyproto/any-sync/util/crypto" - proto "github.com/anyproto/protobuf/proto" gomock "go.uber.org/mock/gomock" + proto "google.golang.org/protobuf/proto" drpc "storj.io/drpc" ) @@ -31,6 +32,7 @@ import ( type MockSyncClient struct { ctrl *gomock.Controller recorder *MockSyncClientMockRecorder + isgomock struct{} } // MockSyncClientMockRecorder is the mock recorder for MockSyncClient. @@ -51,81 +53,82 @@ func (m *MockSyncClient) EXPECT() *MockSyncClientMockRecorder { } // Broadcast mocks base method. -func (m *MockSyncClient) Broadcast(arg0 context.Context, arg1 *objectmessages.HeadUpdate) error { +func (m *MockSyncClient) Broadcast(ctx context.Context, headUpdate *objectmessages.HeadUpdate) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Broadcast", arg0, arg1) + ret := m.ctrl.Call(m, "Broadcast", ctx, headUpdate) ret0, _ := ret[0].(error) return ret0 } // Broadcast indicates an expected call of Broadcast. -func (mr *MockSyncClientMockRecorder) Broadcast(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) Broadcast(ctx, headUpdate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broadcast", reflect.TypeOf((*MockSyncClient)(nil).Broadcast), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broadcast", reflect.TypeOf((*MockSyncClient)(nil).Broadcast), ctx, headUpdate) } // CreateFullSyncRequest mocks base method. -func (m *MockSyncClient) CreateFullSyncRequest(arg0 string, arg1 list.AclList) *objectmessages.Request { +func (m *MockSyncClient) CreateFullSyncRequest(peerId string, l list.AclList) *objectmessages.Request { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateFullSyncRequest", arg0, arg1) + ret := m.ctrl.Call(m, "CreateFullSyncRequest", peerId, l) ret0, _ := ret[0].(*objectmessages.Request) return ret0 } // CreateFullSyncRequest indicates an expected call of CreateFullSyncRequest. -func (mr *MockSyncClientMockRecorder) CreateFullSyncRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateFullSyncRequest(peerId, l any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncRequest), peerId, l) } // CreateFullSyncResponse mocks base method. -func (m *MockSyncClient) CreateFullSyncResponse(arg0 list.AclList, arg1 string) (*response.Response, error) { +func (m *MockSyncClient) CreateFullSyncResponse(l list.AclList, theirHead string) (*response.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateFullSyncResponse", arg0, arg1) + ret := m.ctrl.Call(m, "CreateFullSyncResponse", l, theirHead) ret0, _ := ret[0].(*response.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateFullSyncResponse indicates an expected call of CreateFullSyncResponse. -func (mr *MockSyncClientMockRecorder) CreateFullSyncResponse(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateFullSyncResponse(l, theirHead any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncResponse", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncResponse), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncResponse", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncResponse), l, theirHead) } // CreateHeadUpdate mocks base method. -func (m *MockSyncClient) CreateHeadUpdate(arg0 list.AclList, arg1 []*consensusproto.RawRecordWithId) (*objectmessages.HeadUpdate, error) { +func (m *MockSyncClient) CreateHeadUpdate(l list.AclList, added []*consensusproto.RawRecordWithId) (*objectmessages.HeadUpdate, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHeadUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "CreateHeadUpdate", l, added) ret0, _ := ret[0].(*objectmessages.HeadUpdate) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateHeadUpdate indicates an expected call of CreateHeadUpdate. -func (mr *MockSyncClientMockRecorder) CreateHeadUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateHeadUpdate(l, added any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockSyncClient)(nil).CreateHeadUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockSyncClient)(nil).CreateHeadUpdate), l, added) } // QueueRequest mocks base method. -func (m *MockSyncClient) QueueRequest(arg0 context.Context, arg1 syncdeps.Request) error { +func (m *MockSyncClient) QueueRequest(ctx context.Context, req syncdeps.Request) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueueRequest", arg0, arg1) + ret := m.ctrl.Call(m, "QueueRequest", ctx, req) ret0, _ := ret[0].(error) return ret0 } // QueueRequest indicates an expected call of QueueRequest. -func (mr *MockSyncClientMockRecorder) QueueRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) QueueRequest(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueRequest", reflect.TypeOf((*MockSyncClient)(nil).QueueRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueRequest", reflect.TypeOf((*MockSyncClient)(nil).QueueRequest), ctx, req) } // MockSyncAcl is a mock of SyncAcl interface. type MockSyncAcl struct { ctrl *gomock.Controller recorder *MockSyncAclMockRecorder + isgomock struct{} } // MockSyncAclMockRecorder is the mock recorder for MockSyncAcl. @@ -160,133 +163,133 @@ func (mr *MockSyncAclMockRecorder) AclState() *gomock.Call { } // AddRawRecord mocks base method. -func (m *MockSyncAcl) AddRawRecord(arg0 *consensusproto.RawRecordWithId) error { +func (m *MockSyncAcl) AddRawRecord(rawRec *consensusproto.RawRecordWithId) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawRecord", arg0) + ret := m.ctrl.Call(m, "AddRawRecord", rawRec) ret0, _ := ret[0].(error) return ret0 } // AddRawRecord indicates an expected call of AddRawRecord. -func (mr *MockSyncAclMockRecorder) AddRawRecord(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) AddRawRecord(rawRec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecord", reflect.TypeOf((*MockSyncAcl)(nil).AddRawRecord), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecord", reflect.TypeOf((*MockSyncAcl)(nil).AddRawRecord), rawRec) } // AddRawRecords mocks base method. -func (m *MockSyncAcl) AddRawRecords(arg0 []*consensusproto.RawRecordWithId) error { +func (m *MockSyncAcl) AddRawRecords(rawRecords []*consensusproto.RawRecordWithId) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawRecords", arg0) + ret := m.ctrl.Call(m, "AddRawRecords", rawRecords) ret0, _ := ret[0].(error) return ret0 } // AddRawRecords indicates an expected call of AddRawRecords. -func (mr *MockSyncAclMockRecorder) AddRawRecords(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) AddRawRecords(rawRecords any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecords", reflect.TypeOf((*MockSyncAcl)(nil).AddRawRecords), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawRecords", reflect.TypeOf((*MockSyncAcl)(nil).AddRawRecords), rawRecords) } // Close mocks base method. -func (m *MockSyncAcl) Close(arg0 context.Context) error { +func (m *MockSyncAcl) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockSyncAclMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSyncAcl)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSyncAcl)(nil).Close), ctx) } // Get mocks base method. -func (m *MockSyncAcl) Get(arg0 string) (*list.AclRecord, error) { +func (m *MockSyncAcl) Get(id string) (*list.AclRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) + ret := m.ctrl.Call(m, "Get", id) ret0, _ := ret[0].(*list.AclRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockSyncAclMockRecorder) Get(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) Get(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSyncAcl)(nil).Get), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSyncAcl)(nil).Get), id) } // GetIndex mocks base method. -func (m *MockSyncAcl) GetIndex(arg0 int) (*list.AclRecord, error) { +func (m *MockSyncAcl) GetIndex(idx int) (*list.AclRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetIndex", arg0) + ret := m.ctrl.Call(m, "GetIndex", idx) ret0, _ := ret[0].(*list.AclRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // GetIndex indicates an expected call of GetIndex. -func (mr *MockSyncAclMockRecorder) GetIndex(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) GetIndex(idx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndex", reflect.TypeOf((*MockSyncAcl)(nil).GetIndex), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndex", reflect.TypeOf((*MockSyncAcl)(nil).GetIndex), idx) } // HandleHeadUpdate mocks base method. -func (m *MockSyncAcl) HandleHeadUpdate(arg0 context.Context, arg1 syncstatus.StatusUpdater, arg2 drpc.Message) (syncdeps.Request, error) { +func (m *MockSyncAcl) HandleHeadUpdate(ctx context.Context, statusUpdater syncstatus.StatusUpdater, headUpdate drpc.Message) (syncdeps.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleHeadUpdate", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "HandleHeadUpdate", ctx, statusUpdater, headUpdate) ret0, _ := ret[0].(syncdeps.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleHeadUpdate indicates an expected call of HandleHeadUpdate. -func (mr *MockSyncAclMockRecorder) HandleHeadUpdate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) HandleHeadUpdate(ctx, statusUpdater, headUpdate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockSyncAcl)(nil).HandleHeadUpdate), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockSyncAcl)(nil).HandleHeadUpdate), ctx, statusUpdater, headUpdate) } // HandleResponse mocks base method. -func (m *MockSyncAcl) HandleResponse(arg0 context.Context, arg1, arg2 string, arg3 syncdeps.Response) error { +func (m *MockSyncAcl) HandleResponse(ctx context.Context, peerId, objectId string, resp syncdeps.Response) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleResponse", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "HandleResponse", ctx, peerId, objectId, resp) ret0, _ := ret[0].(error) return ret0 } // HandleResponse indicates an expected call of HandleResponse. -func (mr *MockSyncAclMockRecorder) HandleResponse(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) HandleResponse(ctx, peerId, objectId, resp any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockSyncAcl)(nil).HandleResponse), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockSyncAcl)(nil).HandleResponse), ctx, peerId, objectId, resp) } // HandleStreamRequest mocks base method. -func (m *MockSyncAcl) HandleStreamRequest(arg0 context.Context, arg1 syncdeps.Request, arg2 syncdeps.QueueSizeUpdater, arg3 func(proto.Message) error) (syncdeps.Request, error) { +func (m *MockSyncAcl) HandleStreamRequest(ctx context.Context, rq syncdeps.Request, updater syncdeps.QueueSizeUpdater, send func(proto.Message) error) (syncdeps.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleStreamRequest", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "HandleStreamRequest", ctx, rq, updater, send) ret0, _ := ret[0].(syncdeps.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleStreamRequest indicates an expected call of HandleStreamRequest. -func (mr *MockSyncAclMockRecorder) HandleStreamRequest(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) HandleStreamRequest(ctx, rq, updater, send any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockSyncAcl)(nil).HandleStreamRequest), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockSyncAcl)(nil).HandleStreamRequest), ctx, rq, updater, send) } // HasHead mocks base method. -func (m *MockSyncAcl) HasHead(arg0 string) bool { +func (m *MockSyncAcl) HasHead(head string) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasHead", arg0) + ret := m.ctrl.Call(m, "HasHead", head) ret0, _ := ret[0].(bool) return ret0 } // HasHead indicates an expected call of HasHead. -func (mr *MockSyncAclMockRecorder) HasHead(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) HasHead(head any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasHead", reflect.TypeOf((*MockSyncAcl)(nil).HasHead), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasHead", reflect.TypeOf((*MockSyncAcl)(nil).HasHead), head) } // Head mocks base method. @@ -318,56 +321,56 @@ func (mr *MockSyncAclMockRecorder) Id() *gomock.Call { } // Init mocks base method. -func (m *MockSyncAcl) Init(arg0 *app.App) error { +func (m *MockSyncAcl) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockSyncAclMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSyncAcl)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSyncAcl)(nil).Init), a) } // IsAfter mocks base method. -func (m *MockSyncAcl) IsAfter(arg0, arg1 string) (bool, error) { +func (m *MockSyncAcl) IsAfter(first, second string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsAfter", arg0, arg1) + ret := m.ctrl.Call(m, "IsAfter", first, second) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // IsAfter indicates an expected call of IsAfter. -func (mr *MockSyncAclMockRecorder) IsAfter(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) IsAfter(first, second any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAfter", reflect.TypeOf((*MockSyncAcl)(nil).IsAfter), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAfter", reflect.TypeOf((*MockSyncAcl)(nil).IsAfter), first, second) } // Iterate mocks base method. -func (m *MockSyncAcl) Iterate(arg0 func(*list.AclRecord) bool) { +func (m *MockSyncAcl) Iterate(iterFunc func(*list.AclRecord) bool) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Iterate", arg0) + m.ctrl.Call(m, "Iterate", iterFunc) } // Iterate indicates an expected call of Iterate. -func (mr *MockSyncAclMockRecorder) Iterate(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) Iterate(iterFunc any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterate", reflect.TypeOf((*MockSyncAcl)(nil).Iterate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterate", reflect.TypeOf((*MockSyncAcl)(nil).Iterate), iterFunc) } // IterateFrom mocks base method. -func (m *MockSyncAcl) IterateFrom(arg0 string, arg1 func(*list.AclRecord) bool) { +func (m *MockSyncAcl) IterateFrom(startId string, iterFunc func(*list.AclRecord) bool) { m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateFrom", arg0, arg1) + m.ctrl.Call(m, "IterateFrom", startId, iterFunc) } // IterateFrom indicates an expected call of IterateFrom. -func (mr *MockSyncAclMockRecorder) IterateFrom(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) IterateFrom(startId, iterFunc any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockSyncAcl)(nil).IterateFrom), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockSyncAcl)(nil).IterateFrom), startId, iterFunc) } // KeyStorage mocks base method. @@ -463,33 +466,33 @@ func (mr *MockSyncAclMockRecorder) Records() *gomock.Call { } // RecordsAfter mocks base method. -func (m *MockSyncAcl) RecordsAfter(arg0 context.Context, arg1 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockSyncAcl) RecordsAfter(ctx context.Context, id string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecordsAfter", arg0, arg1) + ret := m.ctrl.Call(m, "RecordsAfter", ctx, id) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // RecordsAfter indicates an expected call of RecordsAfter. -func (mr *MockSyncAclMockRecorder) RecordsAfter(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) RecordsAfter(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockSyncAcl)(nil).RecordsAfter), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockSyncAcl)(nil).RecordsAfter), ctx, id) } // RecordsBefore mocks base method. -func (m *MockSyncAcl) RecordsBefore(arg0 context.Context, arg1 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockSyncAcl) RecordsBefore(ctx context.Context, headId string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecordsBefore", arg0, arg1) + ret := m.ctrl.Call(m, "RecordsBefore", ctx, headId) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // RecordsBefore indicates an expected call of RecordsBefore. -func (mr *MockSyncAclMockRecorder) RecordsBefore(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) RecordsBefore(ctx, headId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsBefore", reflect.TypeOf((*MockSyncAcl)(nil).RecordsBefore), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsBefore", reflect.TypeOf((*MockSyncAcl)(nil).RecordsBefore), ctx, headId) } // ResponseCollector mocks base method. @@ -521,43 +524,43 @@ func (mr *MockSyncAclMockRecorder) Root() *gomock.Call { } // Run mocks base method. -func (m *MockSyncAcl) Run(arg0 context.Context) error { +func (m *MockSyncAcl) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockSyncAclMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSyncAcl)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSyncAcl)(nil).Run), ctx) } // SetAclUpdater mocks base method. -func (m *MockSyncAcl) SetAclUpdater(arg0 headupdater.AclUpdater) { +func (m *MockSyncAcl) SetAclUpdater(updater headupdater.AclUpdater) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetAclUpdater", arg0) + m.ctrl.Call(m, "SetAclUpdater", updater) } // SetAclUpdater indicates an expected call of SetAclUpdater. -func (mr *MockSyncAclMockRecorder) SetAclUpdater(arg0 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) SetAclUpdater(updater any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAclUpdater", reflect.TypeOf((*MockSyncAcl)(nil).SetAclUpdater), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAclUpdater", reflect.TypeOf((*MockSyncAcl)(nil).SetAclUpdater), updater) } // SyncWithPeer mocks base method. -func (m *MockSyncAcl) SyncWithPeer(arg0 context.Context, arg1 peer.Peer) error { +func (m *MockSyncAcl) SyncWithPeer(ctx context.Context, p peer.Peer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncWithPeer", arg0, arg1) + ret := m.ctrl.Call(m, "SyncWithPeer", ctx, p) ret0, _ := ret[0].(error) return ret0 } // SyncWithPeer indicates an expected call of SyncWithPeer. -func (mr *MockSyncAclMockRecorder) SyncWithPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) SyncWithPeer(ctx, p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncWithPeer", reflect.TypeOf((*MockSyncAcl)(nil).SyncWithPeer), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncWithPeer", reflect.TypeOf((*MockSyncAcl)(nil).SyncWithPeer), ctx, p) } // Unlock mocks base method. @@ -573,15 +576,15 @@ func (mr *MockSyncAclMockRecorder) Unlock() *gomock.Call { } // ValidateRawRecord mocks base method. -func (m *MockSyncAcl) ValidateRawRecord(arg0 *consensusproto.RawRecord, arg1 func(*list.AclState) error) error { +func (m *MockSyncAcl) ValidateRawRecord(rawRec *consensusproto.RawRecord, afterValid func(*list.AclState) error) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateRawRecord", arg0, arg1) + ret := m.ctrl.Call(m, "ValidateRawRecord", rawRec, afterValid) ret0, _ := ret[0].(error) return ret0 } // ValidateRawRecord indicates an expected call of ValidateRawRecord. -func (mr *MockSyncAclMockRecorder) ValidateRawRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncAclMockRecorder) ValidateRawRecord(rawRec, afterValid any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRawRecord", reflect.TypeOf((*MockSyncAcl)(nil).ValidateRawRecord), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRawRecord", reflect.TypeOf((*MockSyncAcl)(nil).ValidateRawRecord), rawRec, afterValid) } diff --git a/commonspace/object/acl/syncacl/request.go b/commonspace/object/acl/syncacl/request.go index bad2924ca..39afbb655 100644 --- a/commonspace/object/acl/syncacl/request.go +++ b/commonspace/object/acl/syncacl/request.go @@ -29,5 +29,5 @@ func (r *InnerRequest) Marshall() ([]byte, error) { Head: r.head, } fullSync := consensusproto.WrapFullRequest(req, r.root) - return fullSync.Marshal() + return fullSync.MarshalVT() } diff --git a/commonspace/object/acl/syncacl/response/response.go b/commonspace/object/acl/syncacl/response/response.go index cc92d419c..e0e873198 100644 --- a/commonspace/object/acl/syncacl/response/response.go +++ b/commonspace/object/acl/syncacl/response/response.go @@ -3,10 +3,9 @@ package response import ( "fmt" - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/consensus/consensusproto" + "github.com/anyproto/any-sync/protobuf" ) type Response struct { @@ -26,7 +25,7 @@ func (r *Response) MsgSize() uint64 { return size + uint64(len(r.SpaceId)) + uint64(len(r.ObjectId)) } -func (r *Response) ProtoMessage() (proto.Message, error) { +func (r *Response) ProtoMessage() (protobuf.Message, error) { if r.ObjectId == "" { return &spacesyncproto.ObjectSyncMessage{}, nil } @@ -38,7 +37,7 @@ func (r *Response) ProtoMessage() (proto.Message, error) { return spacesyncproto.MarshallSyncMessage(wrapped, r.SpaceId, r.ObjectId) } -func (r *Response) SetProtoMessage(message proto.Message) error { +func (r *Response) SetProtoMessage(message protobuf.Message) error { var ( msg *spacesyncproto.ObjectSyncMessage ok bool @@ -47,7 +46,7 @@ func (r *Response) SetProtoMessage(message proto.Message) error { return fmt.Errorf("unexpected message type: %T", message) } logMsg := &consensusproto.LogSyncMessage{} - err := proto.Unmarshal(msg.Payload, logMsg) + err := logMsg.UnmarshalVT(msg.Payload) if err != nil { return err } diff --git a/commonspace/object/acl/syncacl/syncaclhandler.go b/commonspace/object/acl/syncacl/syncaclhandler.go index 242c0873d..0c97abf65 100644 --- a/commonspace/object/acl/syncacl/syncaclhandler.go +++ b/commonspace/object/acl/syncacl/syncaclhandler.go @@ -3,8 +3,8 @@ package syncacl import ( "context" "errors" + "google.golang.org/protobuf/proto" - "github.com/anyproto/protobuf/proto" "storj.io/drpc" "github.com/anyproto/any-sync/commonspace/object/acl/list" @@ -47,7 +47,7 @@ func (s *syncAclHandler) HandleHeadUpdate(ctx context.Context, statusUpdater syn return nil, err } objMsg := &consensusproto.LogSyncMessage{} - err = proto.Unmarshal(update.Bytes, objMsg) + err = objMsg.UnmarshalVT(update.Bytes) if err != nil { return nil, err } @@ -78,7 +78,7 @@ func (s *syncAclHandler) HandleStreamRequest(ctx context.Context, rq syncdeps.Re return nil, ErrUnexpectedRequestType } syncMsg := &consensusproto.LogSyncMessage{} - err := proto.Unmarshal(req.Bytes, syncMsg) + err := syncMsg.UnmarshalVT(req.Bytes) if err != nil { return nil, err } diff --git a/commonspace/object/acl/syncacl/syncaclhandler_test.go b/commonspace/object/acl/syncacl/syncaclhandler_test.go index 2fd6799bc..a84310248 100644 --- a/commonspace/object/acl/syncacl/syncaclhandler_test.go +++ b/commonspace/object/acl/syncacl/syncaclhandler_test.go @@ -1,10 +1,10 @@ package syncacl import ( + "google.golang.org/protobuf/proto" "sync" "testing" - "github.com/anyproto/protobuf/proto" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -35,7 +35,7 @@ func TestSyncAclHandler_HandleHeadUpdate(t *testing.T) { Records: []*consensusproto.RawRecordWithId{chWithId}, } logMessage := consensusproto.WrapHeadUpdate(headUpdate, chWithId) - marshaled, err := logMessage.Marshal() + marshaled, err := logMessage.MarshalVT() require.NoError(t, err) objectHeadUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -64,7 +64,7 @@ func TestSyncAclHandler_HandleHeadUpdate(t *testing.T) { Records: []*consensusproto.RawRecordWithId{chWithId}, } logMessage := consensusproto.WrapHeadUpdate(headUpdate, chWithId) - marshaled, err := logMessage.Marshal() + marshaled, err := logMessage.MarshalVT() require.NoError(t, err) objectHeadUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -88,7 +88,7 @@ func TestSyncAclHandler_HandleHeadUpdate(t *testing.T) { Head: "h1", } logMessage := consensusproto.WrapHeadUpdate(headUpdate, chWithId) - marshaled, err := logMessage.Marshal() + marshaled, err := logMessage.MarshalVT() require.NoError(t, err) objectHeadUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -116,7 +116,7 @@ func TestSyncAclHandler_HandleHeadUpdate(t *testing.T) { Head: "h1", } logMessage := consensusproto.WrapHeadUpdate(headUpdate, chWithId) - marshaled, err := logMessage.Marshal() + marshaled, err := logMessage.MarshalVT() require.NoError(t, err) objectHeadUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -144,7 +144,7 @@ func TestSyncAclHandler_HandleStreamRequest(t *testing.T) { Records: []*consensusproto.RawRecordWithId{chWithId}, } logMessage := consensusproto.WrapFullRequest(fullRequest, chWithId) - marshaled, err := logMessage.Marshal() + marshaled, err := logMessage.MarshalVT() require.NoError(t, err) returnReq := &objectmessages.Request{Bytes: []byte("bytes")} request := objectmessages.NewByteRequest("peerId", "spaceId", "objectId", marshaled) @@ -165,7 +165,7 @@ func TestSyncAclHandler_HandleStreamRequest(t *testing.T) { Records: []*consensusproto.RawRecordWithId{chWithId}, } logMessage := consensusproto.WrapFullRequest(fullRequest, chWithId) - marshaled, err := logMessage.Marshal() + marshaled, err := logMessage.MarshalVT() require.NoError(t, err) returnResp := &response.Response{Head: "h2"} request := objectmessages.NewByteRequest("peerId", "spaceId", "objectId", marshaled) diff --git a/commonspace/object/keyvalue/keyvalue.go b/commonspace/object/keyvalue/keyvalue.go index eab795de8..118f230f2 100644 --- a/commonspace/object/keyvalue/keyvalue.go +++ b/commonspace/object/keyvalue/keyvalue.go @@ -4,7 +4,6 @@ import ( "context" "errors" - "github.com/anyproto/protobuf/proto" "go.uber.org/zap" "storj.io/drpc" @@ -175,7 +174,7 @@ func (k *keyValueService) HandleMessage(ctx context.Context, headUpdate drpc.Mes return ErrUnexpectedMessageType } keyValueMsg := &spacesyncproto.StoreKeyValues{} - err = proto.Unmarshal(update.Bytes, keyValueMsg) + err = keyValueMsg.UnmarshalVT(update.Bytes) if err != nil { objectmessages.FreeHeadUpdate(update) return err @@ -234,7 +233,7 @@ func storageIdFromSpace(spaceId string) (storageId string, err error) { SpaceId: spaceId, StorageName: "default", } - data, err := proto.Marshal(header) + data, err := header.MarshalVT() if err != nil { return "", err } diff --git a/commonspace/object/keyvalue/keyvaluestorage/innerstorage/element.go b/commonspace/object/keyvalue/keyvaluestorage/innerstorage/element.go index e4e48000f..c4842d8fb 100644 --- a/commonspace/object/keyvalue/keyvaluestorage/innerstorage/element.go +++ b/commonspace/object/keyvalue/keyvaluestorage/innerstorage/element.go @@ -34,7 +34,7 @@ func KeyValueFromProto(proto *spacesyncproto.StoreKeyValue, verify bool) (kv Key kv.Value.PeerSignature = proto.PeerSignature kv.Value.IdentitySignature = proto.IdentitySignature innerValue := &spacesyncproto.StoreKeyInner{} - if err = innerValue.Unmarshal(proto.Value); err != nil { + if err = innerValue.UnmarshalVT(proto.Value); err != nil { return kv, err } kv.TimestampMilli = int(innerValue.TimestampMicro) diff --git a/commonspace/object/keyvalue/keyvaluestorage/storage.go b/commonspace/object/keyvalue/keyvaluestorage/storage.go index 9f8caf136..677c138e0 100644 --- a/commonspace/object/keyvalue/keyvaluestorage/storage.go +++ b/commonspace/object/keyvalue/keyvaluestorage/storage.go @@ -9,7 +9,6 @@ import ( "time" anystore "github.com/anyproto/any-store" - "github.com/anyproto/protobuf/proto" "go.uber.org/zap" "github.com/anyproto/any-sync/app" @@ -149,7 +148,7 @@ func (s *storage) Set(ctx context.Context, key string, value []byte) error { AclHeadId: headId, Key: key, } - innerBytes, err := inner.Marshal() + innerBytes, err := inner.MarshalVT() if err != nil { return err } @@ -348,7 +347,7 @@ func (s *storage) decrypt(kv innerstorage.KeyValue) (value []byte, err error) { return nil, fmt.Errorf("no read key for %s", kv.ReadKeyId) } msg := &spacesyncproto.StoreKeyInner{} - err = proto.Unmarshal(kv.Value.Value, msg) + err = msg.UnmarshalVT(kv.Value.Value) if err != nil { return nil, err } diff --git a/commonspace/object/keyvalue/keyvaluestorage/syncstorage/syncclient.go b/commonspace/object/keyvalue/keyvaluestorage/syncstorage/syncclient.go index 3e3839a2f..ac284322f 100644 --- a/commonspace/object/keyvalue/keyvaluestorage/syncstorage/syncclient.go +++ b/commonspace/object/keyvalue/keyvaluestorage/syncstorage/syncclient.go @@ -32,7 +32,7 @@ func (i *innerUpdate) Prepare() error { protoKeyValues = append(protoKeyValues, kv.Proto()) } keyValues := &spacesyncproto.StoreKeyValues{KeyValues: protoKeyValues} - i.prepared, err = keyValues.Marshal() + i.prepared, err = keyValues.MarshalVT() return err } diff --git a/commonspace/object/tree/objecttree/change.go b/commonspace/object/tree/objecttree/change.go index c1f0f91b4..2f83b4a0f 100644 --- a/commonspace/object/tree/objecttree/change.go +++ b/commonspace/object/tree/objecttree/change.go @@ -3,8 +3,6 @@ package objecttree import ( "errors" - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/util/crypto" ) @@ -47,7 +45,7 @@ func NewChangeFromRoot(id string, identity crypto.PubKey, ch *treechangeproto.Ro ChangeType: ch.ChangeType, ChangePayload: ch.ChangePayload, } - data, _ := proto.Marshal(changeInfo) + data, _ := changeInfo.MarshalVT() return &Change{ Next: nil, AclHeadId: ch.AclHeadId, diff --git a/commonspace/object/tree/objecttree/changebuilder.go b/commonspace/object/tree/objecttree/changebuilder.go index 48defe912..485fb2ae8 100644 --- a/commonspace/object/tree/objecttree/changebuilder.go +++ b/commonspace/object/tree/objecttree/changebuilder.go @@ -3,8 +3,6 @@ package objecttree import ( "errors" - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/util/cidutil" "github.com/anyproto/any-sync/util/crypto" @@ -93,7 +91,7 @@ func (c *changeBuilder) Unmarshall(rawIdChange *treechangeproto.RawTreeChangeWit raw := c.rawTreeCh // Use UnmarshalMerge, because proto.Unmarshal calls Reset and delete buffers before unmarshalling - err = proto.UnmarshalMerge(rawIdChange.GetRawChange(), raw) + err = raw.UnmarshalVT(rawIdChange.GetRawChange()) if err != nil { return } @@ -129,7 +127,7 @@ func (c *changeBuilder) UnmarshallReduced(rawIdChange *treechangeproto.RawTreeCh raw := c.rawTreeCh // Use UnmarshalMerge, because proto.Unmarshal calls Reset and delete buffers before unmarshalling - err = proto.UnmarshalMerge(rawIdChange.GetRawChange(), raw) + err = raw.UnmarshalVT(rawIdChange.GetRawChange()) if err != nil { return } @@ -154,7 +152,7 @@ func (c *changeBuilder) BuildRoot(payload InitialContent) (ch *Change, rawIdChan SpaceId: payload.SpaceId, Seed: payload.Seed, } - marshalledChange, err := proto.Marshal(change) + marshalledChange, err := change.MarshalVT() if err != nil { return } @@ -166,7 +164,7 @@ func (c *changeBuilder) BuildRoot(payload InitialContent) (ch *Change, rawIdChan Payload: marshalledChange, Signature: signature, } - marshalledRawChange, err := proto.Marshal(raw) + marshalledRawChange, err := raw.MarshalVT() if err != nil { return } @@ -189,14 +187,14 @@ func (c *changeBuilder) BuildDerivedRoot(payload InitialDerivedContent) (ch *Cha SpaceId: payload.SpaceId, IsDerived: true, } - marshalledChange, err := proto.Marshal(change) + marshalledChange, err := change.MarshalVT() if err != nil { return } raw := &treechangeproto.RawTreeChange{ Payload: marshalledChange, } - marshalledRawChange, err := proto.Marshal(raw) + marshalledRawChange, err := raw.MarshalVT() if err != nil { return } @@ -237,7 +235,7 @@ func (c *changeBuilder) Build(payload BuilderContent) (ch *Change, rawIdChange * } else { change.ChangesData = payload.Content } - marshalledChange, err := proto.Marshal(change) + marshalledChange, err := change.MarshalVT() if err != nil { return } @@ -249,7 +247,7 @@ func (c *changeBuilder) Build(payload BuilderContent) (ch *Change, rawIdChange * Payload: marshalledChange, Signature: signature, } - marshalledRawChange, err := proto.Marshal(raw) + marshalledRawChange, err := raw.MarshalVT() if err != nil { return } @@ -297,15 +295,18 @@ func (c *changeBuilder) Marshall(ch *Change) (raw *treechangeproto.RawTreeChange DataType: ch.DataType, } var marshalled []byte - marshalled, err = treeChange.Marshal() + marshalled, err = treeChange.MarshalVT() if err != nil { return } - marshalledRawChange, err := proto.Marshal(&treechangeproto.RawTreeChange{ + change := treechangeproto.RawTreeChange{ Payload: marshalled, Signature: ch.Signature, - }) + } + + marshalledRawChange, err := change.MarshalVT() + if err != nil { return } @@ -321,7 +322,7 @@ func (c *changeBuilder) unmarshallRawChange(raw *treechangeproto.RawTreeChange, var key crypto.PubKey if c.isRoot(id) { unmarshalled := &treechangeproto.RootChange{} - err = proto.Unmarshal(raw.Payload, unmarshalled) + err = unmarshalled.UnmarshalVT(raw.Payload) if err != nil { return } @@ -338,7 +339,7 @@ func (c *changeBuilder) unmarshallRawChange(raw *treechangeproto.RawTreeChange, } if !c.hasData { change := &treechangeproto.NoDataTreeChange{} - err = proto.Unmarshal(raw.Payload, change) + err = change.UnmarshalVT(raw.Payload) if err != nil { return } @@ -360,7 +361,7 @@ func (c *changeBuilder) unmarshallRawChange(raw *treechangeproto.RawTreeChange, } } else { change := &treechangeproto.TreeChange{} - err = proto.Unmarshal(raw.Payload, change) + err = change.UnmarshalVT(raw.Payload) if err != nil { return } @@ -388,7 +389,7 @@ func (c *changeBuilder) unmarshallRawChange(raw *treechangeproto.RawTreeChange, func (c *changeBuilder) unmarshallReducedRawChange(raw *treechangeproto.RawTreeChange, id string) (ch *Change, err error) { if c.isRoot(id) { unmarshalled := &treechangeproto.RootChange{} - err = proto.Unmarshal(raw.Payload, unmarshalled) + err = unmarshalled.UnmarshalVT(raw.Payload) if err != nil { return } @@ -404,7 +405,7 @@ func (c *changeBuilder) unmarshallReducedRawChange(raw *treechangeproto.RawTreeC return } unmarshalled := &treechangeproto.ReducedTreeChange{} - err = proto.Unmarshal(raw.Payload, unmarshalled) + err = unmarshalled.UnmarshalVT(raw.Payload) if err != nil { return } @@ -424,13 +425,13 @@ func (c *changeBuilder) isRoot(id string) bool { func UnmarshallRoot(rawRoot *treechangeproto.RawTreeChangeWithId) (root *treechangeproto.RootChange, err error) { raw := &treechangeproto.RawTreeChange{} - err = proto.Unmarshal(rawRoot.GetRawChange(), raw) + err = raw.UnmarshalVT(rawRoot.GetRawChange()) if err != nil { return } root = &treechangeproto.RootChange{} - err = proto.Unmarshal(raw.Payload, root) + err = root.UnmarshalVT(raw.Payload) if err != nil { return } diff --git a/commonspace/object/tree/objecttree/derivedtree.go b/commonspace/object/tree/objecttree/derivedtree.go index 4644b9bf2..c76238adc 100644 --- a/commonspace/object/tree/objecttree/derivedtree.go +++ b/commonspace/object/tree/objecttree/derivedtree.go @@ -1,8 +1,6 @@ package objecttree import ( - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" ) @@ -16,7 +14,7 @@ func IsEmptyTree(tree ObjectTree) bool { func IsDerivedRoot(root *treechangeproto.RawTreeChangeWithId) (derived bool, err error) { rawChange := &treechangeproto.RawTreeChange{} - err = proto.Unmarshal(root.RawChange, rawChange) + err = rawChange.UnmarshalVT(root.RawChange) if err != nil { return } diff --git a/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go b/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go index 084db88ba..2d4d87fa3 100644 --- a/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go +++ b/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_objecttree/mock_objecttree.go github.com/anyproto/any-sync/commonspace/object/tree/objecttree ObjectTree,Storage // + // Package mock_objecttree is a generated GoMock package. package mock_objecttree @@ -23,6 +24,7 @@ import ( type MockObjectTree struct { ctrl *gomock.Controller recorder *MockObjectTreeMockRecorder + isgomock struct{} } // MockObjectTreeMockRecorder is the mock recorder for MockObjectTree. @@ -57,63 +59,63 @@ func (mr *MockObjectTreeMockRecorder) AclList() *gomock.Call { } // AddContent mocks base method. -func (m *MockObjectTree) AddContent(arg0 context.Context, arg1 objecttree.SignableChangeContent) (objecttree.AddResult, error) { +func (m *MockObjectTree) AddContent(ctx context.Context, content objecttree.SignableChangeContent) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddContent", arg0, arg1) + ret := m.ctrl.Call(m, "AddContent", ctx, content) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddContent indicates an expected call of AddContent. -func (mr *MockObjectTreeMockRecorder) AddContent(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) AddContent(ctx, content any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContent", reflect.TypeOf((*MockObjectTree)(nil).AddContent), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContent", reflect.TypeOf((*MockObjectTree)(nil).AddContent), ctx, content) } // AddContentWithValidator mocks base method. -func (m *MockObjectTree) AddContentWithValidator(arg0 context.Context, arg1 objecttree.SignableChangeContent, arg2 func(objecttree.StorageChange) error) (objecttree.AddResult, error) { +func (m *MockObjectTree) AddContentWithValidator(ctx context.Context, content objecttree.SignableChangeContent, validate func(objecttree.StorageChange) error) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddContentWithValidator", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddContentWithValidator", ctx, content, validate) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddContentWithValidator indicates an expected call of AddContentWithValidator. -func (mr *MockObjectTreeMockRecorder) AddContentWithValidator(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) AddContentWithValidator(ctx, content, validate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContentWithValidator", reflect.TypeOf((*MockObjectTree)(nil).AddContentWithValidator), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContentWithValidator", reflect.TypeOf((*MockObjectTree)(nil).AddContentWithValidator), ctx, content, validate) } // AddRawChanges mocks base method. -func (m *MockObjectTree) AddRawChanges(arg0 context.Context, arg1 objecttree.RawChangesPayload) (objecttree.AddResult, error) { +func (m *MockObjectTree) AddRawChanges(ctx context.Context, changes objecttree.RawChangesPayload) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawChanges", arg0, arg1) + ret := m.ctrl.Call(m, "AddRawChanges", ctx, changes) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRawChanges indicates an expected call of AddRawChanges. -func (mr *MockObjectTreeMockRecorder) AddRawChanges(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) AddRawChanges(ctx, changes any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChanges", reflect.TypeOf((*MockObjectTree)(nil).AddRawChanges), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChanges", reflect.TypeOf((*MockObjectTree)(nil).AddRawChanges), ctx, changes) } // AddRawChangesWithUpdater mocks base method. -func (m *MockObjectTree) AddRawChangesWithUpdater(arg0 context.Context, arg1 objecttree.RawChangesPayload, arg2 func(objecttree.ObjectTree, objecttree.Mode) error) (objecttree.AddResult, error) { +func (m *MockObjectTree) AddRawChangesWithUpdater(ctx context.Context, changes objecttree.RawChangesPayload, updater func(objecttree.ObjectTree, objecttree.Mode) error) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawChangesWithUpdater", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddRawChangesWithUpdater", ctx, changes, updater) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRawChangesWithUpdater indicates an expected call of AddRawChangesWithUpdater. -func (mr *MockObjectTreeMockRecorder) AddRawChangesWithUpdater(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) AddRawChangesWithUpdater(ctx, changes, updater any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesWithUpdater", reflect.TypeOf((*MockObjectTree)(nil).AddRawChangesWithUpdater), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesWithUpdater", reflect.TypeOf((*MockObjectTree)(nil).AddRawChangesWithUpdater), ctx, changes, updater) } // ChangeInfo mocks base method. @@ -131,18 +133,18 @@ func (mr *MockObjectTreeMockRecorder) ChangeInfo() *gomock.Call { } // ChangesAfterCommonSnapshotLoader mocks base method. -func (m *MockObjectTree) ChangesAfterCommonSnapshotLoader(arg0, arg1 []string) (objecttree.LoadIterator, error) { +func (m *MockObjectTree) ChangesAfterCommonSnapshotLoader(snapshotPath, heads []string) (objecttree.LoadIterator, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangesAfterCommonSnapshotLoader", arg0, arg1) + ret := m.ctrl.Call(m, "ChangesAfterCommonSnapshotLoader", snapshotPath, heads) ret0, _ := ret[0].(objecttree.LoadIterator) ret1, _ := ret[1].(error) return ret0, ret1 } // ChangesAfterCommonSnapshotLoader indicates an expected call of ChangesAfterCommonSnapshotLoader. -func (mr *MockObjectTreeMockRecorder) ChangesAfterCommonSnapshotLoader(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) ChangesAfterCommonSnapshotLoader(snapshotPath, heads any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesAfterCommonSnapshotLoader", reflect.TypeOf((*MockObjectTree)(nil).ChangesAfterCommonSnapshotLoader), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesAfterCommonSnapshotLoader", reflect.TypeOf((*MockObjectTree)(nil).ChangesAfterCommonSnapshotLoader), snapshotPath, heads) } // Close mocks base method. @@ -160,18 +162,18 @@ func (mr *MockObjectTreeMockRecorder) Close() *gomock.Call { } // Debug mocks base method. -func (m *MockObjectTree) Debug(arg0 objecttree.DescriptionParser) (objecttree.DebugInfo, error) { +func (m *MockObjectTree) Debug(parser objecttree.DescriptionParser) (objecttree.DebugInfo, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Debug", arg0) + ret := m.ctrl.Call(m, "Debug", parser) ret0, _ := ret[0].(objecttree.DebugInfo) ret1, _ := ret[1].(error) return ret0, ret1 } // Debug indicates an expected call of Debug. -func (mr *MockObjectTreeMockRecorder) Debug(arg0 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) Debug(parser any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockObjectTree)(nil).Debug), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockObjectTree)(nil).Debug), parser) } // Delete mocks base method. @@ -278,31 +280,31 @@ func (mr *MockObjectTreeMockRecorder) IsDerived() *gomock.Call { } // IterateFrom mocks base method. -func (m *MockObjectTree) IterateFrom(arg0 string, arg1 func(*objecttree.Change, []byte) (any, error), arg2 func(*objecttree.Change) bool) error { +func (m *MockObjectTree) IterateFrom(id string, convert func(*objecttree.Change, []byte) (any, error), iterate func(*objecttree.Change) bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IterateFrom", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "IterateFrom", id, convert, iterate) ret0, _ := ret[0].(error) return ret0 } // IterateFrom indicates an expected call of IterateFrom. -func (mr *MockObjectTreeMockRecorder) IterateFrom(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) IterateFrom(id, convert, iterate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockObjectTree)(nil).IterateFrom), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockObjectTree)(nil).IterateFrom), id, convert, iterate) } // IterateRoot mocks base method. -func (m *MockObjectTree) IterateRoot(arg0 func(*objecttree.Change, []byte) (any, error), arg1 func(*objecttree.Change) bool) error { +func (m *MockObjectTree) IterateRoot(convert func(*objecttree.Change, []byte) (any, error), iterate func(*objecttree.Change) bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IterateRoot", arg0, arg1) + ret := m.ctrl.Call(m, "IterateRoot", convert, iterate) ret0, _ := ret[0].(error) return ret0 } // IterateRoot indicates an expected call of IterateRoot. -func (mr *MockObjectTreeMockRecorder) IterateRoot(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) IterateRoot(convert, iterate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateRoot", reflect.TypeOf((*MockObjectTree)(nil).IterateRoot), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateRoot", reflect.TypeOf((*MockObjectTree)(nil).IterateRoot), convert, iterate) } // Len mocks base method. @@ -332,18 +334,18 @@ func (mr *MockObjectTreeMockRecorder) Lock() *gomock.Call { } // PrepareChange mocks base method. -func (m *MockObjectTree) PrepareChange(arg0 objecttree.SignableChangeContent) (*treechangeproto.RawTreeChangeWithId, error) { +func (m *MockObjectTree) PrepareChange(content objecttree.SignableChangeContent) (*treechangeproto.RawTreeChangeWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PrepareChange", arg0) + ret := m.ctrl.Call(m, "PrepareChange", content) ret0, _ := ret[0].(*treechangeproto.RawTreeChangeWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // PrepareChange indicates an expected call of PrepareChange. -func (mr *MockObjectTreeMockRecorder) PrepareChange(arg0 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) PrepareChange(content any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockObjectTree)(nil).PrepareChange), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockObjectTree)(nil).PrepareChange), content) } // Root mocks base method. @@ -361,15 +363,15 @@ func (mr *MockObjectTreeMockRecorder) Root() *gomock.Call { } // SetFlusher mocks base method. -func (m *MockObjectTree) SetFlusher(arg0 objecttree.Flusher) { +func (m *MockObjectTree) SetFlusher(flusher objecttree.Flusher) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetFlusher", arg0) + m.ctrl.Call(m, "SetFlusher", flusher) } // SetFlusher indicates an expected call of SetFlusher. -func (mr *MockObjectTreeMockRecorder) SetFlusher(arg0 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) SetFlusher(flusher any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlusher", reflect.TypeOf((*MockObjectTree)(nil).SetFlusher), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlusher", reflect.TypeOf((*MockObjectTree)(nil).SetFlusher), flusher) } // SnapshotPath mocks base method. @@ -402,18 +404,18 @@ func (mr *MockObjectTreeMockRecorder) Storage() *gomock.Call { } // TryClose mocks base method. -func (m *MockObjectTree) TryClose(arg0 time.Duration) (bool, error) { +func (m *MockObjectTree) TryClose(objectTTL time.Duration) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryClose", arg0) + ret := m.ctrl.Call(m, "TryClose", objectTTL) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // TryClose indicates an expected call of TryClose. -func (mr *MockObjectTreeMockRecorder) TryClose(arg0 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) TryClose(objectTTL any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockObjectTree)(nil).TryClose), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockObjectTree)(nil).TryClose), objectTTL) } // TryLock mocks base method. @@ -457,24 +459,25 @@ func (mr *MockObjectTreeMockRecorder) UnmarshalledHeader() *gomock.Call { } // UnpackChange mocks base method. -func (m *MockObjectTree) UnpackChange(arg0 *treechangeproto.RawTreeChangeWithId) ([]byte, error) { +func (m *MockObjectTree) UnpackChange(raw *treechangeproto.RawTreeChangeWithId) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UnpackChange", arg0) + ret := m.ctrl.Call(m, "UnpackChange", raw) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // UnpackChange indicates an expected call of UnpackChange. -func (mr *MockObjectTreeMockRecorder) UnpackChange(arg0 any) *gomock.Call { +func (mr *MockObjectTreeMockRecorder) UnpackChange(raw any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackChange", reflect.TypeOf((*MockObjectTree)(nil).UnpackChange), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackChange", reflect.TypeOf((*MockObjectTree)(nil).UnpackChange), raw) } // MockStorage is a mock of Storage interface. type MockStorage struct { ctrl *gomock.Controller recorder *MockStorageMockRecorder + isgomock struct{} } // MockStorageMockRecorder is the mock recorder for MockStorage. @@ -495,31 +498,31 @@ func (m *MockStorage) EXPECT() *MockStorageMockRecorder { } // AddAll mocks base method. -func (m *MockStorage) AddAll(arg0 context.Context, arg1 []objecttree.StorageChange, arg2 []string, arg3 string) error { +func (m *MockStorage) AddAll(ctx context.Context, changes []objecttree.StorageChange, heads []string, commonSnapshot string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddAll", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AddAll", ctx, changes, heads, commonSnapshot) ret0, _ := ret[0].(error) return ret0 } // AddAll indicates an expected call of AddAll. -func (mr *MockStorageMockRecorder) AddAll(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStorageMockRecorder) AddAll(ctx, changes, heads, commonSnapshot any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAll", reflect.TypeOf((*MockStorage)(nil).AddAll), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAll", reflect.TypeOf((*MockStorage)(nil).AddAll), ctx, changes, heads, commonSnapshot) } // AddAllNoError mocks base method. -func (m *MockStorage) AddAllNoError(arg0 context.Context, arg1 []objecttree.StorageChange, arg2 []string, arg3 string) error { +func (m *MockStorage) AddAllNoError(ctx context.Context, changes []objecttree.StorageChange, heads []string, commonSnapshot string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddAllNoError", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AddAllNoError", ctx, changes, heads, commonSnapshot) ret0, _ := ret[0].(error) return ret0 } // AddAllNoError indicates an expected call of AddAllNoError. -func (mr *MockStorageMockRecorder) AddAllNoError(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStorageMockRecorder) AddAllNoError(ctx, changes, heads, commonSnapshot any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAllNoError", reflect.TypeOf((*MockStorage)(nil).AddAllNoError), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAllNoError", reflect.TypeOf((*MockStorage)(nil).AddAllNoError), ctx, changes, heads, commonSnapshot) } // Close mocks base method. @@ -537,91 +540,91 @@ func (mr *MockStorageMockRecorder) Close() *gomock.Call { } // CommonSnapshot mocks base method. -func (m *MockStorage) CommonSnapshot(arg0 context.Context) (string, error) { +func (m *MockStorage) CommonSnapshot(ctx context.Context) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CommonSnapshot", arg0) + ret := m.ctrl.Call(m, "CommonSnapshot", ctx) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // CommonSnapshot indicates an expected call of CommonSnapshot. -func (mr *MockStorageMockRecorder) CommonSnapshot(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) CommonSnapshot(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommonSnapshot", reflect.TypeOf((*MockStorage)(nil).CommonSnapshot), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommonSnapshot", reflect.TypeOf((*MockStorage)(nil).CommonSnapshot), ctx) } // Delete mocks base method. -func (m *MockStorage) Delete(arg0 context.Context) error { +func (m *MockStorage) Delete(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) + ret := m.ctrl.Call(m, "Delete", ctx) ret0, _ := ret[0].(error) return ret0 } // Delete indicates an expected call of Delete. -func (mr *MockStorageMockRecorder) Delete(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Delete(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), ctx) } // Get mocks base method. -func (m *MockStorage) Get(arg0 context.Context, arg1 string) (objecttree.StorageChange, error) { +func (m *MockStorage) Get(ctx context.Context, id string) (objecttree.StorageChange, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, id) ret0, _ := ret[0].(objecttree.StorageChange) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockStorageMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Get(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), ctx, id) } // GetAfterOrder mocks base method. -func (m *MockStorage) GetAfterOrder(arg0 context.Context, arg1 string, arg2 func(context.Context, objecttree.StorageChange) (bool, error)) error { +func (m *MockStorage) GetAfterOrder(ctx context.Context, orderId string, iter func(context.Context, objecttree.StorageChange) (bool, error)) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAfterOrder", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetAfterOrder", ctx, orderId, iter) ret0, _ := ret[0].(error) return ret0 } // GetAfterOrder indicates an expected call of GetAfterOrder. -func (mr *MockStorageMockRecorder) GetAfterOrder(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStorageMockRecorder) GetAfterOrder(ctx, orderId, iter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAfterOrder", reflect.TypeOf((*MockStorage)(nil).GetAfterOrder), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAfterOrder", reflect.TypeOf((*MockStorage)(nil).GetAfterOrder), ctx, orderId, iter) } // Has mocks base method. -func (m *MockStorage) Has(arg0 context.Context, arg1 string) (bool, error) { +func (m *MockStorage) Has(ctx context.Context, id string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Has", arg0, arg1) + ret := m.ctrl.Call(m, "Has", ctx, id) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // Has indicates an expected call of Has. -func (mr *MockStorageMockRecorder) Has(arg0, arg1 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Has(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), ctx, id) } // Heads mocks base method. -func (m *MockStorage) Heads(arg0 context.Context) ([]string, error) { +func (m *MockStorage) Heads(ctx context.Context) ([]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Heads", arg0) + ret := m.ctrl.Call(m, "Heads", ctx) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // Heads indicates an expected call of Heads. -func (mr *MockStorageMockRecorder) Heads(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Heads(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Heads", reflect.TypeOf((*MockStorage)(nil).Heads), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Heads", reflect.TypeOf((*MockStorage)(nil).Heads), ctx) } // Id mocks base method. @@ -639,16 +642,16 @@ func (mr *MockStorageMockRecorder) Id() *gomock.Call { } // Root mocks base method. -func (m *MockStorage) Root(arg0 context.Context) (objecttree.StorageChange, error) { +func (m *MockStorage) Root(ctx context.Context) (objecttree.StorageChange, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Root", arg0) + ret := m.ctrl.Call(m, "Root", ctx) ret0, _ := ret[0].(objecttree.StorageChange) ret1, _ := ret[1].(error) return ret0, ret1 } // Root indicates an expected call of Root. -func (mr *MockStorageMockRecorder) Root(arg0 any) *gomock.Call { +func (mr *MockStorageMockRecorder) Root(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Root", reflect.TypeOf((*MockStorage)(nil).Root), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Root", reflect.TypeOf((*MockStorage)(nil).Root), ctx) } diff --git a/commonspace/object/tree/objecttree/testutils.go b/commonspace/object/tree/objecttree/testutils.go index 004f2ef94..e202c709b 100644 --- a/commonspace/object/tree/objecttree/testutils.go +++ b/commonspace/object/tree/objecttree/testutils.go @@ -103,13 +103,13 @@ func (c *MockChangeCreator) CreateRoot(id, aclId string) *treechangeproto.RawTre aclChange := &treechangeproto.RootChange{ AclHeadId: aclId, } - res, _ := aclChange.Marshal() + res, _ := aclChange.MarshalVT() raw := &treechangeproto.RawTreeChange{ Payload: res, Signature: nil, } - rawMarshalled, _ := raw.Marshal() + rawMarshalled, _ := raw.MarshalVT() return &treechangeproto.RawTreeChangeWithId{ RawChange: rawMarshalled, @@ -121,13 +121,13 @@ func (c *MockChangeCreator) CreateDerivedRoot(id string, isDerived bool) *treech aclChange := &treechangeproto.RootChange{ IsDerived: isDerived, } - res, _ := aclChange.Marshal() + res, _ := aclChange.MarshalVT() raw := &treechangeproto.RawTreeChange{ Payload: res, Signature: nil, } - rawMarshalled, _ := raw.Marshal() + rawMarshalled, _ := raw.MarshalVT() return &treechangeproto.RawTreeChangeWithId{ RawChange: rawMarshalled, @@ -148,13 +148,13 @@ func (c *MockChangeCreator) CreateRawWithData(id, aclId, snapshotId string, isSn IsSnapshot: isSnapshot, DataType: mockDataType, } - res, _ := aclChange.Marshal() + res, _ := aclChange.MarshalVT() raw := &treechangeproto.RawTreeChange{ Payload: res, Signature: nil, } - rawMarshalled, _ := raw.Marshal() + rawMarshalled, _ := raw.MarshalVT() return &treechangeproto.RawTreeChangeWithId{ RawChange: rawMarshalled, diff --git a/commonspace/object/tree/synctree/headupdate.go b/commonspace/object/tree/synctree/headupdate.go index 4e847aa09..f088a852f 100644 --- a/commonspace/object/tree/synctree/headupdate.go +++ b/commonspace/object/tree/synctree/headupdate.go @@ -32,7 +32,7 @@ func (h *InnerHeadUpdate) Prepare() error { SnapshotPath: h.snapshotPath, Changes: h.changes, }, h.root) - bytes, err := treeMsg.Marshal() + bytes, err := treeMsg.MarshalVT() if err != nil { return err } @@ -41,7 +41,7 @@ func (h *InnerHeadUpdate) Prepare() error { Heads: h.heads, SnapshotPath: h.snapshotPath, }, h.root) - bytes, err = emptyTreeMsg.Marshal() + bytes, err = emptyTreeMsg.MarshalVT() if err != nil { return err } @@ -67,7 +67,7 @@ func (h *InnerHeadUpdate) Marshall(data objectmessages.ObjectMeta) ([]byte, erro SnapshotPath: h.snapshotPath, Changes: changes, }, h.root) - return treeMsg.Marshal() + return treeMsg.MarshalVT() } type BroadcastOptions struct { diff --git a/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go b/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go index 324dc8696..dbed826d9 100644 --- a/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go +++ b/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_synctree/mock_synctree.go github.com/anyproto/any-sync/commonspace/object/tree/synctree SyncTree,HeadNotifiable,SyncClient,RequestFactory // + // Package mock_synctree is a generated GoMock package. package mock_synctree @@ -22,8 +23,8 @@ import ( syncdeps "github.com/anyproto/any-sync/commonspace/sync/syncdeps" syncstatus "github.com/anyproto/any-sync/commonspace/syncstatus" peer "github.com/anyproto/any-sync/net/peer" - proto "github.com/anyproto/protobuf/proto" gomock "go.uber.org/mock/gomock" + proto "google.golang.org/protobuf/proto" drpc "storj.io/drpc" ) @@ -31,6 +32,7 @@ import ( type MockSyncTree struct { ctrl *gomock.Controller recorder *MockSyncTreeMockRecorder + isgomock struct{} } // MockSyncTreeMockRecorder is the mock recorder for MockSyncTree. @@ -65,78 +67,78 @@ func (mr *MockSyncTreeMockRecorder) AclList() *gomock.Call { } // AddContent mocks base method. -func (m *MockSyncTree) AddContent(arg0 context.Context, arg1 objecttree.SignableChangeContent) (objecttree.AddResult, error) { +func (m *MockSyncTree) AddContent(ctx context.Context, content objecttree.SignableChangeContent) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddContent", arg0, arg1) + ret := m.ctrl.Call(m, "AddContent", ctx, content) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddContent indicates an expected call of AddContent. -func (mr *MockSyncTreeMockRecorder) AddContent(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) AddContent(ctx, content any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContent", reflect.TypeOf((*MockSyncTree)(nil).AddContent), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContent", reflect.TypeOf((*MockSyncTree)(nil).AddContent), ctx, content) } // AddContentWithValidator mocks base method. -func (m *MockSyncTree) AddContentWithValidator(arg0 context.Context, arg1 objecttree.SignableChangeContent, arg2 func(objecttree.StorageChange) error) (objecttree.AddResult, error) { +func (m *MockSyncTree) AddContentWithValidator(ctx context.Context, content objecttree.SignableChangeContent, validate func(objecttree.StorageChange) error) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddContentWithValidator", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddContentWithValidator", ctx, content, validate) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddContentWithValidator indicates an expected call of AddContentWithValidator. -func (mr *MockSyncTreeMockRecorder) AddContentWithValidator(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) AddContentWithValidator(ctx, content, validate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContentWithValidator", reflect.TypeOf((*MockSyncTree)(nil).AddContentWithValidator), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContentWithValidator", reflect.TypeOf((*MockSyncTree)(nil).AddContentWithValidator), ctx, content, validate) } // AddRawChanges mocks base method. -func (m *MockSyncTree) AddRawChanges(arg0 context.Context, arg1 objecttree.RawChangesPayload) (objecttree.AddResult, error) { +func (m *MockSyncTree) AddRawChanges(ctx context.Context, changes objecttree.RawChangesPayload) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawChanges", arg0, arg1) + ret := m.ctrl.Call(m, "AddRawChanges", ctx, changes) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRawChanges indicates an expected call of AddRawChanges. -func (mr *MockSyncTreeMockRecorder) AddRawChanges(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) AddRawChanges(ctx, changes any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChanges", reflect.TypeOf((*MockSyncTree)(nil).AddRawChanges), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChanges", reflect.TypeOf((*MockSyncTree)(nil).AddRawChanges), ctx, changes) } // AddRawChangesFromPeer mocks base method. -func (m *MockSyncTree) AddRawChangesFromPeer(arg0 context.Context, arg1 string, arg2 objecttree.RawChangesPayload) (objecttree.AddResult, error) { +func (m *MockSyncTree) AddRawChangesFromPeer(ctx context.Context, peerId string, changesPayload objecttree.RawChangesPayload) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawChangesFromPeer", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddRawChangesFromPeer", ctx, peerId, changesPayload) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRawChangesFromPeer indicates an expected call of AddRawChangesFromPeer. -func (mr *MockSyncTreeMockRecorder) AddRawChangesFromPeer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) AddRawChangesFromPeer(ctx, peerId, changesPayload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesFromPeer", reflect.TypeOf((*MockSyncTree)(nil).AddRawChangesFromPeer), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesFromPeer", reflect.TypeOf((*MockSyncTree)(nil).AddRawChangesFromPeer), ctx, peerId, changesPayload) } // AddRawChangesWithUpdater mocks base method. -func (m *MockSyncTree) AddRawChangesWithUpdater(arg0 context.Context, arg1 objecttree.RawChangesPayload, arg2 func(objecttree.ObjectTree, objecttree.Mode) error) (objecttree.AddResult, error) { +func (m *MockSyncTree) AddRawChangesWithUpdater(ctx context.Context, changes objecttree.RawChangesPayload, updater func(objecttree.ObjectTree, objecttree.Mode) error) (objecttree.AddResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRawChangesWithUpdater", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddRawChangesWithUpdater", ctx, changes, updater) ret0, _ := ret[0].(objecttree.AddResult) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRawChangesWithUpdater indicates an expected call of AddRawChangesWithUpdater. -func (mr *MockSyncTreeMockRecorder) AddRawChangesWithUpdater(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) AddRawChangesWithUpdater(ctx, changes, updater any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesWithUpdater", reflect.TypeOf((*MockSyncTree)(nil).AddRawChangesWithUpdater), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesWithUpdater", reflect.TypeOf((*MockSyncTree)(nil).AddRawChangesWithUpdater), ctx, changes, updater) } // ChangeInfo mocks base method. @@ -154,18 +156,18 @@ func (mr *MockSyncTreeMockRecorder) ChangeInfo() *gomock.Call { } // ChangesAfterCommonSnapshotLoader mocks base method. -func (m *MockSyncTree) ChangesAfterCommonSnapshotLoader(arg0, arg1 []string) (objecttree.LoadIterator, error) { +func (m *MockSyncTree) ChangesAfterCommonSnapshotLoader(snapshotPath, heads []string) (objecttree.LoadIterator, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangesAfterCommonSnapshotLoader", arg0, arg1) + ret := m.ctrl.Call(m, "ChangesAfterCommonSnapshotLoader", snapshotPath, heads) ret0, _ := ret[0].(objecttree.LoadIterator) ret1, _ := ret[1].(error) return ret0, ret1 } // ChangesAfterCommonSnapshotLoader indicates an expected call of ChangesAfterCommonSnapshotLoader. -func (mr *MockSyncTreeMockRecorder) ChangesAfterCommonSnapshotLoader(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) ChangesAfterCommonSnapshotLoader(snapshotPath, heads any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesAfterCommonSnapshotLoader", reflect.TypeOf((*MockSyncTree)(nil).ChangesAfterCommonSnapshotLoader), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesAfterCommonSnapshotLoader", reflect.TypeOf((*MockSyncTree)(nil).ChangesAfterCommonSnapshotLoader), snapshotPath, heads) } // Close mocks base method. @@ -183,18 +185,18 @@ func (mr *MockSyncTreeMockRecorder) Close() *gomock.Call { } // Debug mocks base method. -func (m *MockSyncTree) Debug(arg0 objecttree.DescriptionParser) (objecttree.DebugInfo, error) { +func (m *MockSyncTree) Debug(parser objecttree.DescriptionParser) (objecttree.DebugInfo, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Debug", arg0) + ret := m.ctrl.Call(m, "Debug", parser) ret0, _ := ret[0].(objecttree.DebugInfo) ret1, _ := ret[1].(error) return ret0, ret1 } // Debug indicates an expected call of Debug. -func (mr *MockSyncTreeMockRecorder) Debug(arg0 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) Debug(parser any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockSyncTree)(nil).Debug), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockSyncTree)(nil).Debug), parser) } // Delete mocks base method. @@ -227,47 +229,47 @@ func (mr *MockSyncTreeMockRecorder) GetChange(arg0 any) *gomock.Call { } // HandleHeadUpdate mocks base method. -func (m *MockSyncTree) HandleHeadUpdate(arg0 context.Context, arg1 syncstatus.StatusUpdater, arg2 drpc.Message) (syncdeps.Request, error) { +func (m *MockSyncTree) HandleHeadUpdate(ctx context.Context, statusUpdater syncstatus.StatusUpdater, headUpdate drpc.Message) (syncdeps.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleHeadUpdate", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "HandleHeadUpdate", ctx, statusUpdater, headUpdate) ret0, _ := ret[0].(syncdeps.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleHeadUpdate indicates an expected call of HandleHeadUpdate. -func (mr *MockSyncTreeMockRecorder) HandleHeadUpdate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) HandleHeadUpdate(ctx, statusUpdater, headUpdate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockSyncTree)(nil).HandleHeadUpdate), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockSyncTree)(nil).HandleHeadUpdate), ctx, statusUpdater, headUpdate) } // HandleResponse mocks base method. -func (m *MockSyncTree) HandleResponse(arg0 context.Context, arg1, arg2 string, arg3 syncdeps.Response) error { +func (m *MockSyncTree) HandleResponse(ctx context.Context, peerId, objectId string, resp syncdeps.Response) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleResponse", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "HandleResponse", ctx, peerId, objectId, resp) ret0, _ := ret[0].(error) return ret0 } // HandleResponse indicates an expected call of HandleResponse. -func (mr *MockSyncTreeMockRecorder) HandleResponse(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) HandleResponse(ctx, peerId, objectId, resp any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockSyncTree)(nil).HandleResponse), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockSyncTree)(nil).HandleResponse), ctx, peerId, objectId, resp) } // HandleStreamRequest mocks base method. -func (m *MockSyncTree) HandleStreamRequest(arg0 context.Context, arg1 syncdeps.Request, arg2 syncdeps.QueueSizeUpdater, arg3 func(proto.Message) error) (syncdeps.Request, error) { +func (m *MockSyncTree) HandleStreamRequest(ctx context.Context, rq syncdeps.Request, updater syncdeps.QueueSizeUpdater, send func(proto.Message) error) (syncdeps.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleStreamRequest", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "HandleStreamRequest", ctx, rq, updater, send) ret0, _ := ret[0].(syncdeps.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleStreamRequest indicates an expected call of HandleStreamRequest. -func (mr *MockSyncTreeMockRecorder) HandleStreamRequest(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) HandleStreamRequest(ctx, rq, updater, send any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockSyncTree)(nil).HandleStreamRequest), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockSyncTree)(nil).HandleStreamRequest), ctx, rq, updater, send) } // HasChanges mocks base method. @@ -345,31 +347,31 @@ func (mr *MockSyncTreeMockRecorder) IsDerived() *gomock.Call { } // IterateFrom mocks base method. -func (m *MockSyncTree) IterateFrom(arg0 string, arg1 func(*objecttree.Change, []byte) (any, error), arg2 func(*objecttree.Change) bool) error { +func (m *MockSyncTree) IterateFrom(id string, convert func(*objecttree.Change, []byte) (any, error), iterate func(*objecttree.Change) bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IterateFrom", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "IterateFrom", id, convert, iterate) ret0, _ := ret[0].(error) return ret0 } // IterateFrom indicates an expected call of IterateFrom. -func (mr *MockSyncTreeMockRecorder) IterateFrom(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) IterateFrom(id, convert, iterate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockSyncTree)(nil).IterateFrom), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockSyncTree)(nil).IterateFrom), id, convert, iterate) } // IterateRoot mocks base method. -func (m *MockSyncTree) IterateRoot(arg0 func(*objecttree.Change, []byte) (any, error), arg1 func(*objecttree.Change) bool) error { +func (m *MockSyncTree) IterateRoot(convert func(*objecttree.Change, []byte) (any, error), iterate func(*objecttree.Change) bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IterateRoot", arg0, arg1) + ret := m.ctrl.Call(m, "IterateRoot", convert, iterate) ret0, _ := ret[0].(error) return ret0 } // IterateRoot indicates an expected call of IterateRoot. -func (mr *MockSyncTreeMockRecorder) IterateRoot(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) IterateRoot(convert, iterate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateRoot", reflect.TypeOf((*MockSyncTree)(nil).IterateRoot), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateRoot", reflect.TypeOf((*MockSyncTree)(nil).IterateRoot), convert, iterate) } // Len mocks base method. @@ -399,18 +401,18 @@ func (mr *MockSyncTreeMockRecorder) Lock() *gomock.Call { } // PrepareChange mocks base method. -func (m *MockSyncTree) PrepareChange(arg0 objecttree.SignableChangeContent) (*treechangeproto.RawTreeChangeWithId, error) { +func (m *MockSyncTree) PrepareChange(content objecttree.SignableChangeContent) (*treechangeproto.RawTreeChangeWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PrepareChange", arg0) + ret := m.ctrl.Call(m, "PrepareChange", content) ret0, _ := ret[0].(*treechangeproto.RawTreeChangeWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // PrepareChange indicates an expected call of PrepareChange. -func (mr *MockSyncTreeMockRecorder) PrepareChange(arg0 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) PrepareChange(content any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockSyncTree)(nil).PrepareChange), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockSyncTree)(nil).PrepareChange), content) } // ResponseCollector mocks base method. @@ -442,27 +444,27 @@ func (mr *MockSyncTreeMockRecorder) Root() *gomock.Call { } // SetFlusher mocks base method. -func (m *MockSyncTree) SetFlusher(arg0 objecttree.Flusher) { +func (m *MockSyncTree) SetFlusher(flusher objecttree.Flusher) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetFlusher", arg0) + m.ctrl.Call(m, "SetFlusher", flusher) } // SetFlusher indicates an expected call of SetFlusher. -func (mr *MockSyncTreeMockRecorder) SetFlusher(arg0 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) SetFlusher(flusher any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlusher", reflect.TypeOf((*MockSyncTree)(nil).SetFlusher), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlusher", reflect.TypeOf((*MockSyncTree)(nil).SetFlusher), flusher) } // SetListener mocks base method. -func (m *MockSyncTree) SetListener(arg0 updatelistener.UpdateListener) { +func (m *MockSyncTree) SetListener(listener updatelistener.UpdateListener) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetListener", arg0) + m.ctrl.Call(m, "SetListener", listener) } // SetListener indicates an expected call of SetListener. -func (mr *MockSyncTreeMockRecorder) SetListener(arg0 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) SetListener(listener any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetListener", reflect.TypeOf((*MockSyncTree)(nil).SetListener), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetListener", reflect.TypeOf((*MockSyncTree)(nil).SetListener), listener) } // SnapshotPath mocks base method. @@ -495,32 +497,32 @@ func (mr *MockSyncTreeMockRecorder) Storage() *gomock.Call { } // SyncWithPeer mocks base method. -func (m *MockSyncTree) SyncWithPeer(arg0 context.Context, arg1 peer.Peer) error { +func (m *MockSyncTree) SyncWithPeer(ctx context.Context, p peer.Peer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncWithPeer", arg0, arg1) + ret := m.ctrl.Call(m, "SyncWithPeer", ctx, p) ret0, _ := ret[0].(error) return ret0 } // SyncWithPeer indicates an expected call of SyncWithPeer. -func (mr *MockSyncTreeMockRecorder) SyncWithPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) SyncWithPeer(ctx, p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncWithPeer", reflect.TypeOf((*MockSyncTree)(nil).SyncWithPeer), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncWithPeer", reflect.TypeOf((*MockSyncTree)(nil).SyncWithPeer), ctx, p) } // TryClose mocks base method. -func (m *MockSyncTree) TryClose(arg0 time.Duration) (bool, error) { +func (m *MockSyncTree) TryClose(objectTTL time.Duration) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryClose", arg0) + ret := m.ctrl.Call(m, "TryClose", objectTTL) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // TryClose indicates an expected call of TryClose. -func (mr *MockSyncTreeMockRecorder) TryClose(arg0 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) TryClose(objectTTL any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockSyncTree)(nil).TryClose), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockSyncTree)(nil).TryClose), objectTTL) } // TryLock mocks base method. @@ -564,24 +566,25 @@ func (mr *MockSyncTreeMockRecorder) UnmarshalledHeader() *gomock.Call { } // UnpackChange mocks base method. -func (m *MockSyncTree) UnpackChange(arg0 *treechangeproto.RawTreeChangeWithId) ([]byte, error) { +func (m *MockSyncTree) UnpackChange(raw *treechangeproto.RawTreeChangeWithId) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UnpackChange", arg0) + ret := m.ctrl.Call(m, "UnpackChange", raw) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // UnpackChange indicates an expected call of UnpackChange. -func (mr *MockSyncTreeMockRecorder) UnpackChange(arg0 any) *gomock.Call { +func (mr *MockSyncTreeMockRecorder) UnpackChange(raw any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackChange", reflect.TypeOf((*MockSyncTree)(nil).UnpackChange), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackChange", reflect.TypeOf((*MockSyncTree)(nil).UnpackChange), raw) } // MockHeadNotifiable is a mock of HeadNotifiable interface. type MockHeadNotifiable struct { ctrl *gomock.Controller recorder *MockHeadNotifiableMockRecorder + isgomock struct{} } // MockHeadNotifiableMockRecorder is the mock recorder for MockHeadNotifiable. @@ -602,21 +605,22 @@ func (m *MockHeadNotifiable) EXPECT() *MockHeadNotifiableMockRecorder { } // UpdateHeads mocks base method. -func (m *MockHeadNotifiable) UpdateHeads(arg0 string, arg1 []string) { +func (m *MockHeadNotifiable) UpdateHeads(id string, heads []string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "UpdateHeads", arg0, arg1) + m.ctrl.Call(m, "UpdateHeads", id, heads) } // UpdateHeads indicates an expected call of UpdateHeads. -func (mr *MockHeadNotifiableMockRecorder) UpdateHeads(arg0, arg1 any) *gomock.Call { +func (mr *MockHeadNotifiableMockRecorder) UpdateHeads(id, heads any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateHeads", reflect.TypeOf((*MockHeadNotifiable)(nil).UpdateHeads), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateHeads", reflect.TypeOf((*MockHeadNotifiable)(nil).UpdateHeads), id, heads) } // MockSyncClient is a mock of SyncClient interface. type MockSyncClient struct { ctrl *gomock.Controller recorder *MockSyncClientMockRecorder + isgomock struct{} } // MockSyncClientMockRecorder is the mock recorder for MockSyncClient. @@ -637,110 +641,111 @@ func (m *MockSyncClient) EXPECT() *MockSyncClientMockRecorder { } // Broadcast mocks base method. -func (m *MockSyncClient) Broadcast(arg0 context.Context, arg1 *objectmessages.HeadUpdate) error { +func (m *MockSyncClient) Broadcast(ctx context.Context, headUpdate *objectmessages.HeadUpdate) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Broadcast", arg0, arg1) + ret := m.ctrl.Call(m, "Broadcast", ctx, headUpdate) ret0, _ := ret[0].(error) return ret0 } // Broadcast indicates an expected call of Broadcast. -func (mr *MockSyncClientMockRecorder) Broadcast(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) Broadcast(ctx, headUpdate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broadcast", reflect.TypeOf((*MockSyncClient)(nil).Broadcast), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broadcast", reflect.TypeOf((*MockSyncClient)(nil).Broadcast), ctx, headUpdate) } // CreateFullSyncRequest mocks base method. -func (m *MockSyncClient) CreateFullSyncRequest(arg0 string, arg1 objecttree.ObjectTree) (*objectmessages.Request, error) { +func (m *MockSyncClient) CreateFullSyncRequest(peerId string, t objecttree.ObjectTree) (*objectmessages.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateFullSyncRequest", arg0, arg1) + ret := m.ctrl.Call(m, "CreateFullSyncRequest", peerId, t) ret0, _ := ret[0].(*objectmessages.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateFullSyncRequest indicates an expected call of CreateFullSyncRequest. -func (mr *MockSyncClientMockRecorder) CreateFullSyncRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateFullSyncRequest(peerId, t any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncRequest), peerId, t) } // CreateHeadUpdate mocks base method. -func (m *MockSyncClient) CreateHeadUpdate(arg0 objecttree.ObjectTree, arg1 string, arg2 []*treechangeproto.RawTreeChangeWithId) (*objectmessages.HeadUpdate, error) { +func (m *MockSyncClient) CreateHeadUpdate(t objecttree.ObjectTree, ignoredPeer string, added []*treechangeproto.RawTreeChangeWithId) (*objectmessages.HeadUpdate, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHeadUpdate", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateHeadUpdate", t, ignoredPeer, added) ret0, _ := ret[0].(*objectmessages.HeadUpdate) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateHeadUpdate indicates an expected call of CreateHeadUpdate. -func (mr *MockSyncClientMockRecorder) CreateHeadUpdate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateHeadUpdate(t, ignoredPeer, added any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockSyncClient)(nil).CreateHeadUpdate), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockSyncClient)(nil).CreateHeadUpdate), t, ignoredPeer, added) } // CreateNewTreeRequest mocks base method. -func (m *MockSyncClient) CreateNewTreeRequest(arg0, arg1 string) *objectmessages.Request { +func (m *MockSyncClient) CreateNewTreeRequest(peerId, objectId string) *objectmessages.Request { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateNewTreeRequest", arg0, arg1) + ret := m.ctrl.Call(m, "CreateNewTreeRequest", peerId, objectId) ret0, _ := ret[0].(*objectmessages.Request) return ret0 } // CreateNewTreeRequest indicates an expected call of CreateNewTreeRequest. -func (mr *MockSyncClientMockRecorder) CreateNewTreeRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateNewTreeRequest(peerId, objectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNewTreeRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateNewTreeRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNewTreeRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateNewTreeRequest), peerId, objectId) } // CreateResponseProducer mocks base method. -func (m *MockSyncClient) CreateResponseProducer(arg0 objecttree.ObjectTree, arg1, arg2 []string) (response.ResponseProducer, error) { +func (m *MockSyncClient) CreateResponseProducer(t objecttree.ObjectTree, theirHeads, theirSnapshotPath []string) (response.ResponseProducer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateResponseProducer", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateResponseProducer", t, theirHeads, theirSnapshotPath) ret0, _ := ret[0].(response.ResponseProducer) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateResponseProducer indicates an expected call of CreateResponseProducer. -func (mr *MockSyncClientMockRecorder) CreateResponseProducer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) CreateResponseProducer(t, theirHeads, theirSnapshotPath any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResponseProducer", reflect.TypeOf((*MockSyncClient)(nil).CreateResponseProducer), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResponseProducer", reflect.TypeOf((*MockSyncClient)(nil).CreateResponseProducer), t, theirHeads, theirSnapshotPath) } // QueueRequest mocks base method. -func (m *MockSyncClient) QueueRequest(arg0 context.Context, arg1 syncdeps.Request) error { +func (m *MockSyncClient) QueueRequest(ctx context.Context, req syncdeps.Request) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueueRequest", arg0, arg1) + ret := m.ctrl.Call(m, "QueueRequest", ctx, req) ret0, _ := ret[0].(error) return ret0 } // QueueRequest indicates an expected call of QueueRequest. -func (mr *MockSyncClientMockRecorder) QueueRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) QueueRequest(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueRequest", reflect.TypeOf((*MockSyncClient)(nil).QueueRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueRequest", reflect.TypeOf((*MockSyncClient)(nil).QueueRequest), ctx, req) } // SendTreeRequest mocks base method. -func (m *MockSyncClient) SendTreeRequest(arg0 context.Context, arg1 syncdeps.Request, arg2 syncdeps.ResponseCollector) error { +func (m *MockSyncClient) SendTreeRequest(ctx context.Context, req syncdeps.Request, collector syncdeps.ResponseCollector) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendTreeRequest", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SendTreeRequest", ctx, req, collector) ret0, _ := ret[0].(error) return ret0 } // SendTreeRequest indicates an expected call of SendTreeRequest. -func (mr *MockSyncClientMockRecorder) SendTreeRequest(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSyncClientMockRecorder) SendTreeRequest(ctx, req, collector any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTreeRequest", reflect.TypeOf((*MockSyncClient)(nil).SendTreeRequest), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTreeRequest", reflect.TypeOf((*MockSyncClient)(nil).SendTreeRequest), ctx, req, collector) } // MockRequestFactory is a mock of RequestFactory interface. type MockRequestFactory struct { ctrl *gomock.Controller recorder *MockRequestFactoryMockRecorder + isgomock struct{} } // MockRequestFactoryMockRecorder is the mock recorder for MockRequestFactory. @@ -761,60 +766,60 @@ func (m *MockRequestFactory) EXPECT() *MockRequestFactoryMockRecorder { } // CreateFullSyncRequest mocks base method. -func (m *MockRequestFactory) CreateFullSyncRequest(arg0 string, arg1 objecttree.ObjectTree) (*objectmessages.Request, error) { +func (m *MockRequestFactory) CreateFullSyncRequest(peerId string, t objecttree.ObjectTree) (*objectmessages.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateFullSyncRequest", arg0, arg1) + ret := m.ctrl.Call(m, "CreateFullSyncRequest", peerId, t) ret0, _ := ret[0].(*objectmessages.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateFullSyncRequest indicates an expected call of CreateFullSyncRequest. -func (mr *MockRequestFactoryMockRecorder) CreateFullSyncRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockRequestFactoryMockRecorder) CreateFullSyncRequest(peerId, t any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockRequestFactory)(nil).CreateFullSyncRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockRequestFactory)(nil).CreateFullSyncRequest), peerId, t) } // CreateHeadUpdate mocks base method. -func (m *MockRequestFactory) CreateHeadUpdate(arg0 objecttree.ObjectTree, arg1 string, arg2 []*treechangeproto.RawTreeChangeWithId) (*objectmessages.HeadUpdate, error) { +func (m *MockRequestFactory) CreateHeadUpdate(t objecttree.ObjectTree, ignoredPeer string, added []*treechangeproto.RawTreeChangeWithId) (*objectmessages.HeadUpdate, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHeadUpdate", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateHeadUpdate", t, ignoredPeer, added) ret0, _ := ret[0].(*objectmessages.HeadUpdate) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateHeadUpdate indicates an expected call of CreateHeadUpdate. -func (mr *MockRequestFactoryMockRecorder) CreateHeadUpdate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRequestFactoryMockRecorder) CreateHeadUpdate(t, ignoredPeer, added any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockRequestFactory)(nil).CreateHeadUpdate), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockRequestFactory)(nil).CreateHeadUpdate), t, ignoredPeer, added) } // CreateNewTreeRequest mocks base method. -func (m *MockRequestFactory) CreateNewTreeRequest(arg0, arg1 string) *objectmessages.Request { +func (m *MockRequestFactory) CreateNewTreeRequest(peerId, objectId string) *objectmessages.Request { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateNewTreeRequest", arg0, arg1) + ret := m.ctrl.Call(m, "CreateNewTreeRequest", peerId, objectId) ret0, _ := ret[0].(*objectmessages.Request) return ret0 } // CreateNewTreeRequest indicates an expected call of CreateNewTreeRequest. -func (mr *MockRequestFactoryMockRecorder) CreateNewTreeRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockRequestFactoryMockRecorder) CreateNewTreeRequest(peerId, objectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNewTreeRequest", reflect.TypeOf((*MockRequestFactory)(nil).CreateNewTreeRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNewTreeRequest", reflect.TypeOf((*MockRequestFactory)(nil).CreateNewTreeRequest), peerId, objectId) } // CreateResponseProducer mocks base method. -func (m *MockRequestFactory) CreateResponseProducer(arg0 objecttree.ObjectTree, arg1, arg2 []string) (response.ResponseProducer, error) { +func (m *MockRequestFactory) CreateResponseProducer(t objecttree.ObjectTree, theirHeads, theirSnapshotPath []string) (response.ResponseProducer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateResponseProducer", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateResponseProducer", t, theirHeads, theirSnapshotPath) ret0, _ := ret[0].(response.ResponseProducer) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateResponseProducer indicates an expected call of CreateResponseProducer. -func (mr *MockRequestFactoryMockRecorder) CreateResponseProducer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRequestFactoryMockRecorder) CreateResponseProducer(t, theirHeads, theirSnapshotPath any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResponseProducer", reflect.TypeOf((*MockRequestFactory)(nil).CreateResponseProducer), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResponseProducer", reflect.TypeOf((*MockRequestFactory)(nil).CreateResponseProducer), t, theirHeads, theirSnapshotPath) } diff --git a/commonspace/object/tree/synctree/request.go b/commonspace/object/tree/synctree/request.go index 3642c67b9..3f092915d 100644 --- a/commonspace/object/tree/synctree/request.go +++ b/commonspace/object/tree/synctree/request.go @@ -35,5 +35,5 @@ func (r *InnerRequest) Marshall() ([]byte, error) { SnapshotPath: r.snapshotPath, } req := treechangeproto.WrapFullRequest(msg, r.root) - return req.Marshal() + return req.MarshalVT() } diff --git a/commonspace/object/tree/synctree/response/mock_response/mock_response.go b/commonspace/object/tree/synctree/response/mock_response/mock_response.go index b5d239a46..cd693c4a7 100644 --- a/commonspace/object/tree/synctree/response/mock_response/mock_response.go +++ b/commonspace/object/tree/synctree/response/mock_response/mock_response.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_response/mock_response.go github.com/anyproto/any-sync/commonspace/object/tree/synctree/response ResponseProducer // + // Package mock_response is a generated GoMock package. package mock_response @@ -19,6 +20,7 @@ import ( type MockResponseProducer struct { ctrl *gomock.Controller recorder *MockResponseProducerMockRecorder + isgomock struct{} } // MockResponseProducerMockRecorder is the mock recorder for MockResponseProducer. @@ -54,16 +56,16 @@ func (mr *MockResponseProducerMockRecorder) EmptyResponse() *gomock.Call { } // NewResponse mocks base method. -func (m *MockResponseProducer) NewResponse(arg0 int) (*response.Response, error) { +func (m *MockResponseProducer) NewResponse(batchSize int) (*response.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NewResponse", arg0) + ret := m.ctrl.Call(m, "NewResponse", batchSize) ret0, _ := ret[0].(*response.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // NewResponse indicates an expected call of NewResponse. -func (mr *MockResponseProducerMockRecorder) NewResponse(arg0 any) *gomock.Call { +func (mr *MockResponseProducerMockRecorder) NewResponse(batchSize any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResponse", reflect.TypeOf((*MockResponseProducer)(nil).NewResponse), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResponse", reflect.TypeOf((*MockResponseProducer)(nil).NewResponse), batchSize) } diff --git a/commonspace/object/tree/synctree/response/response.go b/commonspace/object/tree/synctree/response/response.go index f67cee754..4af06ced3 100644 --- a/commonspace/object/tree/synctree/response/response.go +++ b/commonspace/object/tree/synctree/response/response.go @@ -3,10 +3,9 @@ package response import ( "fmt" - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "github.com/anyproto/any-sync/protobuf" ) type Response struct { @@ -30,7 +29,7 @@ func (r *Response) MsgSize() uint64 { return size + uint64(len(r.Heads))*cidLen } -func (r *Response) ProtoMessage() (proto.Message, error) { +func (r *Response) ProtoMessage() (protobuf.Message, error) { if r.ObjectId == "" { return &spacesyncproto.ObjectSyncMessage{}, nil } @@ -43,7 +42,7 @@ func (r *Response) ProtoMessage() (proto.Message, error) { return spacesyncproto.MarshallSyncMessage(wrapped, r.SpaceId, r.ObjectId) } -func (r *Response) SetProtoMessage(message proto.Message) error { +func (r *Response) SetProtoMessage(message protobuf.Message) error { var ( msg *spacesyncproto.ObjectSyncMessage ok bool @@ -52,7 +51,7 @@ func (r *Response) SetProtoMessage(message proto.Message) error { return fmt.Errorf("unexpected message type: %T", message) } treeMsg := &treechangeproto.TreeSyncMessage{} - err := proto.Unmarshal(msg.Payload, treeMsg) + err := treeMsg.UnmarshalVT(msg.Payload) if err != nil { return err } diff --git a/commonspace/object/tree/synctree/synchandler.go b/commonspace/object/tree/synctree/synchandler.go index 4b0c0fc03..0edeb7d91 100644 --- a/commonspace/object/tree/synctree/synchandler.go +++ b/commonspace/object/tree/synctree/synchandler.go @@ -3,8 +3,8 @@ package synctree import ( "context" "errors" + "google.golang.org/protobuf/proto" - "github.com/anyproto/protobuf/proto" "go.uber.org/zap" "storj.io/drpc" @@ -57,7 +57,7 @@ func (s *syncHandler) HandleHeadUpdate(ctx context.Context, statusUpdater syncst return nil, err } treeSyncMsg := &treechangeproto.TreeSyncMessage{} - err = proto.Unmarshal(update.Bytes, treeSyncMsg) + err = treeSyncMsg.UnmarshalVT(update.Bytes) if err != nil { return nil, err } @@ -105,7 +105,7 @@ func (s *syncHandler) HandleStreamRequest(ctx context.Context, rq syncdeps.Reque return nil, ErrUnexpectedRequestType } treeSyncMsg := &treechangeproto.TreeSyncMessage{} - err := proto.Unmarshal(req.Bytes, treeSyncMsg) + err := treeSyncMsg.UnmarshalVT(req.Bytes) if err != nil { return nil, err } diff --git a/commonspace/object/tree/synctree/synchandler_test.go b/commonspace/object/tree/synctree/synchandler_test.go index 2c3b7331d..1bbbcbb06 100644 --- a/commonspace/object/tree/synctree/synchandler_test.go +++ b/commonspace/object/tree/synctree/synchandler_test.go @@ -1,9 +1,9 @@ package synctree import ( + "google.golang.org/protobuf/proto" "testing" - "github.com/anyproto/protobuf/proto" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -39,7 +39,7 @@ func TestSyncHandler_HeadUpdate(t *testing.T) { SnapshotPath: []string{rawCh.Id}, } wrapped := treechangeproto.WrapHeadUpdate(treeHeadUpdate, rawCh.RawTreeChangeWithId()) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) headUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -81,7 +81,7 @@ func TestSyncHandler_HeadUpdate(t *testing.T) { SnapshotPath: []string{rawCh.Id}, } wrapped := treechangeproto.WrapHeadUpdate(treeHeadUpdate, rawCh.RawTreeChangeWithId()) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) headUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -125,7 +125,7 @@ func TestSyncHandler_HeadUpdate(t *testing.T) { SnapshotPath: []string{rawCh.Id}, } wrapped := treechangeproto.WrapHeadUpdate(treeHeadUpdate, rawCh) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) headUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -156,7 +156,7 @@ func TestSyncHandler_HeadUpdate(t *testing.T) { SnapshotPath: []string{rawCh.Id}, } wrapped := treechangeproto.WrapHeadUpdate(treeHeadUpdate, rawCh) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) headUpdate := &objectmessages.HeadUpdate{ Bytes: marshaled, @@ -195,7 +195,7 @@ func TestSyncHandler_HandleStreamRequest(t *testing.T) { Id: "chId", } wrapped := treechangeproto.WrapFullRequest(fullRequest, nil) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) request := objectmessages.NewByteRequest("peerId", "spaceId", "objectId", marshaled) producer := mock_response.NewMockResponseProducer(fx.ctrl) @@ -237,7 +237,7 @@ func TestSyncHandler_HandleStreamRequest(t *testing.T) { Id: "chId", } wrapped := treechangeproto.WrapFullRequest(fullRequest, nil) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) request := objectmessages.NewByteRequest("peerId", "spaceId", "objectId", marshaled) producer := mock_response.NewMockResponseProducer(fx.ctrl) @@ -273,7 +273,7 @@ func TestSyncHandler_HandleStreamRequest(t *testing.T) { Heads: heads, } wrapped := treechangeproto.WrapFullRequest(fullRequest, nil) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) request := objectmessages.NewByteRequest("peerId", "spaceId", "objectId", marshaled) producer := mock_response.NewMockResponseProducer(fx.ctrl) @@ -308,7 +308,7 @@ func TestSyncHandler_HandleStreamRequest(t *testing.T) { Heads: heads, } wrapped := treechangeproto.WrapFullRequest(fullRequest, nil) - marshaled, err := wrapped.Marshal() + marshaled, err := wrapped.MarshalVT() require.NoError(t, err) request := objectmessages.NewByteRequest("peerId", "spaceId", "objectId", marshaled) producer := mock_response.NewMockResponseProducer(fx.ctrl) diff --git a/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go b/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go index ed385b79c..3df1769c2 100644 --- a/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go +++ b/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_updatelistener/mock_updatelistener.go github.com/anyproto/any-sync/commonspace/object/tree/synctree/updatelistener UpdateListener // + // Package mock_updatelistener is a generated GoMock package. package mock_updatelistener @@ -19,6 +20,7 @@ import ( type MockUpdateListener struct { ctrl *gomock.Controller recorder *MockUpdateListenerMockRecorder + isgomock struct{} } // MockUpdateListenerMockRecorder is the mock recorder for MockUpdateListener. @@ -39,29 +41,29 @@ func (m *MockUpdateListener) EXPECT() *MockUpdateListenerMockRecorder { } // Rebuild mocks base method. -func (m *MockUpdateListener) Rebuild(arg0 objecttree.ObjectTree) error { +func (m *MockUpdateListener) Rebuild(tree objecttree.ObjectTree) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Rebuild", arg0) + ret := m.ctrl.Call(m, "Rebuild", tree) ret0, _ := ret[0].(error) return ret0 } // Rebuild indicates an expected call of Rebuild. -func (mr *MockUpdateListenerMockRecorder) Rebuild(arg0 any) *gomock.Call { +func (mr *MockUpdateListenerMockRecorder) Rebuild(tree any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rebuild", reflect.TypeOf((*MockUpdateListener)(nil).Rebuild), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rebuild", reflect.TypeOf((*MockUpdateListener)(nil).Rebuild), tree) } // Update mocks base method. -func (m *MockUpdateListener) Update(arg0 objecttree.ObjectTree) error { +func (m *MockUpdateListener) Update(tree objecttree.ObjectTree) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0) + ret := m.ctrl.Call(m, "Update", tree) ret0, _ := ret[0].(error) return ret0 } // Update indicates an expected call of Update. -func (mr *MockUpdateListenerMockRecorder) Update(arg0 any) *gomock.Call { +func (mr *MockUpdateListenerMockRecorder) Update(tree any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUpdateListener)(nil).Update), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUpdateListener)(nil).Update), tree) } diff --git a/commonspace/object/tree/treechangeproto/treechange.pb.go b/commonspace/object/tree/treechangeproto/treechange.pb.go index f3e81f99c..c288cbf85 100644 --- a/commonspace/object/tree/treechangeproto/treechange.pb.go +++ b/commonspace/object/tree/treechangeproto/treechange.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: commonspace/object/tree/treechangeproto/protos/treechange.proto +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 +// source: treechange.proto package treechangeproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ErrorCodes int32 @@ -31,30 +30,52 @@ const ( ErrorCodes_ErrorOffset ErrorCodes = 400 ) -var ErrorCodes_name = map[int32]string{ - 0: "Unexpected", - 1: "GetTreeError", - 2: "FullSyncRequestError", - 400: "ErrorOffset", -} +// Enum value maps for ErrorCodes. +var ( + ErrorCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "GetTreeError", + 2: "FullSyncRequestError", + 400: "ErrorOffset", + } + ErrorCodes_value = map[string]int32{ + "Unexpected": 0, + "GetTreeError": 1, + "FullSyncRequestError": 2, + "ErrorOffset": 400, + } +) -var ErrorCodes_value = map[string]int32{ - "Unexpected": 0, - "GetTreeError": 1, - "FullSyncRequestError": 2, - "ErrorOffset": 400, +func (x ErrorCodes) Enum() *ErrorCodes { + p := new(ErrorCodes) + *p = x + return p } func (x ErrorCodes) String() string { - return proto.EnumName(ErrorCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCodes) Descriptor() protoreflect.EnumDescriptor { + return file_treechange_proto_enumTypes[0].Descriptor() +} + +func (ErrorCodes) Type() protoreflect.EnumType { + return &file_treechange_proto_enumTypes[0] +} + +func (x ErrorCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ErrorCodes.Descriptor instead. func (ErrorCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{0} + return file_treechange_proto_rawDescGZIP(), []int{0} } // RootChange is a root of a tree type RootChange struct { + state protoimpl.MessageState `protogen:"open.v1"` // AclHeadId is a cid of latest acl record at the time of tree creation AclHeadId string `protobuf:"bytes,1,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"` // SpaceId is an id of space where the document is placed @@ -70,108 +91,100 @@ type RootChange struct { // ChangePayload is a payload related to ChangeType ChangePayload []byte `protobuf:"bytes,7,opt,name=changePayload,proto3" json:"changePayload,omitempty"` // IsDerived tells if the tree is derived - IsDerived bool `protobuf:"varint,8,opt,name=isDerived,proto3" json:"isDerived,omitempty"` + IsDerived bool `protobuf:"varint,8,opt,name=isDerived,proto3" json:"isDerived,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RootChange) Reset() { *m = RootChange{} } -func (m *RootChange) String() string { return proto.CompactTextString(m) } -func (*RootChange) ProtoMessage() {} -func (*RootChange) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{0} -} -func (m *RootChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RootChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RootChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *RootChange) Reset() { + *x = RootChange{} + mi := &file_treechange_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RootChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *RootChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_RootChange.Merge(m, src) -} -func (m *RootChange) XXX_Size() int { - return m.Size() + +func (x *RootChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RootChange) XXX_DiscardUnknown() { - xxx_messageInfo_RootChange.DiscardUnknown(m) + +func (*RootChange) ProtoMessage() {} + +func (x *RootChange) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RootChange proto.InternalMessageInfo +// Deprecated: Use RootChange.ProtoReflect.Descriptor instead. +func (*RootChange) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{0} +} -func (m *RootChange) GetAclHeadId() string { - if m != nil { - return m.AclHeadId +func (x *RootChange) GetAclHeadId() string { + if x != nil { + return x.AclHeadId } return "" } -func (m *RootChange) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *RootChange) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *RootChange) GetChangeType() string { - if m != nil { - return m.ChangeType +func (x *RootChange) GetChangeType() string { + if x != nil { + return x.ChangeType } return "" } -func (m *RootChange) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *RootChange) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *RootChange) GetSeed() []byte { - if m != nil { - return m.Seed +func (x *RootChange) GetSeed() []byte { + if x != nil { + return x.Seed } return nil } -func (m *RootChange) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *RootChange) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *RootChange) GetChangePayload() []byte { - if m != nil { - return m.ChangePayload +func (x *RootChange) GetChangePayload() []byte { + if x != nil { + return x.ChangePayload } return nil } -func (m *RootChange) GetIsDerived() bool { - if m != nil { - return m.IsDerived +func (x *RootChange) GetIsDerived() bool { + if x != nil { + return x.IsDerived } return false } // TreeChange is a change of a tree type TreeChange struct { + state protoimpl.MessageState `protogen:"open.v1"` // TreeHeadIds are previous ids for this TreeChange TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"` // AclHeadId is a cid of latest acl record at the time of this change @@ -189,115 +202,107 @@ type TreeChange struct { // IsSnapshot indicates whether this change contains a snapshot of state IsSnapshot bool `protobuf:"varint,8,opt,name=isSnapshot,proto3" json:"isSnapshot,omitempty"` // DataType indicates some special parameters of data for the client - DataType string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"` + DataType string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeChange) Reset() { *m = TreeChange{} } -func (m *TreeChange) String() string { return proto.CompactTextString(m) } -func (*TreeChange) ProtoMessage() {} -func (*TreeChange) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{1} -} -func (m *TreeChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *TreeChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeChange.Merge(m, src) +func (x *TreeChange) Reset() { + *x = TreeChange{} + mi := &file_treechange_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeChange) XXX_Size() int { - return m.Size() + +func (x *TreeChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeChange) XXX_DiscardUnknown() { - xxx_messageInfo_TreeChange.DiscardUnknown(m) + +func (*TreeChange) ProtoMessage() {} + +func (x *TreeChange) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TreeChange proto.InternalMessageInfo +// Deprecated: Use TreeChange.ProtoReflect.Descriptor instead. +func (*TreeChange) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{1} +} -func (m *TreeChange) GetTreeHeadIds() []string { - if m != nil { - return m.TreeHeadIds +func (x *TreeChange) GetTreeHeadIds() []string { + if x != nil { + return x.TreeHeadIds } return nil } -func (m *TreeChange) GetAclHeadId() string { - if m != nil { - return m.AclHeadId +func (x *TreeChange) GetAclHeadId() string { + if x != nil { + return x.AclHeadId } return "" } -func (m *TreeChange) GetSnapshotBaseId() string { - if m != nil { - return m.SnapshotBaseId +func (x *TreeChange) GetSnapshotBaseId() string { + if x != nil { + return x.SnapshotBaseId } return "" } -func (m *TreeChange) GetChangesData() []byte { - if m != nil { - return m.ChangesData +func (x *TreeChange) GetChangesData() []byte { + if x != nil { + return x.ChangesData } return nil } -func (m *TreeChange) GetReadKeyId() string { - if m != nil { - return m.ReadKeyId +func (x *TreeChange) GetReadKeyId() string { + if x != nil { + return x.ReadKeyId } return "" } -func (m *TreeChange) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *TreeChange) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *TreeChange) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *TreeChange) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *TreeChange) GetIsSnapshot() bool { - if m != nil { - return m.IsSnapshot +func (x *TreeChange) GetIsSnapshot() bool { + if x != nil { + return x.IsSnapshot } return false } -func (m *TreeChange) GetDataType() string { - if m != nil { - return m.DataType +func (x *TreeChange) GetDataType() string { + if x != nil { + return x.DataType } return "" } // TreeChange is a change of a tree type NoDataTreeChange struct { + state protoimpl.MessageState `protogen:"open.v1"` // TreeHeadIds are previous ids for this TreeChange TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"` // AclHeadId is a cid of latest acl record at the time of this change @@ -313,4266 +318,927 @@ type NoDataTreeChange struct { // IsSnapshot indicates whether this change contains a snapshot of state IsSnapshot bool `protobuf:"varint,8,opt,name=isSnapshot,proto3" json:"isSnapshot,omitempty"` // DataType indicates some special parameters of data for the client - DataType string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"` + DataType string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NoDataTreeChange) Reset() { *m = NoDataTreeChange{} } -func (m *NoDataTreeChange) String() string { return proto.CompactTextString(m) } -func (*NoDataTreeChange) ProtoMessage() {} -func (*NoDataTreeChange) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{2} -} -func (m *NoDataTreeChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoDataTreeChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoDataTreeChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NoDataTreeChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *NoDataTreeChange) Reset() { + *x = NoDataTreeChange{} + mi := &file_treechange_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NoDataTreeChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoDataTreeChange.Merge(m, src) -} -func (m *NoDataTreeChange) XXX_Size() int { - return m.Size() + +func (x *NoDataTreeChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NoDataTreeChange) XXX_DiscardUnknown() { - xxx_messageInfo_NoDataTreeChange.DiscardUnknown(m) + +func (*NoDataTreeChange) ProtoMessage() {} + +func (x *NoDataTreeChange) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NoDataTreeChange proto.InternalMessageInfo +// Deprecated: Use NoDataTreeChange.ProtoReflect.Descriptor instead. +func (*NoDataTreeChange) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{2} +} -func (m *NoDataTreeChange) GetTreeHeadIds() []string { - if m != nil { - return m.TreeHeadIds +func (x *NoDataTreeChange) GetTreeHeadIds() []string { + if x != nil { + return x.TreeHeadIds } return nil } -func (m *NoDataTreeChange) GetAclHeadId() string { - if m != nil { - return m.AclHeadId +func (x *NoDataTreeChange) GetAclHeadId() string { + if x != nil { + return x.AclHeadId } return "" } -func (m *NoDataTreeChange) GetSnapshotBaseId() string { - if m != nil { - return m.SnapshotBaseId +func (x *NoDataTreeChange) GetSnapshotBaseId() string { + if x != nil { + return x.SnapshotBaseId } return "" } -func (m *NoDataTreeChange) GetReadKeyId() string { - if m != nil { - return m.ReadKeyId +func (x *NoDataTreeChange) GetReadKeyId() string { + if x != nil { + return x.ReadKeyId } return "" } -func (m *NoDataTreeChange) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *NoDataTreeChange) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *NoDataTreeChange) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *NoDataTreeChange) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *NoDataTreeChange) GetIsSnapshot() bool { - if m != nil { - return m.IsSnapshot +func (x *NoDataTreeChange) GetIsSnapshot() bool { + if x != nil { + return x.IsSnapshot } return false } -func (m *NoDataTreeChange) GetDataType() string { - if m != nil { - return m.DataType +func (x *NoDataTreeChange) GetDataType() string { + if x != nil { + return x.DataType } return "" } type ReducedTreeChange struct { + state protoimpl.MessageState `protogen:"open.v1"` // TreeHeadIds are previous ids for this TreeChange - TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"` + TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *ReducedTreeChange) Reset() { *m = ReducedTreeChange{} } -func (m *ReducedTreeChange) String() string { return proto.CompactTextString(m) } -func (*ReducedTreeChange) ProtoMessage() {} -func (*ReducedTreeChange) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{3} -} -func (m *ReducedTreeChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReducedTreeChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ReducedTreeChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *ReducedTreeChange) Reset() { + *x = ReducedTreeChange{} + mi := &file_treechange_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *ReducedTreeChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *ReducedTreeChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReducedTreeChange.Merge(m, src) -} -func (m *ReducedTreeChange) XXX_Size() int { - return m.Size() + +func (x *ReducedTreeChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ReducedTreeChange) XXX_DiscardUnknown() { - xxx_messageInfo_ReducedTreeChange.DiscardUnknown(m) + +func (*ReducedTreeChange) ProtoMessage() {} + +func (x *ReducedTreeChange) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ReducedTreeChange proto.InternalMessageInfo +// Deprecated: Use ReducedTreeChange.ProtoReflect.Descriptor instead. +func (*ReducedTreeChange) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{3} +} -func (m *ReducedTreeChange) GetTreeHeadIds() []string { - if m != nil { - return m.TreeHeadIds +func (x *ReducedTreeChange) GetTreeHeadIds() []string { + if x != nil { + return x.TreeHeadIds } return nil } // RawTreeChange is a marshalled TreeChange (or RootChange) payload and a signature of this payload type RawTreeChange struct { + state protoimpl.MessageState `protogen:"open.v1"` // Payload is a byte payload containing TreeChange Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // Signature is a signature made by identity indicated in the TreeChange payload - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RawTreeChange) Reset() { *m = RawTreeChange{} } -func (m *RawTreeChange) String() string { return proto.CompactTextString(m) } -func (*RawTreeChange) ProtoMessage() {} -func (*RawTreeChange) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{4} -} -func (m *RawTreeChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawTreeChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RawTreeChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RawTreeChange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *RawTreeChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawTreeChange.Merge(m, src) +func (x *RawTreeChange) Reset() { + *x = RawTreeChange{} + mi := &file_treechange_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RawTreeChange) XXX_Size() int { - return m.Size() + +func (x *RawTreeChange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RawTreeChange) XXX_DiscardUnknown() { - xxx_messageInfo_RawTreeChange.DiscardUnknown(m) + +func (*RawTreeChange) ProtoMessage() {} + +func (x *RawTreeChange) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RawTreeChange proto.InternalMessageInfo +// Deprecated: Use RawTreeChange.ProtoReflect.Descriptor instead. +func (*RawTreeChange) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{4} +} -func (m *RawTreeChange) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *RawTreeChange) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *RawTreeChange) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *RawTreeChange) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } // RawTreeChangeWithId is a marshalled RawTreeChange with CID type RawTreeChangeWithId struct { + state protoimpl.MessageState `protogen:"open.v1"` // RawChange is a byte payload of RawTreeChange RawChange []byte `protobuf:"bytes,1,opt,name=rawChange,proto3" json:"rawChange,omitempty"` // Id is a cid made from rawChange payload - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RawTreeChangeWithId) Reset() { *m = RawTreeChangeWithId{} } -func (m *RawTreeChangeWithId) String() string { return proto.CompactTextString(m) } -func (*RawTreeChangeWithId) ProtoMessage() {} -func (*RawTreeChangeWithId) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{5} -} -func (m *RawTreeChangeWithId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawTreeChangeWithId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RawTreeChangeWithId.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RawTreeChangeWithId) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *RawTreeChangeWithId) Reset() { + *x = RawTreeChangeWithId{} + mi := &file_treechange_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RawTreeChangeWithId) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawTreeChangeWithId.Merge(m, src) -} -func (m *RawTreeChangeWithId) XXX_Size() int { - return m.Size() + +func (x *RawTreeChangeWithId) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RawTreeChangeWithId) XXX_DiscardUnknown() { - xxx_messageInfo_RawTreeChangeWithId.DiscardUnknown(m) + +func (*RawTreeChangeWithId) ProtoMessage() {} + +func (x *RawTreeChangeWithId) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RawTreeChangeWithId proto.InternalMessageInfo +// Deprecated: Use RawTreeChangeWithId.ProtoReflect.Descriptor instead. +func (*RawTreeChangeWithId) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{5} +} -func (m *RawTreeChangeWithId) GetRawChange() []byte { - if m != nil { - return m.RawChange +func (x *RawTreeChangeWithId) GetRawChange() []byte { + if x != nil { + return x.RawChange } return nil } -func (m *RawTreeChangeWithId) GetId() string { - if m != nil { - return m.Id +func (x *RawTreeChangeWithId) GetId() string { + if x != nil { + return x.Id } return "" } type TreeSyncMessage struct { - Content *TreeSyncContentValue `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - RootChange *RawTreeChangeWithId `protobuf:"bytes,2,opt,name=rootChange,proto3" json:"rootChange,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Content *TreeSyncContentValue `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + RootChange *RawTreeChangeWithId `protobuf:"bytes,2,opt,name=rootChange,proto3" json:"rootChange,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeSyncMessage) Reset() { *m = TreeSyncMessage{} } -func (m *TreeSyncMessage) String() string { return proto.CompactTextString(m) } -func (*TreeSyncMessage) ProtoMessage() {} -func (*TreeSyncMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{6} -} -func (m *TreeSyncMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeSyncMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeSyncMessage) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *TreeSyncMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeSyncMessage.Merge(m, src) +func (x *TreeSyncMessage) Reset() { + *x = TreeSyncMessage{} + mi := &file_treechange_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeSyncMessage) XXX_Size() int { - return m.Size() + +func (x *TreeSyncMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeSyncMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TreeSyncMessage.DiscardUnknown(m) + +func (*TreeSyncMessage) ProtoMessage() {} + +func (x *TreeSyncMessage) ProtoReflect() protoreflect.Message { + mi := &file_treechange_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) } -var xxx_messageInfo_TreeSyncMessage proto.InternalMessageInfo +// Deprecated: Use TreeSyncMessage.ProtoReflect.Descriptor instead. +func (*TreeSyncMessage) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{6} +} -func (m *TreeSyncMessage) GetContent() *TreeSyncContentValue { - if m != nil { - return m.Content +func (x *TreeSyncMessage) GetContent() *TreeSyncContentValue { + if x != nil { + return x.Content } return nil } -func (m *TreeSyncMessage) GetRootChange() *RawTreeChangeWithId { - if m != nil { - return m.RootChange +func (x *TreeSyncMessage) GetRootChange() *RawTreeChangeWithId { + if x != nil { + return x.RootChange } return nil } // TreeSyncContentValue provides different types for tree sync type TreeSyncContentValue struct { + state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Value: // // *TreeSyncContentValue_HeadUpdate // *TreeSyncContentValue_FullSyncRequest // *TreeSyncContentValue_FullSyncResponse // *TreeSyncContentValue_ErrorResponse - Value isTreeSyncContentValueValue `protobuf_oneof:"value"` + Value isTreeSyncContentValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeSyncContentValue) Reset() { *m = TreeSyncContentValue{} } -func (m *TreeSyncContentValue) String() string { return proto.CompactTextString(m) } -func (*TreeSyncContentValue) ProtoMessage() {} -func (*TreeSyncContentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{7} -} -func (m *TreeSyncContentValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeSyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeSyncContentValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeSyncContentValue) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *TreeSyncContentValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeSyncContentValue.Merge(m, src) -} -func (m *TreeSyncContentValue) XXX_Size() int { - return m.Size() +func (x *TreeSyncContentValue) Reset() { + *x = TreeSyncContentValue{} + mi := &file_treechange_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeSyncContentValue) XXX_DiscardUnknown() { - xxx_messageInfo_TreeSyncContentValue.DiscardUnknown(m) + +func (x *TreeSyncContentValue) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TreeSyncContentValue proto.InternalMessageInfo +func (*TreeSyncContentValue) ProtoMessage() {} -type isTreeSyncContentValueValue interface { - isTreeSyncContentValueValue() - MarshalTo([]byte) (int, error) - Size() int +func (x *TreeSyncContentValue) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type TreeSyncContentValue_HeadUpdate struct { - HeadUpdate *TreeHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"` -} -type TreeSyncContentValue_FullSyncRequest struct { - FullSyncRequest *TreeFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"` -} -type TreeSyncContentValue_FullSyncResponse struct { - FullSyncResponse *TreeFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"` -} -type TreeSyncContentValue_ErrorResponse struct { - ErrorResponse *TreeErrorResponse `protobuf:"bytes,4,opt,name=errorResponse,proto3,oneof" json:"errorResponse,omitempty"` +// Deprecated: Use TreeSyncContentValue.ProtoReflect.Descriptor instead. +func (*TreeSyncContentValue) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{7} } -func (*TreeSyncContentValue_HeadUpdate) isTreeSyncContentValueValue() {} -func (*TreeSyncContentValue_FullSyncRequest) isTreeSyncContentValueValue() {} -func (*TreeSyncContentValue_FullSyncResponse) isTreeSyncContentValueValue() {} -func (*TreeSyncContentValue_ErrorResponse) isTreeSyncContentValueValue() {} - -func (m *TreeSyncContentValue) GetValue() isTreeSyncContentValueValue { - if m != nil { - return m.Value +func (x *TreeSyncContentValue) GetValue() isTreeSyncContentValue_Value { + if x != nil { + return x.Value } return nil } -func (m *TreeSyncContentValue) GetHeadUpdate() *TreeHeadUpdate { - if x, ok := m.GetValue().(*TreeSyncContentValue_HeadUpdate); ok { - return x.HeadUpdate +func (x *TreeSyncContentValue) GetHeadUpdate() *TreeHeadUpdate { + if x != nil { + if x, ok := x.Value.(*TreeSyncContentValue_HeadUpdate); ok { + return x.HeadUpdate + } } return nil } -func (m *TreeSyncContentValue) GetFullSyncRequest() *TreeFullSyncRequest { - if x, ok := m.GetValue().(*TreeSyncContentValue_FullSyncRequest); ok { - return x.FullSyncRequest +func (x *TreeSyncContentValue) GetFullSyncRequest() *TreeFullSyncRequest { + if x != nil { + if x, ok := x.Value.(*TreeSyncContentValue_FullSyncRequest); ok { + return x.FullSyncRequest + } } return nil } -func (m *TreeSyncContentValue) GetFullSyncResponse() *TreeFullSyncResponse { - if x, ok := m.GetValue().(*TreeSyncContentValue_FullSyncResponse); ok { - return x.FullSyncResponse +func (x *TreeSyncContentValue) GetFullSyncResponse() *TreeFullSyncResponse { + if x != nil { + if x, ok := x.Value.(*TreeSyncContentValue_FullSyncResponse); ok { + return x.FullSyncResponse + } } return nil } -func (m *TreeSyncContentValue) GetErrorResponse() *TreeErrorResponse { - if x, ok := m.GetValue().(*TreeSyncContentValue_ErrorResponse); ok { - return x.ErrorResponse +func (x *TreeSyncContentValue) GetErrorResponse() *TreeErrorResponse { + if x != nil { + if x, ok := x.Value.(*TreeSyncContentValue_ErrorResponse); ok { + return x.ErrorResponse + } } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TreeSyncContentValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TreeSyncContentValue_HeadUpdate)(nil), - (*TreeSyncContentValue_FullSyncRequest)(nil), - (*TreeSyncContentValue_FullSyncResponse)(nil), - (*TreeSyncContentValue_ErrorResponse)(nil), - } +type isTreeSyncContentValue_Value interface { + isTreeSyncContentValue_Value() } -// TreeHeadUpdate is a message sent on document head update -type TreeHeadUpdate struct { - Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` - Changes []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` - SnapshotPath []string `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` +type TreeSyncContentValue_HeadUpdate struct { + HeadUpdate *TreeHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof"` } -func (m *TreeHeadUpdate) Reset() { *m = TreeHeadUpdate{} } -func (m *TreeHeadUpdate) String() string { return proto.CompactTextString(m) } -func (*TreeHeadUpdate) ProtoMessage() {} -func (*TreeHeadUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{8} -} -func (m *TreeHeadUpdate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeHeadUpdate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type TreeSyncContentValue_FullSyncRequest struct { + FullSyncRequest *TreeFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof"` } -func (m *TreeHeadUpdate) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type TreeSyncContentValue_FullSyncResponse struct { + FullSyncResponse *TreeFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof"` +} + +type TreeSyncContentValue_ErrorResponse struct { + ErrorResponse *TreeErrorResponse `protobuf:"bytes,4,opt,name=errorResponse,proto3,oneof"` +} + +func (*TreeSyncContentValue_HeadUpdate) isTreeSyncContentValue_Value() {} + +func (*TreeSyncContentValue_FullSyncRequest) isTreeSyncContentValue_Value() {} + +func (*TreeSyncContentValue_FullSyncResponse) isTreeSyncContentValue_Value() {} + +func (*TreeSyncContentValue_ErrorResponse) isTreeSyncContentValue_Value() {} + +// TreeHeadUpdate is a message sent on document head update +type TreeHeadUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` + Changes []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` + SnapshotPath []string `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeHeadUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeHeadUpdate.Merge(m, src) + +func (x *TreeHeadUpdate) Reset() { + *x = TreeHeadUpdate{} + mi := &file_treechange_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeHeadUpdate) XXX_Size() int { - return m.Size() + +func (x *TreeHeadUpdate) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeHeadUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_TreeHeadUpdate.DiscardUnknown(m) + +func (*TreeHeadUpdate) ProtoMessage() {} + +func (x *TreeHeadUpdate) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TreeHeadUpdate proto.InternalMessageInfo +// Deprecated: Use TreeHeadUpdate.ProtoReflect.Descriptor instead. +func (*TreeHeadUpdate) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{8} +} -func (m *TreeHeadUpdate) GetHeads() []string { - if m != nil { - return m.Heads +func (x *TreeHeadUpdate) GetHeads() []string { + if x != nil { + return x.Heads } return nil } -func (m *TreeHeadUpdate) GetChanges() []*RawTreeChangeWithId { - if m != nil { - return m.Changes +func (x *TreeHeadUpdate) GetChanges() []*RawTreeChangeWithId { + if x != nil { + return x.Changes } return nil } -func (m *TreeHeadUpdate) GetSnapshotPath() []string { - if m != nil { - return m.SnapshotPath +func (x *TreeHeadUpdate) GetSnapshotPath() []string { + if x != nil { + return x.SnapshotPath } return nil } // TreeHeadUpdate is a message sent when document needs full sync type TreeFullSyncRequest struct { - Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` - Changes []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` - SnapshotPath []string `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` + Changes []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` + SnapshotPath []string `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeFullSyncRequest) Reset() { *m = TreeFullSyncRequest{} } -func (m *TreeFullSyncRequest) String() string { return proto.CompactTextString(m) } -func (*TreeFullSyncRequest) ProtoMessage() {} -func (*TreeFullSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{9} -} -func (m *TreeFullSyncRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeFullSyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeFullSyncRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeFullSyncRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *TreeFullSyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeFullSyncRequest.Merge(m, src) +func (x *TreeFullSyncRequest) Reset() { + *x = TreeFullSyncRequest{} + mi := &file_treechange_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeFullSyncRequest) XXX_Size() int { - return m.Size() + +func (x *TreeFullSyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeFullSyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TreeFullSyncRequest.DiscardUnknown(m) + +func (*TreeFullSyncRequest) ProtoMessage() {} + +func (x *TreeFullSyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TreeFullSyncRequest proto.InternalMessageInfo +// Deprecated: Use TreeFullSyncRequest.ProtoReflect.Descriptor instead. +func (*TreeFullSyncRequest) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{9} +} -func (m *TreeFullSyncRequest) GetHeads() []string { - if m != nil { - return m.Heads +func (x *TreeFullSyncRequest) GetHeads() []string { + if x != nil { + return x.Heads } return nil } -func (m *TreeFullSyncRequest) GetChanges() []*RawTreeChangeWithId { - if m != nil { - return m.Changes +func (x *TreeFullSyncRequest) GetChanges() []*RawTreeChangeWithId { + if x != nil { + return x.Changes } return nil } -func (m *TreeFullSyncRequest) GetSnapshotPath() []string { - if m != nil { - return m.SnapshotPath +func (x *TreeFullSyncRequest) GetSnapshotPath() []string { + if x != nil { + return x.SnapshotPath } return nil } // TreeFullSyncResponse is a message sent as a response for a specific full sync type TreeFullSyncResponse struct { - Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` - Changes []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` - SnapshotPath []string `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` + Changes []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` + SnapshotPath []string `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeFullSyncResponse) Reset() { *m = TreeFullSyncResponse{} } -func (m *TreeFullSyncResponse) String() string { return proto.CompactTextString(m) } -func (*TreeFullSyncResponse) ProtoMessage() {} -func (*TreeFullSyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{10} -} -func (m *TreeFullSyncResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeFullSyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeFullSyncResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeFullSyncResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *TreeFullSyncResponse) Reset() { + *x = TreeFullSyncResponse{} + mi := &file_treechange_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeFullSyncResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeFullSyncResponse.Merge(m, src) -} -func (m *TreeFullSyncResponse) XXX_Size() int { - return m.Size() + +func (x *TreeFullSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeFullSyncResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TreeFullSyncResponse.DiscardUnknown(m) + +func (*TreeFullSyncResponse) ProtoMessage() {} + +func (x *TreeFullSyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TreeFullSyncResponse proto.InternalMessageInfo +// Deprecated: Use TreeFullSyncResponse.ProtoReflect.Descriptor instead. +func (*TreeFullSyncResponse) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{10} +} -func (m *TreeFullSyncResponse) GetHeads() []string { - if m != nil { - return m.Heads +func (x *TreeFullSyncResponse) GetHeads() []string { + if x != nil { + return x.Heads } return nil } -func (m *TreeFullSyncResponse) GetChanges() []*RawTreeChangeWithId { - if m != nil { - return m.Changes +func (x *TreeFullSyncResponse) GetChanges() []*RawTreeChangeWithId { + if x != nil { + return x.Changes } return nil } -func (m *TreeFullSyncResponse) GetSnapshotPath() []string { - if m != nil { - return m.SnapshotPath +func (x *TreeFullSyncResponse) GetSnapshotPath() []string { + if x != nil { + return x.SnapshotPath } return nil } // TreeErrorResponse is an error sent as a response for a full sync request type TreeErrorResponse struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - ErrCode uint64 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + ErrCode uint64 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeErrorResponse) Reset() { *m = TreeErrorResponse{} } -func (m *TreeErrorResponse) String() string { return proto.CompactTextString(m) } -func (*TreeErrorResponse) ProtoMessage() {} -func (*TreeErrorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{11} -} -func (m *TreeErrorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeErrorResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeErrorResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *TreeErrorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeErrorResponse.Merge(m, src) +func (x *TreeErrorResponse) Reset() { + *x = TreeErrorResponse{} + mi := &file_treechange_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeErrorResponse) XXX_Size() int { - return m.Size() + +func (x *TreeErrorResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeErrorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TreeErrorResponse.DiscardUnknown(m) + +func (*TreeErrorResponse) ProtoMessage() {} + +func (x *TreeErrorResponse) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TreeErrorResponse proto.InternalMessageInfo +// Deprecated: Use TreeErrorResponse.ProtoReflect.Descriptor instead. +func (*TreeErrorResponse) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{11} +} -func (m *TreeErrorResponse) GetError() string { - if m != nil { - return m.Error +func (x *TreeErrorResponse) GetError() string { + if x != nil { + return x.Error } return "" } -func (m *TreeErrorResponse) GetErrCode() uint64 { - if m != nil { - return m.ErrCode +func (x *TreeErrorResponse) GetErrCode() uint64 { + if x != nil { + return x.ErrCode } return 0 } // TreeChangeInfo is used internally in Tree implementation for ease of marshalling type TreeChangeInfo struct { - ChangeType string `protobuf:"bytes,1,opt,name=changeType,proto3" json:"changeType,omitempty"` - ChangePayload []byte `protobuf:"bytes,2,opt,name=changePayload,proto3" json:"changePayload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ChangeType string `protobuf:"bytes,1,opt,name=changeType,proto3" json:"changeType,omitempty"` + ChangePayload []byte `protobuf:"bytes,2,opt,name=changePayload,proto3" json:"changePayload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TreeChangeInfo) Reset() { *m = TreeChangeInfo{} } -func (m *TreeChangeInfo) String() string { return proto.CompactTextString(m) } -func (*TreeChangeInfo) ProtoMessage() {} -func (*TreeChangeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5033f0301ef9b772, []int{12} -} -func (m *TreeChangeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeChangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeChangeInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeChangeInfo) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *TreeChangeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeChangeInfo.Merge(m, src) -} -func (m *TreeChangeInfo) XXX_Size() int { - return m.Size() +func (x *TreeChangeInfo) Reset() { + *x = TreeChangeInfo{} + mi := &file_treechange_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TreeChangeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_TreeChangeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_TreeChangeInfo proto.InternalMessageInfo -func (m *TreeChangeInfo) GetChangeType() string { - if m != nil { - return m.ChangeType - } - return "" +func (x *TreeChangeInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TreeChangeInfo) GetChangePayload() []byte { - if m != nil { - return m.ChangePayload - } - return nil -} +func (*TreeChangeInfo) ProtoMessage() {} -func init() { - proto.RegisterEnum("treechange.ErrorCodes", ErrorCodes_name, ErrorCodes_value) - proto.RegisterType((*RootChange)(nil), "treechange.RootChange") - proto.RegisterType((*TreeChange)(nil), "treechange.TreeChange") - proto.RegisterType((*NoDataTreeChange)(nil), "treechange.NoDataTreeChange") - proto.RegisterType((*ReducedTreeChange)(nil), "treechange.ReducedTreeChange") - proto.RegisterType((*RawTreeChange)(nil), "treechange.RawTreeChange") - proto.RegisterType((*RawTreeChangeWithId)(nil), "treechange.RawTreeChangeWithId") - proto.RegisterType((*TreeSyncMessage)(nil), "treechange.TreeSyncMessage") - proto.RegisterType((*TreeSyncContentValue)(nil), "treechange.TreeSyncContentValue") - proto.RegisterType((*TreeHeadUpdate)(nil), "treechange.TreeHeadUpdate") - proto.RegisterType((*TreeFullSyncRequest)(nil), "treechange.TreeFullSyncRequest") - proto.RegisterType((*TreeFullSyncResponse)(nil), "treechange.TreeFullSyncResponse") - proto.RegisterType((*TreeErrorResponse)(nil), "treechange.TreeErrorResponse") - proto.RegisterType((*TreeChangeInfo)(nil), "treechange.TreeChangeInfo") -} - -func init() { - proto.RegisterFile("commonspace/object/tree/treechangeproto/protos/treechange.proto", fileDescriptor_5033f0301ef9b772) -} - -var fileDescriptor_5033f0301ef9b772 = []byte{ - // 797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbd, 0x8e, 0xdb, 0x46, - 0x10, 0xe6, 0x52, 0x77, 0xa7, 0xd3, 0x9c, 0x4e, 0x96, 0xd7, 0x57, 0x10, 0x46, 0xc2, 0x10, 0x44, - 0x90, 0x08, 0x29, 0x7c, 0x80, 0x83, 0x14, 0x09, 0x02, 0x18, 0x39, 0xf9, 0x47, 0x82, 0x11, 0xc7, - 0x58, 0xff, 0x04, 0x70, 0xb7, 0xe6, 0x8e, 0x4e, 0x0c, 0x24, 0x92, 0xe1, 0xae, 0xec, 0xe8, 0x01, - 0xd2, 0x24, 0x80, 0xe1, 0xe7, 0xc8, 0x5b, 0xa4, 0x4b, 0xe9, 0x32, 0x65, 0x70, 0xf7, 0x0e, 0xa9, - 0x83, 0xdd, 0x25, 0xc5, 0x1f, 0xa9, 0x70, 0xaa, 0x73, 0x43, 0x71, 0x3e, 0xce, 0x7c, 0xf3, 0xf1, - 0x9b, 0xe5, 0xae, 0xe0, 0x4e, 0x94, 0x2e, 0x97, 0x69, 0x22, 0x33, 0x1e, 0xe1, 0x69, 0xfa, 0xf2, - 0x27, 0x8c, 0xd4, 0xa9, 0xca, 0x11, 0xcd, 0x25, 0x9a, 0xf3, 0xe4, 0x1c, 0xb3, 0x3c, 0x55, 0xe9, - 0xa9, 0xb9, 0xca, 0x1a, 0x7c, 0xcb, 0x20, 0x14, 0x2a, 0x24, 0xfc, 0x97, 0x00, 0xb0, 0x34, 0x55, - 0x63, 0x13, 0xd2, 0x8f, 0xa0, 0xc7, 0xa3, 0xc5, 0x04, 0xb9, 0x98, 0x0a, 0x8f, 0x04, 0x64, 0xd4, - 0x63, 0x15, 0x40, 0x3d, 0xe8, 0x9a, 0xae, 0x53, 0xe1, 0xb9, 0xe6, 0x59, 0x19, 0x52, 0x1f, 0xc0, - 0x12, 0x3e, 0x5d, 0x67, 0xe8, 0x75, 0xcc, 0xc3, 0x1a, 0xa2, 0x79, 0x55, 0xbc, 0x44, 0xa9, 0xf8, - 0x32, 0xf3, 0xf6, 0x02, 0x32, 0xea, 0xb0, 0x0a, 0xa0, 0x14, 0xf6, 0x24, 0xa2, 0xf0, 0xf6, 0x03, - 0x32, 0xea, 0x33, 0x73, 0x4f, 0x6f, 0xc2, 0x61, 0x2c, 0x30, 0x51, 0xb1, 0x5a, 0x7b, 0x07, 0x06, - 0xdf, 0xc4, 0xf4, 0x53, 0x38, 0xb6, 0xdc, 0x8f, 0xf9, 0x7a, 0x91, 0x72, 0xe1, 0x75, 0x4d, 0x42, - 0x13, 0xd4, 0x3d, 0x63, 0x79, 0x17, 0xf3, 0xf8, 0x15, 0x0a, 0xef, 0x30, 0x20, 0xa3, 0x43, 0x56, - 0x01, 0xe1, 0x1f, 0x2e, 0xc0, 0xd3, 0x1c, 0xb1, 0x78, 0xf1, 0x00, 0x8e, 0xb4, 0x2b, 0xf6, 0x45, - 0xa5, 0x47, 0x82, 0xce, 0xa8, 0xc7, 0xea, 0x50, 0xd3, 0x1a, 0xb7, 0x6d, 0xcd, 0x67, 0x30, 0x90, - 0x09, 0xcf, 0xe4, 0x3c, 0x55, 0x67, 0x5c, 0x6a, 0x87, 0xac, 0x09, 0x2d, 0x54, 0xf7, 0xb1, 0x2a, - 0xe5, 0x5d, 0xae, 0xb8, 0xb1, 0xa2, 0xcf, 0xea, 0x90, 0xee, 0x93, 0x23, 0x17, 0x0f, 0x71, 0x3d, - 0xb5, 0x8e, 0xf4, 0x58, 0x05, 0x34, 0x8d, 0x3c, 0x68, 0x1b, 0x59, 0x37, 0xad, 0xdb, 0x32, 0xcd, - 0x07, 0x88, 0xe5, 0x93, 0x42, 0x4d, 0xe1, 0x47, 0x0d, 0xd1, 0xb5, 0x82, 0x2b, 0x6e, 0x06, 0xd8, - 0x33, 0x6d, 0x37, 0x71, 0xf8, 0xc6, 0x85, 0xe1, 0xa3, 0x54, 0xcb, 0xbb, 0x02, 0xcb, 0x3e, 0x44, - 0x43, 0xbe, 0x82, 0xeb, 0x0c, 0xc5, 0x2a, 0x42, 0xf1, 0x7f, 0x0c, 0x09, 0x1f, 0xc0, 0x31, 0xe3, - 0xaf, 0x6b, 0x25, 0x1e, 0x74, 0xb3, 0x62, 0x0d, 0x13, 0x23, 0xaf, 0x0c, 0xf5, 0x7b, 0xc9, 0xf8, - 0x3c, 0xe1, 0x6a, 0x95, 0xa3, 0xf1, 0xae, 0xcf, 0x2a, 0x20, 0x1c, 0xc3, 0x8d, 0x06, 0xd1, 0x8f, - 0xb1, 0x9a, 0x17, 0x56, 0xf1, 0xd7, 0x16, 0x2a, 0x08, 0x2b, 0x80, 0x0e, 0xc0, 0x8d, 0xcb, 0x39, - 0xb8, 0xb1, 0x08, 0xdf, 0x10, 0xb8, 0xa6, 0x29, 0x9e, 0xac, 0x93, 0xe8, 0x7b, 0x94, 0x92, 0x9f, - 0x23, 0xfd, 0x06, 0xba, 0x51, 0x9a, 0x28, 0x4c, 0x94, 0xa9, 0x3f, 0xba, 0x1d, 0xdc, 0xaa, 0xed, - 0x1f, 0x65, 0xf6, 0xd8, 0xa6, 0x3c, 0xe7, 0x8b, 0x15, 0xb2, 0xb2, 0x80, 0xde, 0x01, 0xc8, 0x37, - 0x5b, 0x89, 0xe9, 0x73, 0x74, 0xfb, 0x93, 0x7a, 0xf9, 0x0e, 0xc9, 0xac, 0x56, 0x12, 0xfe, 0xe9, - 0xc2, 0xc9, 0xae, 0x16, 0xf4, 0x5b, 0x80, 0x39, 0x72, 0xf1, 0x2c, 0x13, 0x5c, 0x61, 0x21, 0xec, - 0x66, 0x5b, 0xd8, 0x64, 0x93, 0x31, 0x71, 0x58, 0x2d, 0x9f, 0x3e, 0x84, 0x6b, 0xb3, 0xd5, 0x62, - 0xa1, 0x59, 0x19, 0xfe, 0xbc, 0x42, 0xa9, 0x76, 0x89, 0xd3, 0x14, 0xf7, 0x9b, 0x69, 0x13, 0x87, - 0xb5, 0x2b, 0xe9, 0x23, 0x18, 0x56, 0x90, 0xcc, 0xd2, 0x44, 0xda, 0xfd, 0x6e, 0x87, 0x53, 0xf7, - 0x5b, 0x79, 0x13, 0x87, 0x6d, 0xd5, 0xd2, 0x7b, 0x70, 0x8c, 0x79, 0x9e, 0xe6, 0x1b, 0xb2, 0x3d, - 0x43, 0xf6, 0x71, 0x9b, 0xec, 0x5e, 0x3d, 0x69, 0xe2, 0xb0, 0x66, 0xd5, 0x59, 0x17, 0xf6, 0x5f, - 0x69, 0xab, 0xc2, 0x5f, 0x09, 0x0c, 0x9a, 0x6e, 0xd0, 0x13, 0xd8, 0xd7, 0x6e, 0x94, 0x2b, 0xd2, - 0x06, 0xf4, 0x6b, 0xe8, 0x16, 0xdb, 0x8e, 0xe7, 0x06, 0x9d, 0xf7, 0x19, 0x55, 0x99, 0x4f, 0x43, - 0xe8, 0x97, 0xdf, 0xe8, 0x63, 0xae, 0xe6, 0x5e, 0xc7, 0xf0, 0x36, 0xb0, 0xf0, 0x37, 0x02, 0x37, - 0x76, 0x58, 0x7a, 0x35, 0x62, 0x7e, 0x27, 0x76, 0x61, 0xb5, 0x27, 0x72, 0x35, 0x6a, 0xc6, 0x70, - 0x7d, 0x6b, 0xa2, 0x5a, 0x89, 0x99, 0x68, 0x71, 0xea, 0xda, 0x40, 0xef, 0x0f, 0x98, 0xe7, 0xe3, - 0x54, 0xd8, 0xef, 0x69, 0x8f, 0x95, 0x61, 0xf8, 0xdc, 0x8e, 0xd9, 0xaa, 0x98, 0x26, 0xb3, 0xb4, - 0x75, 0x06, 0x93, 0xad, 0x33, 0x78, 0xeb, 0xd4, 0x74, 0x77, 0x9c, 0x9a, 0x5f, 0xbc, 0x00, 0x30, - 0xc2, 0x74, 0x13, 0x49, 0x07, 0x00, 0xcf, 0x12, 0xfc, 0x25, 0xc3, 0x48, 0xa1, 0x18, 0x3a, 0x74, - 0x08, 0xfd, 0x07, 0xa8, 0x36, 0xea, 0x87, 0x84, 0x7a, 0x70, 0xd2, 0x1a, 0xb1, 0x7d, 0xe2, 0xd2, - 0x21, 0x1c, 0x99, 0xdb, 0x1f, 0x66, 0x33, 0x89, 0x6a, 0xf8, 0xb6, 0x73, 0xf6, 0xdd, 0x5f, 0x17, - 0x3e, 0x79, 0x77, 0xe1, 0x93, 0x7f, 0x2e, 0x7c, 0xf2, 0xf6, 0xd2, 0x77, 0xde, 0x5d, 0xfa, 0xce, - 0xdf, 0x97, 0xbe, 0xf3, 0xe2, 0xf3, 0xf7, 0xfc, 0x4f, 0xf3, 0xf2, 0xc0, 0xfc, 0x7c, 0xf9, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x59, 0x45, 0x6c, 0x05, 0x09, 0x00, 0x00, -} - -func (m *RootChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *TreeChangeInfo) ProtoReflect() protoreflect.Message { + mi := &file_treechange_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *RootChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use TreeChangeInfo.ProtoReflect.Descriptor instead. +func (*TreeChangeInfo) Descriptor() ([]byte, []int) { + return file_treechange_proto_rawDescGZIP(), []int{12} } -func (m *RootChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsDerived { - i-- - if m.IsDerived { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.ChangePayload) > 0 { - i -= len(m.ChangePayload) - copy(dAtA[i:], m.ChangePayload) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ChangePayload))) - i-- - dAtA[i] = 0x3a - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x32 - } - if len(m.Seed) > 0 { - i -= len(m.Seed) - copy(dAtA[i:], m.Seed) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Seed))) - i-- - dAtA[i] = 0x2a - } - if m.Timestamp != 0 { - i = encodeVarintTreechange(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x20 - } - if len(m.ChangeType) > 0 { - i -= len(m.ChangeType) - copy(dAtA[i:], m.ChangeType) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ChangeType))) - i-- - dAtA[i] = 0x1a - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x12 +func (x *TreeChangeInfo) GetChangeType() string { + if x != nil { + return x.ChangeType } - if len(m.AclHeadId) > 0 { - i -= len(m.AclHeadId) - copy(dAtA[i:], m.AclHeadId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.AclHeadId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return "" } -func (m *TreeChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *TreeChangeInfo) GetChangePayload() []byte { + if x != nil { + return x.ChangePayload } - return dAtA[:n], nil + return nil } -func (m *TreeChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var File_treechange_proto protoreflect.FileDescriptor + +var file_treechange_proto_rawDesc = string([]byte{ + 0x0a, 0x10, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xf6, + 0x01, 0x0a, 0x0a, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, + 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x22, 0xaa, 0x02, 0x0a, 0x0a, 0x54, 0x72, 0x65, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x65, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x65, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x6c, 0x48, + 0x65, 0x61, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x6c, + 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x42, 0x61, 0x73, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x42, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x8e, 0x02, 0x0a, 0x10, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x54, + 0x72, 0x65, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x65, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x74, 0x72, 0x65, 0x65, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x42, 0x61, 0x73, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x42, 0x61, 0x73, 0x65, 0x49, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0x35, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, + 0x54, 0x72, 0x65, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, + 0x65, 0x65, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x74, 0x72, 0x65, 0x65, 0x48, 0x65, 0x61, 0x64, 0x49, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x0d, + 0x52, 0x61, 0x77, 0x54, 0x72, 0x65, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x43, 0x0a, 0x13, 0x52, 0x61, 0x77, 0x54, 0x72, 0x65, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x61, 0x77, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x72, 0x61, 0x77, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8e, 0x01, 0x0a, 0x0f, 0x54, + 0x72, 0x65, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x72, 0x65, + 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x72, 0x6f, + 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x54, + 0x72, 0x65, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, + 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x14, + 0x54, 0x72, 0x65, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x48, 0x65, 0x61, 0x64, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x66, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x72, + 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x46, 0x75, 0x6c, + 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, + 0x66, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x4e, 0x0a, 0x10, 0x66, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x65, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x10, 0x66, + 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x45, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x85, 0x01, 0x0a, 0x0e, 0x54, 0x72, 0x65, 0x65, 0x48, 0x65, 0x61, 0x64, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x65, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x68, 0x65, 0x61, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x72, 0x65, 0x65, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x65, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x65, 0x65, + 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x68, 0x65, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x68, 0x65, 0x61, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x65, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x50, 0x61, 0x74, 0x68, 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x65, 0x65, 0x46, 0x75, 0x6c, + 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x68, 0x65, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x65, + 0x61, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x65, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, + 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x22, + 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x22, 0x43, 0x0a, 0x11, 0x54, 0x72, 0x65, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x56, 0x0a, 0x0e, 0x54, 0x72, 0x65, 0x65, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, + 0x5a, 0x0a, 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0e, 0x0a, + 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x54, 0x72, 0x65, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, + 0x18, 0x0a, 0x14, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x10, 0x90, 0x03, 0x42, 0x29, 0x5a, 0x27, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *TreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataType) > 0 { - i -= len(m.DataType) - copy(dAtA[i:], m.DataType) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.DataType))) - i-- - dAtA[i] = 0x4a - } - if m.IsSnapshot { - i-- - if m.IsSnapshot { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x3a - } - if m.Timestamp != 0 { - i = encodeVarintTreechange(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x30 - } - if len(m.ReadKeyId) > 0 { - i -= len(m.ReadKeyId) - copy(dAtA[i:], m.ReadKeyId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ReadKeyId))) - i-- - dAtA[i] = 0x2a - } - if len(m.ChangesData) > 0 { - i -= len(m.ChangesData) - copy(dAtA[i:], m.ChangesData) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ChangesData))) - i-- - dAtA[i] = 0x22 - } - if len(m.SnapshotBaseId) > 0 { - i -= len(m.SnapshotBaseId) - copy(dAtA[i:], m.SnapshotBaseId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.SnapshotBaseId))) - i-- - dAtA[i] = 0x1a - } - if len(m.AclHeadId) > 0 { - i -= len(m.AclHeadId) - copy(dAtA[i:], m.AclHeadId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.AclHeadId))) - i-- - dAtA[i] = 0x12 - } - if len(m.TreeHeadIds) > 0 { - for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TreeHeadIds[iNdEx]) - copy(dAtA[i:], m.TreeHeadIds[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} +var ( + file_treechange_proto_rawDescOnce sync.Once + file_treechange_proto_rawDescData []byte +) -func (m *NoDataTreeChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func file_treechange_proto_rawDescGZIP() []byte { + file_treechange_proto_rawDescOnce.Do(func() { + file_treechange_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_treechange_proto_rawDesc), len(file_treechange_proto_rawDesc))) + }) + return file_treechange_proto_rawDescData +} + +var file_treechange_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_treechange_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_treechange_proto_goTypes = []any{ + (ErrorCodes)(0), // 0: treechange.ErrorCodes + (*RootChange)(nil), // 1: treechange.RootChange + (*TreeChange)(nil), // 2: treechange.TreeChange + (*NoDataTreeChange)(nil), // 3: treechange.NoDataTreeChange + (*ReducedTreeChange)(nil), // 4: treechange.ReducedTreeChange + (*RawTreeChange)(nil), // 5: treechange.RawTreeChange + (*RawTreeChangeWithId)(nil), // 6: treechange.RawTreeChangeWithId + (*TreeSyncMessage)(nil), // 7: treechange.TreeSyncMessage + (*TreeSyncContentValue)(nil), // 8: treechange.TreeSyncContentValue + (*TreeHeadUpdate)(nil), // 9: treechange.TreeHeadUpdate + (*TreeFullSyncRequest)(nil), // 10: treechange.TreeFullSyncRequest + (*TreeFullSyncResponse)(nil), // 11: treechange.TreeFullSyncResponse + (*TreeErrorResponse)(nil), // 12: treechange.TreeErrorResponse + (*TreeChangeInfo)(nil), // 13: treechange.TreeChangeInfo +} +var file_treechange_proto_depIdxs = []int32{ + 8, // 0: treechange.TreeSyncMessage.content:type_name -> treechange.TreeSyncContentValue + 6, // 1: treechange.TreeSyncMessage.rootChange:type_name -> treechange.RawTreeChangeWithId + 9, // 2: treechange.TreeSyncContentValue.headUpdate:type_name -> treechange.TreeHeadUpdate + 10, // 3: treechange.TreeSyncContentValue.fullSyncRequest:type_name -> treechange.TreeFullSyncRequest + 11, // 4: treechange.TreeSyncContentValue.fullSyncResponse:type_name -> treechange.TreeFullSyncResponse + 12, // 5: treechange.TreeSyncContentValue.errorResponse:type_name -> treechange.TreeErrorResponse + 6, // 6: treechange.TreeHeadUpdate.changes:type_name -> treechange.RawTreeChangeWithId + 6, // 7: treechange.TreeFullSyncRequest.changes:type_name -> treechange.RawTreeChangeWithId + 6, // 8: treechange.TreeFullSyncResponse.changes:type_name -> treechange.RawTreeChangeWithId + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_treechange_proto_init() } +func file_treechange_proto_init() { + if File_treechange_proto != nil { + return + } + file_treechange_proto_msgTypes[7].OneofWrappers = []any{ + (*TreeSyncContentValue_HeadUpdate)(nil), + (*TreeSyncContentValue_FullSyncRequest)(nil), + (*TreeSyncContentValue_FullSyncResponse)(nil), + (*TreeSyncContentValue_ErrorResponse)(nil), } - return dAtA[:n], nil -} - -func (m *NoDataTreeChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_treechange_proto_rawDesc), len(file_treechange_proto_rawDesc)), + NumEnums: 1, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_treechange_proto_goTypes, + DependencyIndexes: file_treechange_proto_depIdxs, + EnumInfos: file_treechange_proto_enumTypes, + MessageInfos: file_treechange_proto_msgTypes, + }.Build() + File_treechange_proto = out.File + file_treechange_proto_goTypes = nil + file_treechange_proto_depIdxs = nil } - -func (m *NoDataTreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataType) > 0 { - i -= len(m.DataType) - copy(dAtA[i:], m.DataType) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.DataType))) - i-- - dAtA[i] = 0x4a - } - if m.IsSnapshot { - i-- - if m.IsSnapshot { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x3a - } - if m.Timestamp != 0 { - i = encodeVarintTreechange(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x30 - } - if len(m.ReadKeyId) > 0 { - i -= len(m.ReadKeyId) - copy(dAtA[i:], m.ReadKeyId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ReadKeyId))) - i-- - dAtA[i] = 0x2a - } - if len(m.SnapshotBaseId) > 0 { - i -= len(m.SnapshotBaseId) - copy(dAtA[i:], m.SnapshotBaseId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.SnapshotBaseId))) - i-- - dAtA[i] = 0x1a - } - if len(m.AclHeadId) > 0 { - i -= len(m.AclHeadId) - copy(dAtA[i:], m.AclHeadId) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.AclHeadId))) - i-- - dAtA[i] = 0x12 - } - if len(m.TreeHeadIds) > 0 { - for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TreeHeadIds[iNdEx]) - copy(dAtA[i:], m.TreeHeadIds[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ReducedTreeChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReducedTreeChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ReducedTreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TreeHeadIds) > 0 { - for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TreeHeadIds[iNdEx]) - copy(dAtA[i:], m.TreeHeadIds[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RawTreeChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RawTreeChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RawTreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RawTreeChangeWithId) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RawTreeChangeWithId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RawTreeChangeWithId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.RawChange) > 0 { - i -= len(m.RawChange) - copy(dAtA[i:], m.RawChange) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.RawChange))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreeSyncMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeSyncMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RootChange != nil { - { - size, err := m.RootChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Content != nil { - { - size, err := m.Content.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreeSyncContentValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeSyncContentValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeSyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *TreeSyncContentValue_HeadUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeSyncContentValue_HeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.HeadUpdate != nil { - { - size, err := m.HeadUpdate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *TreeSyncContentValue_FullSyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeSyncContentValue_FullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FullSyncRequest != nil { - { - size, err := m.FullSyncRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *TreeSyncContentValue_FullSyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeSyncContentValue_FullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FullSyncResponse != nil { - { - size, err := m.FullSyncResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *TreeSyncContentValue_ErrorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeSyncContentValue_ErrorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ErrorResponse != nil { - { - size, err := m.ErrorResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *TreeHeadUpdate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeHeadUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SnapshotPath) > 0 { - for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SnapshotPath[iNdEx]) - copy(dAtA[i:], m.SnapshotPath[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Heads) > 0 { - for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Heads[iNdEx]) - copy(dAtA[i:], m.Heads[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Heads[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TreeFullSyncRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeFullSyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SnapshotPath) > 0 { - for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SnapshotPath[iNdEx]) - copy(dAtA[i:], m.SnapshotPath[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Heads) > 0 { - for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Heads[iNdEx]) - copy(dAtA[i:], m.Heads[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Heads[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TreeFullSyncResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeFullSyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SnapshotPath) > 0 { - for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SnapshotPath[iNdEx]) - copy(dAtA[i:], m.SnapshotPath[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTreechange(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Heads) > 0 { - for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Heads[iNdEx]) - copy(dAtA[i:], m.Heads[iNdEx]) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Heads[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TreeErrorResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeErrorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeErrorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ErrCode != 0 { - i = encodeVarintTreechange(dAtA, i, uint64(m.ErrCode)) - i-- - dAtA[i] = 0x10 - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreeChangeInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeChangeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeChangeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChangePayload) > 0 { - i -= len(m.ChangePayload) - copy(dAtA[i:], m.ChangePayload) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ChangePayload))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChangeType) > 0 { - i -= len(m.ChangeType) - copy(dAtA[i:], m.ChangeType) - i = encodeVarintTreechange(dAtA, i, uint64(len(m.ChangeType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTreechange(dAtA []byte, offset int, v uint64) int { - offset -= sovTreechange(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RootChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AclHeadId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.ChangeType) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovTreechange(uint64(m.Timestamp)) - } - l = len(m.Seed) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.ChangePayload) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.IsDerived { - n += 2 - } - return n -} - -func (m *TreeChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TreeHeadIds) > 0 { - for _, s := range m.TreeHeadIds { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - l = len(m.AclHeadId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.SnapshotBaseId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.ChangesData) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.ReadKeyId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovTreechange(uint64(m.Timestamp)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.IsSnapshot { - n += 2 - } - l = len(m.DataType) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} - -func (m *NoDataTreeChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TreeHeadIds) > 0 { - for _, s := range m.TreeHeadIds { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - l = len(m.AclHeadId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.SnapshotBaseId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.ReadKeyId) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovTreechange(uint64(m.Timestamp)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.IsSnapshot { - n += 2 - } - l = len(m.DataType) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} - -func (m *ReducedTreeChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TreeHeadIds) > 0 { - for _, s := range m.TreeHeadIds { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - return n -} - -func (m *RawTreeChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} - -func (m *RawTreeChangeWithId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RawChange) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} - -func (m *TreeSyncMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Content != nil { - l = m.Content.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - if m.RootChange != nil { - l = m.RootChange.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} - -func (m *TreeSyncContentValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *TreeSyncContentValue_HeadUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HeadUpdate != nil { - l = m.HeadUpdate.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} -func (m *TreeSyncContentValue_FullSyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FullSyncRequest != nil { - l = m.FullSyncRequest.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} -func (m *TreeSyncContentValue_FullSyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FullSyncResponse != nil { - l = m.FullSyncResponse.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} -func (m *TreeSyncContentValue_ErrorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ErrorResponse != nil { - l = m.ErrorResponse.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} -func (m *TreeHeadUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Heads) > 0 { - for _, s := range m.Heads { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - } - if len(m.SnapshotPath) > 0 { - for _, s := range m.SnapshotPath { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - return n -} - -func (m *TreeFullSyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Heads) > 0 { - for _, s := range m.Heads { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - } - if len(m.SnapshotPath) > 0 { - for _, s := range m.SnapshotPath { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - return n -} - -func (m *TreeFullSyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Heads) > 0 { - for _, s := range m.Heads { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovTreechange(uint64(l)) - } - } - if len(m.SnapshotPath) > 0 { - for _, s := range m.SnapshotPath { - l = len(s) - n += 1 + l + sovTreechange(uint64(l)) - } - } - return n -} - -func (m *TreeErrorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Error) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - if m.ErrCode != 0 { - n += 1 + sovTreechange(uint64(m.ErrCode)) - } - return n -} - -func (m *TreeChangeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChangeType) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - l = len(m.ChangePayload) - if l > 0 { - n += 1 + l + sovTreechange(uint64(l)) - } - return n -} - -func sovTreechange(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTreechange(x uint64) (n int) { - return sovTreechange(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RootChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RootChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RootChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHeadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...) - if m.Seed == nil { - m.Seed = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangePayload = append(m.ChangePayload[:0], dAtA[iNdEx:postIndex]...) - if m.ChangePayload == nil { - m.ChangePayload = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsDerived", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsDerived = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHeadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotBaseId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SnapshotBaseId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangesData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangesData = append(m.ChangesData[:0], dAtA[iNdEx:postIndex]...) - if m.ChangesData == nil { - m.ChangesData = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReadKeyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSnapshot", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSnapshot = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoDataTreeChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoDataTreeChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoDataTreeChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHeadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotBaseId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SnapshotBaseId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReadKeyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSnapshot", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSnapshot = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReducedTreeChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReducedTreeChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReducedTreeChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RawTreeChange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawTreeChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawTreeChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RawTreeChangeWithId) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawTreeChangeWithId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawTreeChangeWithId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RawChange", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RawChange = append(m.RawChange[:0], dAtA[iNdEx:postIndex]...) - if m.RawChange == nil { - m.RawChange = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeSyncMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeSyncMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Content == nil { - m.Content = &TreeSyncContentValue{} - } - if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RootChange == nil { - m.RootChange = &RawTreeChangeWithId{} - } - if err := m.RootChange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeSyncContentValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeSyncContentValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeSyncContentValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadUpdate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TreeHeadUpdate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &TreeSyncContentValue_HeadUpdate{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullSyncRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TreeFullSyncRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &TreeSyncContentValue_FullSyncRequest{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullSyncResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TreeFullSyncResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &TreeSyncContentValue_FullSyncResponse{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TreeErrorResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &TreeSyncContentValue_ErrorResponse{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeHeadUpdate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeHeadUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeHeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &RawTreeChangeWithId{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeFullSyncRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeFullSyncRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeFullSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &RawTreeChangeWithId{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeFullSyncResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeFullSyncResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeFullSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &RawTreeChangeWithId{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeErrorResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeErrorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType) - } - m.ErrCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ErrCode |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeChangeInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeChangeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeChangeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangePayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTreechange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTreechange - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTreechange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangePayload = append(m.ChangePayload[:0], dAtA[iNdEx:postIndex]...) - if m.ChangePayload == nil { - m.ChangePayload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTreechange(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTreechange - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTreechange(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTreechange - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTreechange - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTreechange - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTreechange - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTreechange - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTreechange - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTreechange = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTreechange = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTreechange = fmt.Errorf("proto: unexpected end of group") -) diff --git a/commonspace/object/tree/treechangeproto/treechange_vtproto.pb.go b/commonspace/object/tree/treechangeproto/treechange_vtproto.pb.go new file mode 100644 index 000000000..0bc3374f7 --- /dev/null +++ b/commonspace/object/tree/treechangeproto/treechange_vtproto.pb.go @@ -0,0 +1,3504 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: treechange.proto + +package treechangeproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *RootChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RootChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RootChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsDerived { + i-- + if m.IsDerived { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.ChangePayload) > 0 { + i -= len(m.ChangePayload) + copy(dAtA[i:], m.ChangePayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChangePayload))) + i-- + dAtA[i] = 0x3a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x32 + } + if len(m.Seed) > 0 { + i -= len(m.Seed) + copy(dAtA[i:], m.Seed) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Seed))) + i-- + dAtA[i] = 0x2a + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x20 + } + if len(m.ChangeType) > 0 { + i -= len(m.ChangeType) + copy(dAtA[i:], m.ChangeType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChangeType))) + i-- + dAtA[i] = 0x1a + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x12 + } + if len(m.AclHeadId) > 0 { + i -= len(m.AclHeadId) + copy(dAtA[i:], m.AclHeadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHeadId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TreeChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.DataType) > 0 { + i -= len(m.DataType) + copy(dAtA[i:], m.DataType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DataType))) + i-- + dAtA[i] = 0x4a + } + if m.IsSnapshot { + i-- + if m.IsSnapshot { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x3a + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x30 + } + if len(m.ReadKeyId) > 0 { + i -= len(m.ReadKeyId) + copy(dAtA[i:], m.ReadKeyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ReadKeyId))) + i-- + dAtA[i] = 0x2a + } + if len(m.ChangesData) > 0 { + i -= len(m.ChangesData) + copy(dAtA[i:], m.ChangesData) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChangesData))) + i-- + dAtA[i] = 0x22 + } + if len(m.SnapshotBaseId) > 0 { + i -= len(m.SnapshotBaseId) + copy(dAtA[i:], m.SnapshotBaseId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SnapshotBaseId))) + i-- + dAtA[i] = 0x1a + } + if len(m.AclHeadId) > 0 { + i -= len(m.AclHeadId) + copy(dAtA[i:], m.AclHeadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHeadId))) + i-- + dAtA[i] = 0x12 + } + if len(m.TreeHeadIds) > 0 { + for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TreeHeadIds[iNdEx]) + copy(dAtA[i:], m.TreeHeadIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NoDataTreeChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NoDataTreeChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NoDataTreeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.DataType) > 0 { + i -= len(m.DataType) + copy(dAtA[i:], m.DataType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DataType))) + i-- + dAtA[i] = 0x4a + } + if m.IsSnapshot { + i-- + if m.IsSnapshot { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x3a + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x30 + } + if len(m.ReadKeyId) > 0 { + i -= len(m.ReadKeyId) + copy(dAtA[i:], m.ReadKeyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ReadKeyId))) + i-- + dAtA[i] = 0x2a + } + if len(m.SnapshotBaseId) > 0 { + i -= len(m.SnapshotBaseId) + copy(dAtA[i:], m.SnapshotBaseId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SnapshotBaseId))) + i-- + dAtA[i] = 0x1a + } + if len(m.AclHeadId) > 0 { + i -= len(m.AclHeadId) + copy(dAtA[i:], m.AclHeadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHeadId))) + i-- + dAtA[i] = 0x12 + } + if len(m.TreeHeadIds) > 0 { + for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TreeHeadIds[iNdEx]) + copy(dAtA[i:], m.TreeHeadIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ReducedTreeChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReducedTreeChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ReducedTreeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.TreeHeadIds) > 0 { + for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TreeHeadIds[iNdEx]) + copy(dAtA[i:], m.TreeHeadIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *RawTreeChange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawTreeChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RawTreeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RawTreeChangeWithId) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawTreeChangeWithId) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RawTreeChangeWithId) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.RawChange) > 0 { + i -= len(m.RawChange) + copy(dAtA[i:], m.RawChange) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RawChange))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TreeSyncMessage) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeSyncMessage) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeSyncMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.RootChange != nil { + size, err := m.RootChange.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Content != nil { + size, err := m.Content.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TreeSyncContentValue) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeSyncContentValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeSyncContentValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Value.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *TreeSyncContentValue_HeadUpdate) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeSyncContentValue_HeadUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.HeadUpdate != nil { + size, err := m.HeadUpdate.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *TreeSyncContentValue_FullSyncRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeSyncContentValue_FullSyncRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FullSyncRequest != nil { + size, err := m.FullSyncRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *TreeSyncContentValue_FullSyncResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeSyncContentValue_FullSyncResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FullSyncResponse != nil { + size, err := m.FullSyncResponse.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TreeSyncContentValue_ErrorResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeSyncContentValue_ErrorResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ErrorResponse != nil { + size, err := m.ErrorResponse.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *TreeHeadUpdate) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeHeadUpdate) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeHeadUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SnapshotPath) > 0 { + for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SnapshotPath[iNdEx]) + copy(dAtA[i:], m.SnapshotPath[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Changes) > 0 { + for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Changes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Heads) > 0 { + for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Heads[iNdEx]) + copy(dAtA[i:], m.Heads[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Heads[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TreeFullSyncRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeFullSyncRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeFullSyncRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SnapshotPath) > 0 { + for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SnapshotPath[iNdEx]) + copy(dAtA[i:], m.SnapshotPath[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Changes) > 0 { + for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Changes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Heads) > 0 { + for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Heads[iNdEx]) + copy(dAtA[i:], m.Heads[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Heads[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TreeFullSyncResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeFullSyncResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeFullSyncResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SnapshotPath) > 0 { + for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SnapshotPath[iNdEx]) + copy(dAtA[i:], m.SnapshotPath[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Changes) > 0 { + for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Changes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Heads) > 0 { + for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Heads[iNdEx]) + copy(dAtA[i:], m.Heads[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Heads[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TreeErrorResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeErrorResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeErrorResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ErrCode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ErrCode)) + i-- + dAtA[i] = 0x10 + } + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TreeChangeInfo) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TreeChangeInfo) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TreeChangeInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ChangePayload) > 0 { + i -= len(m.ChangePayload) + copy(dAtA[i:], m.ChangePayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChangePayload))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChangeType) > 0 { + i -= len(m.ChangeType) + copy(dAtA[i:], m.ChangeType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChangeType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RootChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AclHeadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ChangeType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.Seed) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ChangePayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsDerived { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *TreeChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TreeHeadIds) > 0 { + for _, s := range m.TreeHeadIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.AclHeadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SnapshotBaseId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ChangesData) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ReadKeyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsSnapshot { + n += 2 + } + l = len(m.DataType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *NoDataTreeChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TreeHeadIds) > 0 { + for _, s := range m.TreeHeadIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.AclHeadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SnapshotBaseId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ReadKeyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsSnapshot { + n += 2 + } + l = len(m.DataType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ReducedTreeChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TreeHeadIds) > 0 { + for _, s := range m.TreeHeadIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *RawTreeChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RawTreeChangeWithId) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RawChange) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TreeSyncMessage) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Content != nil { + l = m.Content.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RootChange != nil { + l = m.RootChange.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TreeSyncContentValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *TreeSyncContentValue_HeadUpdate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HeadUpdate != nil { + l = m.HeadUpdate.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TreeSyncContentValue_FullSyncRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FullSyncRequest != nil { + l = m.FullSyncRequest.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TreeSyncContentValue_FullSyncResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FullSyncResponse != nil { + l = m.FullSyncResponse.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TreeSyncContentValue_ErrorResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ErrorResponse != nil { + l = m.ErrorResponse.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *TreeHeadUpdate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Heads) > 0 { + for _, s := range m.Heads { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Changes) > 0 { + for _, e := range m.Changes { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.SnapshotPath) > 0 { + for _, s := range m.SnapshotPath { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *TreeFullSyncRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Heads) > 0 { + for _, s := range m.Heads { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Changes) > 0 { + for _, e := range m.Changes { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.SnapshotPath) > 0 { + for _, s := range m.SnapshotPath { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *TreeFullSyncResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Heads) > 0 { + for _, s := range m.Heads { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Changes) > 0 { + for _, e := range m.Changes { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.SnapshotPath) > 0 { + for _, s := range m.SnapshotPath { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *TreeErrorResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Error) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ErrCode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ErrCode)) + } + n += len(m.unknownFields) + return n +} + +func (m *TreeChangeInfo) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChangeType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ChangePayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RootChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RootChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RootChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHeadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...) + if m.Seed == nil { + m.Seed = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangePayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangePayload = append(m.ChangePayload[:0], dAtA[iNdEx:postIndex]...) + if m.ChangePayload == nil { + m.ChangePayload = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsDerived", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsDerived = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHeadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapshotBaseId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapshotBaseId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangesData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangesData = append(m.ChangesData[:0], dAtA[iNdEx:postIndex]...) + if m.ChangesData == nil { + m.ChangesData = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReadKeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSnapshot", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSnapshot = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoDataTreeChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NoDataTreeChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoDataTreeChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHeadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapshotBaseId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapshotBaseId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReadKeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSnapshot", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSnapshot = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReducedTreeChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReducedTreeChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReducedTreeChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RawTreeChange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawTreeChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawTreeChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RawTreeChangeWithId) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawTreeChangeWithId: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawTreeChangeWithId: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawChange", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RawChange = append(m.RawChange[:0], dAtA[iNdEx:postIndex]...) + if m.RawChange == nil { + m.RawChange = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeSyncMessage) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeSyncMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Content == nil { + m.Content = &TreeSyncContentValue{} + } + if err := m.Content.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootChange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RootChange == nil { + m.RootChange = &RawTreeChangeWithId{} + } + if err := m.RootChange.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeSyncContentValue) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeSyncContentValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeSyncContentValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HeadUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*TreeSyncContentValue_HeadUpdate); ok { + if err := oneof.HeadUpdate.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TreeHeadUpdate{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &TreeSyncContentValue_HeadUpdate{HeadUpdate: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullSyncRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*TreeSyncContentValue_FullSyncRequest); ok { + if err := oneof.FullSyncRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TreeFullSyncRequest{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &TreeSyncContentValue_FullSyncRequest{FullSyncRequest: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullSyncResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*TreeSyncContentValue_FullSyncResponse); ok { + if err := oneof.FullSyncResponse.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TreeFullSyncResponse{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &TreeSyncContentValue_FullSyncResponse{FullSyncResponse: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*TreeSyncContentValue_ErrorResponse); ok { + if err := oneof.ErrorResponse.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TreeErrorResponse{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &TreeSyncContentValue_ErrorResponse{ErrorResponse: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeHeadUpdate) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeHeadUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeHeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Changes = append(m.Changes, &RawTreeChangeWithId{}) + if err := m.Changes[len(m.Changes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeFullSyncRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeFullSyncRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeFullSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Changes = append(m.Changes, &RawTreeChangeWithId{}) + if err := m.Changes[len(m.Changes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeFullSyncResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeFullSyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeFullSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Changes = append(m.Changes, &RawTreeChangeWithId{}) + if err := m.Changes[len(m.Changes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeErrorResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeErrorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType) + } + m.ErrCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrCode |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TreeChangeInfo) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TreeChangeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TreeChangeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangePayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangePayload = append(m.ChangePayload[:0], dAtA[iNdEx:postIndex]...) + if m.ChangePayload == nil { + m.ChangePayload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go b/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go index 1cfa568c7..6e91ef4c7 100644 --- a/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go +++ b/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_treemanager/mock_treemanager.go github.com/anyproto/any-sync/commonspace/object/treemanager TreeManager // + // Package mock_treemanager is a generated GoMock package. package mock_treemanager @@ -22,6 +23,7 @@ import ( type MockTreeManager struct { ctrl *gomock.Controller recorder *MockTreeManagerMockRecorder + isgomock struct{} } // MockTreeManagerMockRecorder is the mock recorder for MockTreeManager. @@ -42,74 +44,74 @@ func (m *MockTreeManager) EXPECT() *MockTreeManagerMockRecorder { } // Close mocks base method. -func (m *MockTreeManager) Close(arg0 context.Context) error { +func (m *MockTreeManager) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockTreeManagerMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTreeManager)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTreeManager)(nil).Close), ctx) } // DeleteTree mocks base method. -func (m *MockTreeManager) DeleteTree(arg0 context.Context, arg1, arg2 string) error { +func (m *MockTreeManager) DeleteTree(ctx context.Context, spaceId, treeId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeleteTree", ctx, spaceId, treeId) ret0, _ := ret[0].(error) return ret0 } // DeleteTree indicates an expected call of DeleteTree. -func (mr *MockTreeManagerMockRecorder) DeleteTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) DeleteTree(ctx, spaceId, treeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockTreeManager)(nil).DeleteTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockTreeManager)(nil).DeleteTree), ctx, spaceId, treeId) } // GetTree mocks base method. -func (m *MockTreeManager) GetTree(arg0 context.Context, arg1, arg2 string) (objecttree.ObjectTree, error) { +func (m *MockTreeManager) GetTree(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetTree", ctx, spaceId, treeId) ret0, _ := ret[0].(objecttree.ObjectTree) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTree indicates an expected call of GetTree. -func (mr *MockTreeManagerMockRecorder) GetTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) GetTree(ctx, spaceId, treeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTree", reflect.TypeOf((*MockTreeManager)(nil).GetTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTree", reflect.TypeOf((*MockTreeManager)(nil).GetTree), ctx, spaceId, treeId) } // Init mocks base method. -func (m *MockTreeManager) Init(arg0 *app.App) error { +func (m *MockTreeManager) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockTreeManagerMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockTreeManager)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockTreeManager)(nil).Init), a) } // MarkTreeDeleted mocks base method. -func (m *MockTreeManager) MarkTreeDeleted(arg0 context.Context, arg1, arg2 string) error { +func (m *MockTreeManager) MarkTreeDeleted(ctx context.Context, spaceId, treeId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MarkTreeDeleted", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "MarkTreeDeleted", ctx, spaceId, treeId) ret0, _ := ret[0].(error) return ret0 } // MarkTreeDeleted indicates an expected call of MarkTreeDeleted. -func (mr *MockTreeManagerMockRecorder) MarkTreeDeleted(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) MarkTreeDeleted(ctx, spaceId, treeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkTreeDeleted", reflect.TypeOf((*MockTreeManager)(nil).MarkTreeDeleted), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkTreeDeleted", reflect.TypeOf((*MockTreeManager)(nil).MarkTreeDeleted), ctx, spaceId, treeId) } // Name mocks base method. @@ -127,29 +129,29 @@ func (mr *MockTreeManagerMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockTreeManager) Run(arg0 context.Context) error { +func (m *MockTreeManager) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockTreeManagerMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockTreeManager)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockTreeManager)(nil).Run), ctx) } // ValidateAndPutTree mocks base method. -func (m *MockTreeManager) ValidateAndPutTree(arg0 context.Context, arg1 string, arg2 treestorage.TreeStorageCreatePayload) error { +func (m *MockTreeManager) ValidateAndPutTree(ctx context.Context, spaceId string, payload treestorage.TreeStorageCreatePayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateAndPutTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ValidateAndPutTree", ctx, spaceId, payload) ret0, _ := ret[0].(error) return ret0 } // ValidateAndPutTree indicates an expected call of ValidateAndPutTree. -func (mr *MockTreeManagerMockRecorder) ValidateAndPutTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeManagerMockRecorder) ValidateAndPutTree(ctx, spaceId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAndPutTree", reflect.TypeOf((*MockTreeManager)(nil).ValidateAndPutTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAndPutTree", reflect.TypeOf((*MockTreeManager)(nil).ValidateAndPutTree), ctx, spaceId, payload) } diff --git a/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go b/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go index bdc3bcd14..62b68d157 100644 --- a/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go +++ b/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_treesyncer/mock_treesyncer.go github.com/anyproto/any-sync/commonspace/object/treesyncer TreeSyncer // + // Package mock_treesyncer is a generated GoMock package. package mock_treesyncer @@ -21,6 +22,7 @@ import ( type MockTreeSyncer struct { ctrl *gomock.Controller recorder *MockTreeSyncerMockRecorder + isgomock struct{} } // MockTreeSyncerMockRecorder is the mock recorder for MockTreeSyncer. @@ -41,31 +43,31 @@ func (m *MockTreeSyncer) EXPECT() *MockTreeSyncerMockRecorder { } // Close mocks base method. -func (m *MockTreeSyncer) Close(arg0 context.Context) error { +func (m *MockTreeSyncer) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockTreeSyncerMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockTreeSyncerMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTreeSyncer)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTreeSyncer)(nil).Close), ctx) } // Init mocks base method. -func (m *MockTreeSyncer) Init(arg0 *app.App) error { +func (m *MockTreeSyncer) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockTreeSyncerMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockTreeSyncerMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockTreeSyncer)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockTreeSyncer)(nil).Init), a) } // Name mocks base method. @@ -83,31 +85,31 @@ func (mr *MockTreeSyncerMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockTreeSyncer) Run(arg0 context.Context) error { +func (m *MockTreeSyncer) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockTreeSyncerMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockTreeSyncerMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockTreeSyncer)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockTreeSyncer)(nil).Run), ctx) } // ShouldSync mocks base method. -func (m *MockTreeSyncer) ShouldSync(arg0 string) bool { +func (m *MockTreeSyncer) ShouldSync(peerId string) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ShouldSync", arg0) + ret := m.ctrl.Call(m, "ShouldSync", peerId) ret0, _ := ret[0].(bool) return ret0 } // ShouldSync indicates an expected call of ShouldSync. -func (mr *MockTreeSyncerMockRecorder) ShouldSync(arg0 any) *gomock.Call { +func (mr *MockTreeSyncerMockRecorder) ShouldSync(peerId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldSync", reflect.TypeOf((*MockTreeSyncer)(nil).ShouldSync), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldSync", reflect.TypeOf((*MockTreeSyncer)(nil).ShouldSync), peerId) } // StartSync mocks base method. @@ -135,15 +137,15 @@ func (mr *MockTreeSyncerMockRecorder) StopSync() *gomock.Call { } // SyncAll mocks base method. -func (m *MockTreeSyncer) SyncAll(arg0 context.Context, arg1 peer.Peer, arg2, arg3 []string) error { +func (m *MockTreeSyncer) SyncAll(ctx context.Context, p peer.Peer, existing, missing []string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncAll", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "SyncAll", ctx, p, existing, missing) ret0, _ := ret[0].(error) return ret0 } // SyncAll indicates an expected call of SyncAll. -func (mr *MockTreeSyncerMockRecorder) SyncAll(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockTreeSyncerMockRecorder) SyncAll(ctx, p, existing, missing any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncAll", reflect.TypeOf((*MockTreeSyncer)(nil).SyncAll), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncAll", reflect.TypeOf((*MockTreeSyncer)(nil).SyncAll), ctx, p, existing, missing) } diff --git a/commonspace/objectmanager/mock_objectmanager/mock_objectmanager.go b/commonspace/objectmanager/mock_objectmanager/mock_objectmanager.go index 5e9dd5676..064bff56e 100644 --- a/commonspace/objectmanager/mock_objectmanager/mock_objectmanager.go +++ b/commonspace/objectmanager/mock_objectmanager/mock_objectmanager.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_objectmanager/mock_objectmanager.go github.com/anyproto/any-sync/commonspace/objectmanager ObjectManager // + // Package mock_objectmanager is a generated GoMock package. package mock_objectmanager @@ -23,6 +24,7 @@ import ( type MockObjectManager struct { ctrl *gomock.Controller recorder *MockObjectManagerMockRecorder + isgomock struct{} } // MockObjectManagerMockRecorder is the mock recorder for MockObjectManager. @@ -43,101 +45,101 @@ func (m *MockObjectManager) EXPECT() *MockObjectManagerMockRecorder { } // AddObject mocks base method. -func (m *MockObjectManager) AddObject(arg0 syncobjectgetter.SyncObject) { +func (m *MockObjectManager) AddObject(object syncobjectgetter.SyncObject) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddObject", arg0) + m.ctrl.Call(m, "AddObject", object) } // AddObject indicates an expected call of AddObject. -func (mr *MockObjectManagerMockRecorder) AddObject(arg0 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) AddObject(object any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddObject", reflect.TypeOf((*MockObjectManager)(nil).AddObject), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddObject", reflect.TypeOf((*MockObjectManager)(nil).AddObject), object) } // Close mocks base method. -func (m *MockObjectManager) Close(arg0 context.Context) error { +func (m *MockObjectManager) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockObjectManagerMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockObjectManager)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockObjectManager)(nil).Close), ctx) } // DeleteTree mocks base method. -func (m *MockObjectManager) DeleteTree(arg0 context.Context, arg1, arg2 string) error { +func (m *MockObjectManager) DeleteTree(ctx context.Context, spaceId, treeId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeleteTree", ctx, spaceId, treeId) ret0, _ := ret[0].(error) return ret0 } // DeleteTree indicates an expected call of DeleteTree. -func (mr *MockObjectManagerMockRecorder) DeleteTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) DeleteTree(ctx, spaceId, treeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockObjectManager)(nil).DeleteTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockObjectManager)(nil).DeleteTree), ctx, spaceId, treeId) } // GetObject mocks base method. -func (m *MockObjectManager) GetObject(arg0 context.Context, arg1 string) (syncobjectgetter.SyncObject, error) { +func (m *MockObjectManager) GetObject(ctx context.Context, objectId string) (syncobjectgetter.SyncObject, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetObject", arg0, arg1) + ret := m.ctrl.Call(m, "GetObject", ctx, objectId) ret0, _ := ret[0].(syncobjectgetter.SyncObject) ret1, _ := ret[1].(error) return ret0, ret1 } // GetObject indicates an expected call of GetObject. -func (mr *MockObjectManagerMockRecorder) GetObject(arg0, arg1 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) GetObject(ctx, objectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockObjectManager)(nil).GetObject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockObjectManager)(nil).GetObject), ctx, objectId) } // GetTree mocks base method. -func (m *MockObjectManager) GetTree(arg0 context.Context, arg1, arg2 string) (objecttree.ObjectTree, error) { +func (m *MockObjectManager) GetTree(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetTree", ctx, spaceId, treeId) ret0, _ := ret[0].(objecttree.ObjectTree) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTree indicates an expected call of GetTree. -func (mr *MockObjectManagerMockRecorder) GetTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) GetTree(ctx, spaceId, treeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTree", reflect.TypeOf((*MockObjectManager)(nil).GetTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTree", reflect.TypeOf((*MockObjectManager)(nil).GetTree), ctx, spaceId, treeId) } // Init mocks base method. -func (m *MockObjectManager) Init(arg0 *app.App) error { +func (m *MockObjectManager) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockObjectManagerMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockObjectManager)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockObjectManager)(nil).Init), a) } // MarkTreeDeleted mocks base method. -func (m *MockObjectManager) MarkTreeDeleted(arg0 context.Context, arg1, arg2 string) error { +func (m *MockObjectManager) MarkTreeDeleted(ctx context.Context, spaceId, treeId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MarkTreeDeleted", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "MarkTreeDeleted", ctx, spaceId, treeId) ret0, _ := ret[0].(error) return ret0 } // MarkTreeDeleted indicates an expected call of MarkTreeDeleted. -func (mr *MockObjectManagerMockRecorder) MarkTreeDeleted(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) MarkTreeDeleted(ctx, spaceId, treeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkTreeDeleted", reflect.TypeOf((*MockObjectManager)(nil).MarkTreeDeleted), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkTreeDeleted", reflect.TypeOf((*MockObjectManager)(nil).MarkTreeDeleted), ctx, spaceId, treeId) } // Name mocks base method. @@ -155,29 +157,29 @@ func (mr *MockObjectManagerMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockObjectManager) Run(arg0 context.Context) error { +func (m *MockObjectManager) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockObjectManagerMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockObjectManager)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockObjectManager)(nil).Run), ctx) } // ValidateAndPutTree mocks base method. -func (m *MockObjectManager) ValidateAndPutTree(arg0 context.Context, arg1 string, arg2 treestorage.TreeStorageCreatePayload) error { +func (m *MockObjectManager) ValidateAndPutTree(ctx context.Context, spaceId string, payload treestorage.TreeStorageCreatePayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateAndPutTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ValidateAndPutTree", ctx, spaceId, payload) ret0, _ := ret[0].(error) return ret0 } // ValidateAndPutTree indicates an expected call of ValidateAndPutTree. -func (mr *MockObjectManagerMockRecorder) ValidateAndPutTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectManagerMockRecorder) ValidateAndPutTree(ctx, spaceId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAndPutTree", reflect.TypeOf((*MockObjectManager)(nil).ValidateAndPutTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAndPutTree", reflect.TypeOf((*MockObjectManager)(nil).ValidateAndPutTree), ctx, spaceId, payload) } diff --git a/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go b/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go index 7aca0fc94..7dad688b7 100644 --- a/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go +++ b/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_objecttreebuilder/mock_objecttreebuilder.go github.com/anyproto/any-sync/commonspace/objecttreebuilder TreeBuilder // + // Package mock_objecttreebuilder is a generated GoMock package. package mock_objecttreebuilder @@ -23,6 +24,7 @@ import ( type MockTreeBuilder struct { ctrl *gomock.Controller recorder *MockTreeBuilderMockRecorder + isgomock struct{} } // MockTreeBuilderMockRecorder is the mock recorder for MockTreeBuilder. @@ -43,76 +45,76 @@ func (m *MockTreeBuilder) EXPECT() *MockTreeBuilderMockRecorder { } // BuildHistoryTree mocks base method. -func (m *MockTreeBuilder) BuildHistoryTree(arg0 context.Context, arg1 string, arg2 objecttreebuilder.HistoryTreeOpts) (objecttree.HistoryTree, error) { +func (m *MockTreeBuilder) BuildHistoryTree(ctx context.Context, id string, opts objecttreebuilder.HistoryTreeOpts) (objecttree.HistoryTree, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BuildHistoryTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "BuildHistoryTree", ctx, id, opts) ret0, _ := ret[0].(objecttree.HistoryTree) ret1, _ := ret[1].(error) return ret0, ret1 } // BuildHistoryTree indicates an expected call of BuildHistoryTree. -func (mr *MockTreeBuilderMockRecorder) BuildHistoryTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeBuilderMockRecorder) BuildHistoryTree(ctx, id, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildHistoryTree", reflect.TypeOf((*MockTreeBuilder)(nil).BuildHistoryTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildHistoryTree", reflect.TypeOf((*MockTreeBuilder)(nil).BuildHistoryTree), ctx, id, opts) } // BuildTree mocks base method. -func (m *MockTreeBuilder) BuildTree(arg0 context.Context, arg1 string, arg2 objecttreebuilder.BuildTreeOpts) (objecttree.ObjectTree, error) { +func (m *MockTreeBuilder) BuildTree(ctx context.Context, id string, opts objecttreebuilder.BuildTreeOpts) (objecttree.ObjectTree, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BuildTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "BuildTree", ctx, id, opts) ret0, _ := ret[0].(objecttree.ObjectTree) ret1, _ := ret[1].(error) return ret0, ret1 } // BuildTree indicates an expected call of BuildTree. -func (mr *MockTreeBuilderMockRecorder) BuildTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeBuilderMockRecorder) BuildTree(ctx, id, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildTree", reflect.TypeOf((*MockTreeBuilder)(nil).BuildTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildTree", reflect.TypeOf((*MockTreeBuilder)(nil).BuildTree), ctx, id, opts) } // CreateTree mocks base method. -func (m *MockTreeBuilder) CreateTree(arg0 context.Context, arg1 objecttree.ObjectTreeCreatePayload) (treestorage.TreeStorageCreatePayload, error) { +func (m *MockTreeBuilder) CreateTree(ctx context.Context, payload objecttree.ObjectTreeCreatePayload) (treestorage.TreeStorageCreatePayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTree", arg0, arg1) + ret := m.ctrl.Call(m, "CreateTree", ctx, payload) ret0, _ := ret[0].(treestorage.TreeStorageCreatePayload) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateTree indicates an expected call of CreateTree. -func (mr *MockTreeBuilderMockRecorder) CreateTree(arg0, arg1 any) *gomock.Call { +func (mr *MockTreeBuilderMockRecorder) CreateTree(ctx, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTree", reflect.TypeOf((*MockTreeBuilder)(nil).CreateTree), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTree", reflect.TypeOf((*MockTreeBuilder)(nil).CreateTree), ctx, payload) } // DeriveTree mocks base method. -func (m *MockTreeBuilder) DeriveTree(arg0 context.Context, arg1 objecttree.ObjectTreeDerivePayload) (treestorage.TreeStorageCreatePayload, error) { +func (m *MockTreeBuilder) DeriveTree(ctx context.Context, payload objecttree.ObjectTreeDerivePayload) (treestorage.TreeStorageCreatePayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeriveTree", arg0, arg1) + ret := m.ctrl.Call(m, "DeriveTree", ctx, payload) ret0, _ := ret[0].(treestorage.TreeStorageCreatePayload) ret1, _ := ret[1].(error) return ret0, ret1 } // DeriveTree indicates an expected call of DeriveTree. -func (mr *MockTreeBuilderMockRecorder) DeriveTree(arg0, arg1 any) *gomock.Call { +func (mr *MockTreeBuilderMockRecorder) DeriveTree(ctx, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeriveTree", reflect.TypeOf((*MockTreeBuilder)(nil).DeriveTree), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeriveTree", reflect.TypeOf((*MockTreeBuilder)(nil).DeriveTree), ctx, payload) } // PutTree mocks base method. -func (m *MockTreeBuilder) PutTree(arg0 context.Context, arg1 treestorage.TreeStorageCreatePayload, arg2 updatelistener.UpdateListener) (objecttree.ObjectTree, error) { +func (m *MockTreeBuilder) PutTree(ctx context.Context, payload treestorage.TreeStorageCreatePayload, listener updatelistener.UpdateListener) (objecttree.ObjectTree, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PutTree", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "PutTree", ctx, payload, listener) ret0, _ := ret[0].(objecttree.ObjectTree) ret1, _ := ret[1].(error) return ret0, ret1 } // PutTree indicates an expected call of PutTree. -func (mr *MockTreeBuilderMockRecorder) PutTree(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockTreeBuilderMockRecorder) PutTree(ctx, payload, listener any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutTree", reflect.TypeOf((*MockTreeBuilder)(nil).PutTree), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutTree", reflect.TypeOf((*MockTreeBuilder)(nil).PutTree), ctx, payload, listener) } diff --git a/commonspace/peermanager/mock_peermanager/mock_peermanager.go b/commonspace/peermanager/mock_peermanager/mock_peermanager.go index d924bbabd..4a6a9e908 100644 --- a/commonspace/peermanager/mock_peermanager/mock_peermanager.go +++ b/commonspace/peermanager/mock_peermanager/mock_peermanager.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_peermanager/mock_peermanager.go github.com/anyproto/any-sync/commonspace/peermanager PeerManager // + // Package mock_peermanager is a generated GoMock package. package mock_peermanager @@ -22,6 +23,7 @@ import ( type MockPeerManager struct { ctrl *gomock.Controller recorder *MockPeerManagerMockRecorder + isgomock struct{} } // MockPeerManagerMockRecorder is the mock recorder for MockPeerManager. @@ -42,73 +44,73 @@ func (m *MockPeerManager) EXPECT() *MockPeerManagerMockRecorder { } // BroadcastMessage mocks base method. -func (m *MockPeerManager) BroadcastMessage(arg0 context.Context, arg1 drpc.Message) error { +func (m *MockPeerManager) BroadcastMessage(ctx context.Context, msg drpc.Message) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BroadcastMessage", arg0, arg1) + ret := m.ctrl.Call(m, "BroadcastMessage", ctx, msg) ret0, _ := ret[0].(error) return ret0 } // BroadcastMessage indicates an expected call of BroadcastMessage. -func (mr *MockPeerManagerMockRecorder) BroadcastMessage(arg0, arg1 any) *gomock.Call { +func (mr *MockPeerManagerMockRecorder) BroadcastMessage(ctx, msg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BroadcastMessage", reflect.TypeOf((*MockPeerManager)(nil).BroadcastMessage), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BroadcastMessage", reflect.TypeOf((*MockPeerManager)(nil).BroadcastMessage), ctx, msg) } // GetNodePeers mocks base method. -func (m *MockPeerManager) GetNodePeers(arg0 context.Context) ([]peer.Peer, error) { +func (m *MockPeerManager) GetNodePeers(ctx context.Context) ([]peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodePeers", arg0) + ret := m.ctrl.Call(m, "GetNodePeers", ctx) ret0, _ := ret[0].([]peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // GetNodePeers indicates an expected call of GetNodePeers. -func (mr *MockPeerManagerMockRecorder) GetNodePeers(arg0 any) *gomock.Call { +func (mr *MockPeerManagerMockRecorder) GetNodePeers(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodePeers", reflect.TypeOf((*MockPeerManager)(nil).GetNodePeers), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodePeers", reflect.TypeOf((*MockPeerManager)(nil).GetNodePeers), ctx) } // GetResponsiblePeers mocks base method. -func (m *MockPeerManager) GetResponsiblePeers(arg0 context.Context) ([]peer.Peer, error) { +func (m *MockPeerManager) GetResponsiblePeers(ctx context.Context) ([]peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetResponsiblePeers", arg0) + ret := m.ctrl.Call(m, "GetResponsiblePeers", ctx) ret0, _ := ret[0].([]peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // GetResponsiblePeers indicates an expected call of GetResponsiblePeers. -func (mr *MockPeerManagerMockRecorder) GetResponsiblePeers(arg0 any) *gomock.Call { +func (mr *MockPeerManagerMockRecorder) GetResponsiblePeers(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResponsiblePeers", reflect.TypeOf((*MockPeerManager)(nil).GetResponsiblePeers), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResponsiblePeers", reflect.TypeOf((*MockPeerManager)(nil).GetResponsiblePeers), ctx) } // Init mocks base method. -func (m *MockPeerManager) Init(arg0 *app.App) error { +func (m *MockPeerManager) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockPeerManagerMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockPeerManagerMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockPeerManager)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockPeerManager)(nil).Init), a) } // KeepAlive mocks base method. -func (m *MockPeerManager) KeepAlive(arg0 context.Context) { +func (m *MockPeerManager) KeepAlive(ctx context.Context) { m.ctrl.T.Helper() - m.ctrl.Call(m, "KeepAlive", arg0) + m.ctrl.Call(m, "KeepAlive", ctx) } // KeepAlive indicates an expected call of KeepAlive. -func (mr *MockPeerManagerMockRecorder) KeepAlive(arg0 any) *gomock.Call { +func (mr *MockPeerManagerMockRecorder) KeepAlive(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeepAlive", reflect.TypeOf((*MockPeerManager)(nil).KeepAlive), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeepAlive", reflect.TypeOf((*MockPeerManager)(nil).KeepAlive), ctx) } // Name mocks base method. @@ -126,15 +128,15 @@ func (mr *MockPeerManagerMockRecorder) Name() *gomock.Call { } // SendMessage mocks base method. -func (m *MockPeerManager) SendMessage(arg0 context.Context, arg1 string, arg2 drpc.Message) error { +func (m *MockPeerManager) SendMessage(ctx context.Context, peerId string, msg drpc.Message) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendMessage", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SendMessage", ctx, peerId, msg) ret0, _ := ret[0].(error) return ret0 } // SendMessage indicates an expected call of SendMessage. -func (mr *MockPeerManagerMockRecorder) SendMessage(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerManagerMockRecorder) SendMessage(ctx, peerId, msg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockPeerManager)(nil).SendMessage), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockPeerManager)(nil).SendMessage), ctx, peerId, msg) } diff --git a/commonspace/settings/settingsobject.go b/commonspace/settings/settingsobject.go index d0aeb83c1..6c61257ad 100644 --- a/commonspace/settings/settingsobject.go +++ b/commonspace/settings/settingsobject.go @@ -8,7 +8,6 @@ import ( "github.com/anyproto/any-sync/commonspace/deletionmanager" "github.com/anyproto/any-sync/util/crypto" - "github.com/anyproto/protobuf/proto" "go.uber.org/zap" "github.com/anyproto/any-sync/accountservice" @@ -236,7 +235,7 @@ func VerifyDeleteChange(raw *treechangeproto.RawTreeChangeWithId, identity crypt func verifyDeleteContent(data []byte, peerId string) (err error) { content := &spacesyncproto.SettingsData{} - err = proto.Unmarshal(data, content) + err = content.UnmarshalVT(data) if err != nil { return } diff --git a/commonspace/settings/settingsstate/changefactory.go b/commonspace/settings/settingsstate/changefactory.go index 21772b14b..8e50b4016 100644 --- a/commonspace/settings/settingsstate/changefactory.go +++ b/commonspace/settings/settingsstate/changefactory.go @@ -27,7 +27,7 @@ func (c *changeFactory) CreateObjectDeleteChange(id string, state *State, isSnap if isSnapshot { change.Snapshot = c.makeSnapshot(state, id) } - res, err = change.Marshal() + res, err = change.MarshalVT() return } diff --git a/commonspace/settings/settingsstate/changefactory_test.go b/commonspace/settings/settingsstate/changefactory_test.go index 883eade09..f94e043b9 100644 --- a/commonspace/settings/settingsstate/changefactory_test.go +++ b/commonspace/settings/settingsstate/changefactory_test.go @@ -3,7 +3,6 @@ package settingsstate import ( "testing" - "github.com/anyproto/protobuf/proto" "github.com/stretchr/testify/require" "golang.org/x/exp/slices" @@ -18,7 +17,7 @@ func TestChangeFactory_CreateObjectDeleteChange(t *testing.T) { marshalled, err := factory.CreateObjectDeleteChange("3", state, false) require.NoError(t, err) data := &spacesyncproto.SettingsData{} - err = proto.Unmarshal(marshalled, data) + err = data.UnmarshalVT(marshalled) require.NoError(t, err) require.Nil(t, data.Snapshot) require.Equal(t, "3", data.Content[0].Value.(*spacesyncproto.SpaceSettingsContent_ObjectDelete).ObjectDelete.Id) @@ -26,7 +25,7 @@ func TestChangeFactory_CreateObjectDeleteChange(t *testing.T) { marshalled, err = factory.CreateObjectDeleteChange("3", state, true) require.NoError(t, err) data = &spacesyncproto.SettingsData{} - err = proto.Unmarshal(marshalled, data) + err = data.UnmarshalVT(marshalled) require.NoError(t, err) slices.Sort(data.Snapshot.DeletedIds) require.Equal(t, &spacesyncproto.SpaceSettingsSnapshot{ diff --git a/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go b/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go index 8f64e3548..73df7c4f3 100644 --- a/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go +++ b/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_settingsstate/mock_settingsstate.go github.com/anyproto/any-sync/commonspace/settings/settingsstate StateBuilder,ChangeFactory // + // Package mock_settingsstate is a generated GoMock package. package mock_settingsstate @@ -20,6 +21,7 @@ import ( type MockStateBuilder struct { ctrl *gomock.Controller recorder *MockStateBuilderMockRecorder + isgomock struct{} } // MockStateBuilderMockRecorder is the mock recorder for MockStateBuilder. @@ -40,24 +42,25 @@ func (m *MockStateBuilder) EXPECT() *MockStateBuilderMockRecorder { } // Build mocks base method. -func (m *MockStateBuilder) Build(arg0 objecttree.ReadableObjectTree, arg1 *settingsstate.State) (*settingsstate.State, error) { +func (m *MockStateBuilder) Build(tree objecttree.ReadableObjectTree, state *settingsstate.State) (*settingsstate.State, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Build", arg0, arg1) + ret := m.ctrl.Call(m, "Build", tree, state) ret0, _ := ret[0].(*settingsstate.State) ret1, _ := ret[1].(error) return ret0, ret1 } // Build indicates an expected call of Build. -func (mr *MockStateBuilderMockRecorder) Build(arg0, arg1 any) *gomock.Call { +func (mr *MockStateBuilderMockRecorder) Build(tree, state any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockStateBuilder)(nil).Build), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockStateBuilder)(nil).Build), tree, state) } // MockChangeFactory is a mock of ChangeFactory interface. type MockChangeFactory struct { ctrl *gomock.Controller recorder *MockChangeFactoryMockRecorder + isgomock struct{} } // MockChangeFactoryMockRecorder is the mock recorder for MockChangeFactory. @@ -78,16 +81,16 @@ func (m *MockChangeFactory) EXPECT() *MockChangeFactoryMockRecorder { } // CreateObjectDeleteChange mocks base method. -func (m *MockChangeFactory) CreateObjectDeleteChange(arg0 string, arg1 *settingsstate.State, arg2 bool) ([]byte, error) { +func (m *MockChangeFactory) CreateObjectDeleteChange(id string, state *settingsstate.State, isSnapshot bool) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateObjectDeleteChange", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateObjectDeleteChange", id, state, isSnapshot) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateObjectDeleteChange indicates an expected call of CreateObjectDeleteChange. -func (mr *MockChangeFactoryMockRecorder) CreateObjectDeleteChange(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockChangeFactoryMockRecorder) CreateObjectDeleteChange(id, state, isSnapshot any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateObjectDeleteChange", reflect.TypeOf((*MockChangeFactory)(nil).CreateObjectDeleteChange), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateObjectDeleteChange", reflect.TypeOf((*MockChangeFactory)(nil).CreateObjectDeleteChange), id, state, isSnapshot) } diff --git a/commonspace/settings/settingsstate/statebuilder.go b/commonspace/settings/settingsstate/statebuilder.go index 7654d2ce2..4aa026ceb 100644 --- a/commonspace/settings/settingsstate/statebuilder.go +++ b/commonspace/settings/settingsstate/statebuilder.go @@ -3,7 +3,6 @@ package settingsstate import ( "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" "github.com/anyproto/any-sync/commonspace/spacesyncproto" - "github.com/anyproto/protobuf/proto" ) type StateBuilder interface { @@ -36,7 +35,7 @@ func (s *stateBuilder) Build(tr objecttree.ReadableObjectTree, oldState *State) } convert := func(ch *objecttree.Change, decrypted []byte) (res any, err error) { deleteChange := &spacesyncproto.SettingsData{} - err = proto.Unmarshal(decrypted, deleteChange) + err = deleteChange.UnmarshalVT(decrypted) if err != nil { return nil, err } diff --git a/commonspace/spacepayloads/payloads.go b/commonspace/spacepayloads/payloads.go index ecb10a0d7..a0f410e82 100644 --- a/commonspace/spacepayloads/payloads.go +++ b/commonspace/spacepayloads/payloads.go @@ -8,8 +8,6 @@ import ( "strings" "time" - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/object/acl/aclrecordproto" "github.com/anyproto/any-sync/commonspace/object/acl/list" "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" @@ -74,7 +72,7 @@ func StoragePayloadForSpaceCreate(payload SpaceCreatePayload) (storagePayload sp ReplicationKey: payload.ReplicationKey, Seed: spaceHeaderSeed, } - marshalled, err := header.Marshal() + marshalled, err := header.MarshalVT() if err != nil { return } @@ -83,7 +81,7 @@ func StoragePayloadForSpaceCreate(payload SpaceCreatePayload) (storagePayload sp return } rawHeader := &spacesyncproto.RawSpaceHeader{SpaceHeader: marshalled, Signature: signature} - marshalled, err = rawHeader.Marshal() + marshalled, err = rawHeader.MarshalVT() if err != nil { return } @@ -165,7 +163,7 @@ func StoragePayloadForSpaceDerive(payload SpaceDerivePayload) (storagePayload sp SpaceHeaderPayload: payload.SpacePayload, ReplicationKey: repKey, } - marshalled, err := header.Marshal() + marshalled, err := header.MarshalVT() if err != nil { return } @@ -174,7 +172,7 @@ func StoragePayloadForSpaceDerive(payload SpaceDerivePayload) (storagePayload sp return } rawHeader := &spacesyncproto.RawSpaceHeader{SpaceHeader: marshalled, Signature: signature} - marshalled, err = rawHeader.Marshal() + marshalled, err = rawHeader.MarshalVT() if err != nil { return } @@ -254,12 +252,12 @@ func ValidateSpaceHeader(rawHeaderWithId *spacesyncproto.RawSpaceHeaderWithId, i return objecttree.ErrIncorrectCid } var rawSpaceHeader spacesyncproto.RawSpaceHeader - err = proto.Unmarshal(rawHeaderWithId.RawHeader, &rawSpaceHeader) + err = rawSpaceHeader.UnmarshalVT(rawHeaderWithId.RawHeader) if err != nil { return } var header spacesyncproto.SpaceHeader - err = proto.Unmarshal(rawSpaceHeader.SpaceHeader, &header) + err = header.UnmarshalVT(rawSpaceHeader.SpaceHeader) if err != nil { return } @@ -289,12 +287,12 @@ func validateCreateSpaceAclPayload(rawWithId *consensusproto.RawRecordWithId) (s return } var rawAcl consensusproto.RawRecord - err = proto.Unmarshal(rawWithId.Payload, &rawAcl) + err = rawAcl.UnmarshalVT(rawWithId.Payload) if err != nil { return } var aclRoot aclrecordproto.AclRoot - err = proto.Unmarshal(rawAcl.Payload, &aclRoot) + err = aclRoot.UnmarshalVT(rawAcl.Payload) if err != nil { return } @@ -331,12 +329,12 @@ func validateCreateSpaceSettingsPayload(rawWithId *treechangeproto.RawTreeChange return } var raw treechangeproto.RawTreeChange - err = proto.Unmarshal(rawWithId.RawChange, &raw) + err = raw.UnmarshalVT(rawWithId.RawChange) if err != nil { return } var rootChange treechangeproto.RootChange - err = proto.Unmarshal(raw.Payload, &rootChange) + err = rootChange.UnmarshalVT(raw.Payload) if err != nil { return } diff --git a/commonspace/spacepayloads/payloads_test.go b/commonspace/spacepayloads/payloads_test.go index bd7ec2350..706c43897 100644 --- a/commonspace/spacepayloads/payloads_test.go +++ b/commonspace/spacepayloads/payloads_test.go @@ -50,7 +50,7 @@ func TestFailedHeaderPayloadForSpaceCreate_InvalidFormatSpaceId(t *testing.T) { Seed: spaceHeaderSeed, SpaceHeaderPayload: spaceHeaderPayload, } - marhalled, err := header.Marshal() + marhalled, err := header.MarshalVT() require.NoError(t, err) signature, err := accountKeys.SignKey.Sign(marhalled) require.NoError(t, err) @@ -58,7 +58,7 @@ func TestFailedHeaderPayloadForSpaceCreate_InvalidFormatSpaceId(t *testing.T) { SpaceHeader: marhalled, Signature: signature, } - marhalledRawHeader, err := rawHeader.Marshal() + marhalledRawHeader, err := rawHeader.MarshalVT() require.NoError(t, err) id, err := cidutil.NewCidFromBytes(marhalled) require.NoError(t, err) @@ -91,7 +91,7 @@ func TestFailedHeaderPayloadForSpaceCreate_CidIsWrong(t *testing.T) { Seed: spaceHeaderSeed, SpaceHeaderPayload: spaceHeaderPayload, } - marhalled, err := header.Marshal() + marhalled, err := header.MarshalVT() require.NoError(t, err) signature, err := accountKeys.SignKey.Sign(marhalled) require.NoError(t, err) @@ -99,7 +99,7 @@ func TestFailedHeaderPayloadForSpaceCreate_CidIsWrong(t *testing.T) { SpaceHeader: marhalled, Signature: signature, } - marhalledRawHeader, err := rawHeader.Marshal() + marhalledRawHeader, err := rawHeader.MarshalVT() require.NoError(t, err) id := "faisdfjpiocpoakopkop34" spaceId := fmt.Sprintf("%s.%s", id, strconv.FormatUint(replicationKey, 36)) @@ -131,7 +131,7 @@ func TestFailedHeaderPayloadForSpaceCreate_SignedWithAnotherIdentity(t *testing. Seed: spaceHeaderSeed, SpaceHeaderPayload: spaceHeaderPayload, } - marhalled, err := header.Marshal() + marhalled, err := header.MarshalVT() require.NoError(t, err) anotherAccountKeys, err := accountdata.NewRandom() signature, err := anotherAccountKeys.SignKey.Sign(marhalled) @@ -140,7 +140,7 @@ func TestFailedHeaderPayloadForSpaceCreate_SignedWithAnotherIdentity(t *testing. SpaceHeader: marhalled, Signature: signature, } - marhalledRawHeader, err := rawHeader.Marshal() + marhalledRawHeader, err := rawHeader.MarshalVT() require.NoError(t, err) id := "faisdfjpiocpoakopkop34" spaceId := fmt.Sprintf("%s.%s", id, strconv.FormatUint(replicationKey, 36)) @@ -188,14 +188,14 @@ func TestFailAclPayloadSpace_IncorrectCid(t *testing.T) { Timestamp: time.Now().Unix(), IdentitySignature: identitySignature, } - marshalled, err := aclRoot.Marshal() + marshalled, err := aclRoot.MarshalVT() require.NoError(t, err) signature, err := accountKeys.SignKey.Sign(marshalled) rawAclRecord := &consensusproto.RawRecord{ Payload: marshalled, Signature: signature, } - marshalledRaw, err := rawAclRecord.Marshal() + marshalledRaw, err := rawAclRecord.MarshalVT() require.NoError(t, err) aclHeadId := "rand" rawWithId := &consensusproto.RawRecordWithId{ @@ -231,13 +231,13 @@ func TestFailedAclPayloadSpace_IncorrectSignature(t *testing.T) { Timestamp: time.Now().Unix(), IdentitySignature: identitySignature, } - marshalled, err := aclRoot.Marshal() + marshalled, err := aclRoot.MarshalVT() require.NoError(t, err) rawAclRecord := &consensusproto.RawRecord{ Payload: marshalled, Signature: marshalled, } - marshalledRaw, err := rawAclRecord.Marshal() + marshalledRaw, err := rawAclRecord.MarshalVT() require.NoError(t, err) aclHeadId, err := cidutil.NewCidFromBytes(marshalledRaw) require.NoError(t, err) @@ -284,7 +284,7 @@ func TestFailedAclPayloadSpace_IncorrectIdentitySignature(t *testing.T) { Timestamp: time.Now().Unix(), IdentitySignature: identity, } - marshalled, err := aclRoot.Marshal() + marshalled, err := aclRoot.MarshalVT() if err != nil { return } @@ -293,7 +293,7 @@ func TestFailedAclPayloadSpace_IncorrectIdentitySignature(t *testing.T) { Payload: marshalled, Signature: signature, } - marshalledRaw, err := rawAclRecord.Marshal() + marshalledRaw, err := rawAclRecord.MarshalVT() if err != nil { return } @@ -330,7 +330,7 @@ func TestSuccessSettingsPayloadSpace(t *testing.T) { Identity: identity, ChangePayload: changePayload, } - marshalledChange, err := rootChange.Marshal() + marshalledChange, err := rootChange.MarshalVT() require.NoError(t, err) signature, err := accountKeys.SignKey.Sign(marshalledChange) require.NoError(t, err) @@ -338,7 +338,7 @@ func TestSuccessSettingsPayloadSpace(t *testing.T) { Payload: marshalledChange, Signature: signature, } - marshalledRawChange, err := raw.Marshal() + marshalledRawChange, err := raw.MarshalVT() id, err := cidutil.NewCidFromBytes(marshalledRawChange) require.NoError(t, err) rawIdChange := &treechangeproto.RawTreeChangeWithId{ @@ -370,13 +370,13 @@ func TestFailSettingsPayloadSpace_InvalidSignature(t *testing.T) { Identity: identity, ChangePayload: changePayload, } - marshalledChange, err := rootChange.Marshal() + marshalledChange, err := rootChange.MarshalVT() require.NoError(t, err) raw := &treechangeproto.RawTreeChange{ Payload: marshalledChange, Signature: marshalledChange, } - marshalledRawChange, err := raw.Marshal() + marshalledRawChange, err := raw.MarshalVT() id, err := cidutil.NewCidFromBytes(marshalledRawChange) require.NoError(t, err) rawIdChange := &treechangeproto.RawTreeChangeWithId{ @@ -407,7 +407,7 @@ func TestFailSettingsPayloadSpace_InvalidCid(t *testing.T) { Identity: identity, ChangePayload: changePayload, } - marshalledChange, err := rootChange.Marshal() + marshalledChange, err := rootChange.MarshalVT() require.NoError(t, err) signature, err := accountKeys.SignKey.Sign(marshalledChange) require.NoError(t, err) @@ -415,7 +415,7 @@ func TestFailSettingsPayloadSpace_InvalidCid(t *testing.T) { Payload: marshalledChange, Signature: signature, } - marshalledRawChange, err := raw.Marshal() + marshalledRawChange, err := raw.MarshalVT() id := "id" require.NoError(t, err) rawIdChange := &treechangeproto.RawTreeChangeWithId{ @@ -518,7 +518,7 @@ func rawSettingsPayload(accountKeys *accountdata.AccountKeys, spaceId, aclHeadId Identity: identity, ChangePayload: changePayload, } - marshalledChange, err := rootChange.Marshal() + marshalledChange, err := rootChange.MarshalVT() if err != nil { return } @@ -530,7 +530,7 @@ func rawSettingsPayload(accountKeys *accountdata.AccountKeys, spaceId, aclHeadId Payload: marshalledChange, Signature: signature, } - marshalledRawChange, err := raw.Marshal() + marshalledRawChange, err := raw.MarshalVT() id, err := cidutil.NewCidFromBytes(marshalledRawChange) if err != nil { return @@ -580,7 +580,7 @@ func rawAclWithId(accountKeys *accountdata.AccountKeys, spaceId string) (aclHead Timestamp: time.Now().Unix(), IdentitySignature: identitySignature, } - marshalled, err := aclRoot.Marshal() + marshalled, err := aclRoot.MarshalVT() if err != nil { return } @@ -589,7 +589,7 @@ func rawAclWithId(accountKeys *accountdata.AccountKeys, spaceId string) (aclHead Payload: marshalled, Signature: signature, } - marshalledRaw, err := rawAclRecord.Marshal() + marshalledRaw, err := rawAclRecord.MarshalVT() if err != nil { return } @@ -630,7 +630,7 @@ func rawHeaderWithId(accountKeys *accountdata.AccountKeys) (spaceId string, rawW Seed: spaceHeaderSeed, SpaceHeaderPayload: spaceHeaderPayload, } - marhalled, err := header.Marshal() + marhalled, err := header.MarshalVT() if err != nil { return } @@ -642,7 +642,7 @@ func rawHeaderWithId(accountKeys *accountdata.AccountKeys) (spaceId string, rawW SpaceHeader: marhalled, Signature: signature, } - marshalledRawHeader, err := rawHeader.Marshal() + marshalledRawHeader, err := rawHeader.MarshalVT() if err != nil { return } diff --git a/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go b/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go index 045059c4d..489cae309 100644 --- a/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go +++ b/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_spacestorage/mock_spacestorage.go github.com/anyproto/any-sync/commonspace/spacestorage SpaceStorage // + // Package mock_spacestorage is a generated GoMock package. package mock_spacestorage @@ -26,6 +27,7 @@ import ( type MockSpaceStorage struct { ctrl *gomock.Controller recorder *MockSpaceStorageMockRecorder + isgomock struct{} } // MockSpaceStorageMockRecorder is the mock recorder for MockSpaceStorage. @@ -75,32 +77,32 @@ func (mr *MockSpaceStorageMockRecorder) AnyStore() *gomock.Call { } // Close mocks base method. -func (m *MockSpaceStorage) Close(arg0 context.Context) error { +func (m *MockSpaceStorage) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockSpaceStorageMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockSpaceStorageMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSpaceStorage)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSpaceStorage)(nil).Close), ctx) } // CreateTreeStorage mocks base method. -func (m *MockSpaceStorage) CreateTreeStorage(arg0 context.Context, arg1 treestorage.TreeStorageCreatePayload) (objecttree.Storage, error) { +func (m *MockSpaceStorage) CreateTreeStorage(ctx context.Context, payload treestorage.TreeStorageCreatePayload) (objecttree.Storage, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTreeStorage", arg0, arg1) + ret := m.ctrl.Call(m, "CreateTreeStorage", ctx, payload) ret0, _ := ret[0].(objecttree.Storage) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateTreeStorage indicates an expected call of CreateTreeStorage. -func (mr *MockSpaceStorageMockRecorder) CreateTreeStorage(arg0, arg1 any) *gomock.Call { +func (mr *MockSpaceStorageMockRecorder) CreateTreeStorage(ctx, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTreeStorage", reflect.TypeOf((*MockSpaceStorage)(nil).CreateTreeStorage), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTreeStorage", reflect.TypeOf((*MockSpaceStorage)(nil).CreateTreeStorage), ctx, payload) } // HeadStorage mocks base method. @@ -132,17 +134,17 @@ func (mr *MockSpaceStorageMockRecorder) Id() *gomock.Call { } // Init mocks base method. -func (m *MockSpaceStorage) Init(arg0 *app.App) error { +func (m *MockSpaceStorage) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockSpaceStorageMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockSpaceStorageMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSpaceStorage)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSpaceStorage)(nil).Init), a) } // Name mocks base method. @@ -160,17 +162,17 @@ func (mr *MockSpaceStorageMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockSpaceStorage) Run(arg0 context.Context) error { +func (m *MockSpaceStorage) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockSpaceStorageMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockSpaceStorageMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSpaceStorage)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSpaceStorage)(nil).Run), ctx) } // StateStorage mocks base method. @@ -188,16 +190,16 @@ func (mr *MockSpaceStorageMockRecorder) StateStorage() *gomock.Call { } // TreeStorage mocks base method. -func (m *MockSpaceStorage) TreeStorage(arg0 context.Context, arg1 string) (objecttree.Storage, error) { +func (m *MockSpaceStorage) TreeStorage(ctx context.Context, id string) (objecttree.Storage, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TreeStorage", arg0, arg1) + ret := m.ctrl.Call(m, "TreeStorage", ctx, id) ret0, _ := ret[0].(objecttree.Storage) ret1, _ := ret[1].(error) return ret0, ret1 } // TreeStorage indicates an expected call of TreeStorage. -func (mr *MockSpaceStorageMockRecorder) TreeStorage(arg0, arg1 any) *gomock.Call { +func (mr *MockSpaceStorageMockRecorder) TreeStorage(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TreeStorage", reflect.TypeOf((*MockSpaceStorage)(nil).TreeStorage), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TreeStorage", reflect.TypeOf((*MockSpaceStorage)(nil).TreeStorage), ctx, id) } diff --git a/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go b/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go index 082e823e3..c9e6fd57d 100644 --- a/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go +++ b/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_spacesyncproto/mock_spacesyncproto.go github.com/anyproto/any-sync/commonspace/spacesyncproto DRPCSpaceSyncClient // + // Package mock_spacesyncproto is a generated GoMock package. package mock_spacesyncproto @@ -21,6 +22,7 @@ import ( type MockDRPCSpaceSyncClient struct { ctrl *gomock.Controller recorder *MockDRPCSpaceSyncClientMockRecorder + isgomock struct{} } // MockDRPCSpaceSyncClientMockRecorder is the mock recorder for MockDRPCSpaceSyncClient. @@ -41,33 +43,33 @@ func (m *MockDRPCSpaceSyncClient) EXPECT() *MockDRPCSpaceSyncClientMockRecorder } // AclAddRecord mocks base method. -func (m *MockDRPCSpaceSyncClient) AclAddRecord(arg0 context.Context, arg1 *spacesyncproto.AclAddRecordRequest) (*spacesyncproto.AclAddRecordResponse, error) { +func (m *MockDRPCSpaceSyncClient) AclAddRecord(ctx context.Context, in *spacesyncproto.AclAddRecordRequest) (*spacesyncproto.AclAddRecordResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclAddRecord", arg0, arg1) + ret := m.ctrl.Call(m, "AclAddRecord", ctx, in) ret0, _ := ret[0].(*spacesyncproto.AclAddRecordResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AclAddRecord indicates an expected call of AclAddRecord. -func (mr *MockDRPCSpaceSyncClientMockRecorder) AclAddRecord(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) AclAddRecord(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).AclAddRecord), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).AclAddRecord), ctx, in) } // AclGetRecords mocks base method. -func (m *MockDRPCSpaceSyncClient) AclGetRecords(arg0 context.Context, arg1 *spacesyncproto.AclGetRecordsRequest) (*spacesyncproto.AclGetRecordsResponse, error) { +func (m *MockDRPCSpaceSyncClient) AclGetRecords(ctx context.Context, in *spacesyncproto.AclGetRecordsRequest) (*spacesyncproto.AclGetRecordsResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclGetRecords", arg0, arg1) + ret := m.ctrl.Call(m, "AclGetRecords", ctx, in) ret0, _ := ret[0].(*spacesyncproto.AclGetRecordsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AclGetRecords indicates an expected call of AclGetRecords. -func (mr *MockDRPCSpaceSyncClientMockRecorder) AclGetRecords(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) AclGetRecords(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).AclGetRecords), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).AclGetRecords), ctx, in) } // DRPCConn mocks base method. @@ -85,93 +87,93 @@ func (mr *MockDRPCSpaceSyncClientMockRecorder) DRPCConn() *gomock.Call { } // HeadSync mocks base method. -func (m *MockDRPCSpaceSyncClient) HeadSync(arg0 context.Context, arg1 *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { +func (m *MockDRPCSpaceSyncClient) HeadSync(ctx context.Context, in *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HeadSync", arg0, arg1) + ret := m.ctrl.Call(m, "HeadSync", ctx, in) ret0, _ := ret[0].(*spacesyncproto.HeadSyncResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // HeadSync indicates an expected call of HeadSync. -func (mr *MockDRPCSpaceSyncClientMockRecorder) HeadSync(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) HeadSync(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadSync", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).HeadSync), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadSync", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).HeadSync), ctx, in) } // ObjectSync mocks base method. -func (m *MockDRPCSpaceSyncClient) ObjectSync(arg0 context.Context, arg1 *spacesyncproto.ObjectSyncMessage) (*spacesyncproto.ObjectSyncMessage, error) { +func (m *MockDRPCSpaceSyncClient) ObjectSync(ctx context.Context, in *spacesyncproto.ObjectSyncMessage) (*spacesyncproto.ObjectSyncMessage, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ObjectSync", arg0, arg1) + ret := m.ctrl.Call(m, "ObjectSync", ctx, in) ret0, _ := ret[0].(*spacesyncproto.ObjectSyncMessage) ret1, _ := ret[1].(error) return ret0, ret1 } // ObjectSync indicates an expected call of ObjectSync. -func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSync(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSync(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSync", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSync), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSync", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSync), ctx, in) } // ObjectSyncRequestStream mocks base method. -func (m *MockDRPCSpaceSyncClient) ObjectSyncRequestStream(arg0 context.Context, arg1 *spacesyncproto.ObjectSyncMessage) (spacesyncproto.DRPCSpaceSync_ObjectSyncRequestStreamClient, error) { +func (m *MockDRPCSpaceSyncClient) ObjectSyncRequestStream(ctx context.Context, in *spacesyncproto.ObjectSyncMessage) (spacesyncproto.DRPCSpaceSync_ObjectSyncRequestStreamClient, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ObjectSyncRequestStream", arg0, arg1) + ret := m.ctrl.Call(m, "ObjectSyncRequestStream", ctx, in) ret0, _ := ret[0].(spacesyncproto.DRPCSpaceSync_ObjectSyncRequestStreamClient) ret1, _ := ret[1].(error) return ret0, ret1 } // ObjectSyncRequestStream indicates an expected call of ObjectSyncRequestStream. -func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSyncRequestStream(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSyncRequestStream(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSyncRequestStream", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSyncRequestStream), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSyncRequestStream", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSyncRequestStream), ctx, in) } // ObjectSyncStream mocks base method. -func (m *MockDRPCSpaceSyncClient) ObjectSyncStream(arg0 context.Context) (spacesyncproto.DRPCSpaceSync_ObjectSyncStreamClient, error) { +func (m *MockDRPCSpaceSyncClient) ObjectSyncStream(ctx context.Context) (spacesyncproto.DRPCSpaceSync_ObjectSyncStreamClient, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ObjectSyncStream", arg0) + ret := m.ctrl.Call(m, "ObjectSyncStream", ctx) ret0, _ := ret[0].(spacesyncproto.DRPCSpaceSync_ObjectSyncStreamClient) ret1, _ := ret[1].(error) return ret0, ret1 } // ObjectSyncStream indicates an expected call of ObjectSyncStream. -func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSyncStream(arg0 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSyncStream(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSyncStream", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSyncStream), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSyncStream", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSyncStream), ctx) } // SpacePull mocks base method. -func (m *MockDRPCSpaceSyncClient) SpacePull(arg0 context.Context, arg1 *spacesyncproto.SpacePullRequest) (*spacesyncproto.SpacePullResponse, error) { +func (m *MockDRPCSpaceSyncClient) SpacePull(ctx context.Context, in *spacesyncproto.SpacePullRequest) (*spacesyncproto.SpacePullResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpacePull", arg0, arg1) + ret := m.ctrl.Call(m, "SpacePull", ctx, in) ret0, _ := ret[0].(*spacesyncproto.SpacePullResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SpacePull indicates an expected call of SpacePull. -func (mr *MockDRPCSpaceSyncClientMockRecorder) SpacePull(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) SpacePull(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacePull", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).SpacePull), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacePull", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).SpacePull), ctx, in) } // SpacePush mocks base method. -func (m *MockDRPCSpaceSyncClient) SpacePush(arg0 context.Context, arg1 *spacesyncproto.SpacePushRequest) (*spacesyncproto.SpacePushResponse, error) { +func (m *MockDRPCSpaceSyncClient) SpacePush(ctx context.Context, in *spacesyncproto.SpacePushRequest) (*spacesyncproto.SpacePushResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpacePush", arg0, arg1) + ret := m.ctrl.Call(m, "SpacePush", ctx, in) ret0, _ := ret[0].(*spacesyncproto.SpacePushResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SpacePush indicates an expected call of SpacePush. -func (mr *MockDRPCSpaceSyncClientMockRecorder) SpacePush(arg0, arg1 any) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) SpacePush(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacePush", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).SpacePush), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacePush", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).SpacePush), ctx, in) } // StoreDiff mocks base method. diff --git a/commonspace/spacesyncproto/spacesync.go b/commonspace/spacesyncproto/spacesync.go index 7575a8c51..64f27a0d6 100644 --- a/commonspace/spacesyncproto/spacesync.go +++ b/commonspace/spacesyncproto/spacesync.go @@ -2,7 +2,8 @@ package spacesyncproto import ( - "github.com/anyproto/protobuf/proto" + "github.com/anyproto/any-sync/protobuf" + "google.golang.org/protobuf/proto" "storj.io/drpc" ) @@ -18,8 +19,8 @@ type ClientFactory interface { Client(cc drpc.Conn) DRPCSpaceSyncClient } -func MarshallSyncMessage(message proto.Marshaler, spaceId, objectId string) (objMsg *ObjectSyncMessage, err error) { - payload, err := message.Marshal() +func MarshallSyncMessage(message proto.Message, spaceId, objectId string) (objMsg *ObjectSyncMessage, err error) { + payload, err := message.(protobuf.Message).MarshalVT() if err != nil { return } diff --git a/commonspace/spacesyncproto/spacesync.pb.go b/commonspace/spacesyncproto/spacesync.pb.go index 3e4cfb5e4..eeb3d821b 100644 --- a/commonspace/spacesyncproto/spacesync.pb.go +++ b/commonspace/spacesyncproto/spacesync.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: commonspace/spacesyncproto/protos/spacesync.proto package spacesyncproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ErrCodes int32 @@ -38,40 +37,61 @@ const ( ErrCodes_ErrorOffset ErrCodes = 100 ) -var ErrCodes_name = map[int32]string{ - 0: "Unexpected", - 1: "SpaceMissing", - 2: "SpaceExists", - 3: "SpaceNotInCache", - 4: "SpaceIsDeleted", - 5: "PeerIsNotResponsible", - 6: "ReceiptIsInvalid", - 7: "InvalidPayload", - 8: "DuplicateRequest", - 9: "TooManyRequestsFromPeer", - 100: "ErrorOffset", -} - -var ErrCodes_value = map[string]int32{ - "Unexpected": 0, - "SpaceMissing": 1, - "SpaceExists": 2, - "SpaceNotInCache": 3, - "SpaceIsDeleted": 4, - "PeerIsNotResponsible": 5, - "ReceiptIsInvalid": 6, - "InvalidPayload": 7, - "DuplicateRequest": 8, - "TooManyRequestsFromPeer": 9, - "ErrorOffset": 100, +// Enum value maps for ErrCodes. +var ( + ErrCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "SpaceMissing", + 2: "SpaceExists", + 3: "SpaceNotInCache", + 4: "SpaceIsDeleted", + 5: "PeerIsNotResponsible", + 6: "ReceiptIsInvalid", + 7: "InvalidPayload", + 8: "DuplicateRequest", + 9: "TooManyRequestsFromPeer", + 100: "ErrorOffset", + } + ErrCodes_value = map[string]int32{ + "Unexpected": 0, + "SpaceMissing": 1, + "SpaceExists": 2, + "SpaceNotInCache": 3, + "SpaceIsDeleted": 4, + "PeerIsNotResponsible": 5, + "ReceiptIsInvalid": 6, + "InvalidPayload": 7, + "DuplicateRequest": 8, + "TooManyRequestsFromPeer": 9, + "ErrorOffset": 100, + } +) + +func (x ErrCodes) Enum() *ErrCodes { + p := new(ErrCodes) + *p = x + return p } func (x ErrCodes) String() string { - return proto.EnumName(ErrCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrCodes) Descriptor() protoreflect.EnumDescriptor { + return file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[0].Descriptor() +} + +func (ErrCodes) Type() protoreflect.EnumType { + return &file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[0] +} + +func (x ErrCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ErrCodes.Descriptor instead. func (ErrCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{0} + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{0} } // SpaceSubscription contains in ObjectSyncMessage.Payload and indicates that we need to subscribe or unsubscribe the current stream to this space @@ -82,22 +102,43 @@ const ( SpaceSubscriptionAction_Unsubscribe SpaceSubscriptionAction = 1 ) -var SpaceSubscriptionAction_name = map[int32]string{ - 0: "Subscribe", - 1: "Unsubscribe", -} +// Enum value maps for SpaceSubscriptionAction. +var ( + SpaceSubscriptionAction_name = map[int32]string{ + 0: "Subscribe", + 1: "Unsubscribe", + } + SpaceSubscriptionAction_value = map[string]int32{ + "Subscribe": 0, + "Unsubscribe": 1, + } +) -var SpaceSubscriptionAction_value = map[string]int32{ - "Subscribe": 0, - "Unsubscribe": 1, +func (x SpaceSubscriptionAction) Enum() *SpaceSubscriptionAction { + p := new(SpaceSubscriptionAction) + *p = x + return p } func (x SpaceSubscriptionAction) String() string { - return proto.EnumName(SpaceSubscriptionAction_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SpaceSubscriptionAction) Descriptor() protoreflect.EnumDescriptor { + return file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[1].Descriptor() +} + +func (SpaceSubscriptionAction) Type() protoreflect.EnumType { + return &file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[1] +} + +func (x SpaceSubscriptionAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use SpaceSubscriptionAction.Descriptor instead. func (SpaceSubscriptionAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{1} + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{1} } // DiffType is a type of diff @@ -109,24 +150,45 @@ const ( DiffType_V2 DiffType = 2 ) -var DiffType_name = map[int32]string{ - 0: "Initial", - 1: "V1", - 2: "V2", -} +// Enum value maps for DiffType. +var ( + DiffType_name = map[int32]string{ + 0: "Initial", + 1: "V1", + 2: "V2", + } + DiffType_value = map[string]int32{ + "Initial": 0, + "V1": 1, + "V2": 2, + } +) -var DiffType_value = map[string]int32{ - "Initial": 0, - "V1": 1, - "V2": 2, +func (x DiffType) Enum() *DiffType { + p := new(DiffType) + *p = x + return p } func (x DiffType) String() string { - return proto.EnumName(DiffType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiffType) Descriptor() protoreflect.EnumDescriptor { + return file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[2].Descriptor() +} + +func (DiffType) Type() protoreflect.EnumType { + return &file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[2] +} + +func (x DiffType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use DiffType.Descriptor instead. func (DiffType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{2} + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{2} } // ObjectType is a type of object @@ -138,1530 +200,1363 @@ const ( ObjectType_KeyValue ObjectType = 2 ) -var ObjectType_name = map[int32]string{ - 0: "Tree", - 1: "Acl", - 2: "KeyValue", -} +// Enum value maps for ObjectType. +var ( + ObjectType_name = map[int32]string{ + 0: "Tree", + 1: "Acl", + 2: "KeyValue", + } + ObjectType_value = map[string]int32{ + "Tree": 0, + "Acl": 1, + "KeyValue": 2, + } +) -var ObjectType_value = map[string]int32{ - "Tree": 0, - "Acl": 1, - "KeyValue": 2, +func (x ObjectType) Enum() *ObjectType { + p := new(ObjectType) + *p = x + return p } func (x ObjectType) String() string { - return proto.EnumName(ObjectType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } +func (ObjectType) Descriptor() protoreflect.EnumDescriptor { + return file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[3].Descriptor() +} + +func (ObjectType) Type() protoreflect.EnumType { + return &file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes[3] +} + +func (x ObjectType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ObjectType.Descriptor instead. func (ObjectType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{3} + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{3} } // HeadSyncRange presenting a request for one range type HeadSyncRange struct { - From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` - To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` - Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - Elements bool `protobuf:"varint,4,opt,name=elements,proto3" json:"elements,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` + To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` + Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + Elements bool `protobuf:"varint,4,opt,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *HeadSyncRange) Reset() { *m = HeadSyncRange{} } -func (m *HeadSyncRange) String() string { return proto.CompactTextString(m) } -func (*HeadSyncRange) ProtoMessage() {} -func (*HeadSyncRange) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{0} -} -func (m *HeadSyncRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeadSyncRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeadSyncRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HeadSyncRange) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *HeadSyncRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeadSyncRange.Merge(m, src) +func (x *HeadSyncRange) Reset() { + *x = HeadSyncRange{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncRange) XXX_Size() int { - return m.Size() + +func (x *HeadSyncRange) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncRange) XXX_DiscardUnknown() { - xxx_messageInfo_HeadSyncRange.DiscardUnknown(m) + +func (*HeadSyncRange) ProtoMessage() {} + +func (x *HeadSyncRange) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HeadSyncRange proto.InternalMessageInfo +// Deprecated: Use HeadSyncRange.ProtoReflect.Descriptor instead. +func (*HeadSyncRange) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{0} +} -func (m *HeadSyncRange) GetFrom() uint64 { - if m != nil { - return m.From +func (x *HeadSyncRange) GetFrom() uint64 { + if x != nil { + return x.From } return 0 } -func (m *HeadSyncRange) GetTo() uint64 { - if m != nil { - return m.To +func (x *HeadSyncRange) GetTo() uint64 { + if x != nil { + return x.To } return 0 } -func (m *HeadSyncRange) GetLimit() uint32 { - if m != nil { - return m.Limit +func (x *HeadSyncRange) GetLimit() uint32 { + if x != nil { + return x.Limit } return 0 } -func (m *HeadSyncRange) GetElements() bool { - if m != nil { - return m.Elements +func (x *HeadSyncRange) GetElements() bool { + if x != nil { + return x.Elements } return false } // HeadSyncResult presenting a response for one range type HeadSyncResult struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Elements []*HeadSyncResultElement `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"` - Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Elements []*HeadSyncResultElement `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"` + Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *HeadSyncResult) Reset() { *m = HeadSyncResult{} } -func (m *HeadSyncResult) String() string { return proto.CompactTextString(m) } -func (*HeadSyncResult) ProtoMessage() {} -func (*HeadSyncResult) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{1} -} -func (m *HeadSyncResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeadSyncResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeadSyncResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HeadSyncResult) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *HeadSyncResult) Reset() { + *x = HeadSyncResult{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeadSyncResult.Merge(m, src) -} -func (m *HeadSyncResult) XXX_Size() int { - return m.Size() + +func (x *HeadSyncResult) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncResult) XXX_DiscardUnknown() { - xxx_messageInfo_HeadSyncResult.DiscardUnknown(m) + +func (*HeadSyncResult) ProtoMessage() {} + +func (x *HeadSyncResult) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HeadSyncResult proto.InternalMessageInfo +// Deprecated: Use HeadSyncResult.ProtoReflect.Descriptor instead. +func (*HeadSyncResult) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{1} +} -func (m *HeadSyncResult) GetHash() []byte { - if m != nil { - return m.Hash +func (x *HeadSyncResult) GetHash() []byte { + if x != nil { + return x.Hash } return nil } -func (m *HeadSyncResult) GetElements() []*HeadSyncResultElement { - if m != nil { - return m.Elements +func (x *HeadSyncResult) GetElements() []*HeadSyncResultElement { + if x != nil { + return x.Elements } return nil } -func (m *HeadSyncResult) GetCount() uint32 { - if m != nil { - return m.Count +func (x *HeadSyncResult) GetCount() uint32 { + if x != nil { + return x.Count } return 0 } // HeadSyncResultElement presenting state of one object type HeadSyncResultElement struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *HeadSyncResultElement) Reset() { *m = HeadSyncResultElement{} } -func (m *HeadSyncResultElement) String() string { return proto.CompactTextString(m) } -func (*HeadSyncResultElement) ProtoMessage() {} -func (*HeadSyncResultElement) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{2} -} -func (m *HeadSyncResultElement) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeadSyncResultElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeadSyncResultElement.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HeadSyncResultElement) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *HeadSyncResultElement) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeadSyncResultElement.Merge(m, src) +func (x *HeadSyncResultElement) Reset() { + *x = HeadSyncResultElement{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncResultElement) XXX_Size() int { - return m.Size() + +func (x *HeadSyncResultElement) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncResultElement) XXX_DiscardUnknown() { - xxx_messageInfo_HeadSyncResultElement.DiscardUnknown(m) + +func (*HeadSyncResultElement) ProtoMessage() {} + +func (x *HeadSyncResultElement) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HeadSyncResultElement proto.InternalMessageInfo +// Deprecated: Use HeadSyncResultElement.ProtoReflect.Descriptor instead. +func (*HeadSyncResultElement) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{2} +} -func (m *HeadSyncResultElement) GetId() string { - if m != nil { - return m.Id +func (x *HeadSyncResultElement) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *HeadSyncResultElement) GetHead() string { - if m != nil { - return m.Head +func (x *HeadSyncResultElement) GetHead() string { + if x != nil { + return x.Head } return "" } // HeadSyncRequest is a request for HeadSync type HeadSyncRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Ranges []*HeadSyncRange `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` - DiffType DiffType `protobuf:"varint,3,opt,name=diffType,proto3,enum=spacesync.DiffType" json:"diffType,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Ranges []*HeadSyncRange `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` + DiffType DiffType `protobuf:"varint,3,opt,name=diffType,proto3,enum=spacesync.DiffType" json:"diffType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *HeadSyncRequest) Reset() { *m = HeadSyncRequest{} } -func (m *HeadSyncRequest) String() string { return proto.CompactTextString(m) } -func (*HeadSyncRequest) ProtoMessage() {} -func (*HeadSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{3} -} -func (m *HeadSyncRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeadSyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeadSyncRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *HeadSyncRequest) Reset() { + *x = HeadSyncRequest{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *HeadSyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeadSyncRequest.Merge(m, src) -} -func (m *HeadSyncRequest) XXX_Size() int { - return m.Size() + +func (x *HeadSyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HeadSyncRequest.DiscardUnknown(m) + +func (*HeadSyncRequest) ProtoMessage() {} + +func (x *HeadSyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HeadSyncRequest proto.InternalMessageInfo +// Deprecated: Use HeadSyncRequest.ProtoReflect.Descriptor instead. +func (*HeadSyncRequest) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{3} +} -func (m *HeadSyncRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *HeadSyncRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *HeadSyncRequest) GetRanges() []*HeadSyncRange { - if m != nil { - return m.Ranges +func (x *HeadSyncRequest) GetRanges() []*HeadSyncRange { + if x != nil { + return x.Ranges } return nil } -func (m *HeadSyncRequest) GetDiffType() DiffType { - if m != nil { - return m.DiffType +func (x *HeadSyncRequest) GetDiffType() DiffType { + if x != nil { + return x.DiffType } return DiffType_Initial } // HeadSyncResponse is a response for HeadSync type HeadSyncResponse struct { - Results []*HeadSyncResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` - DiffType DiffType `protobuf:"varint,2,opt,name=diffType,proto3,enum=spacesync.DiffType" json:"diffType,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Results []*HeadSyncResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + DiffType DiffType `protobuf:"varint,2,opt,name=diffType,proto3,enum=spacesync.DiffType" json:"diffType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *HeadSyncResponse) Reset() { *m = HeadSyncResponse{} } -func (m *HeadSyncResponse) String() string { return proto.CompactTextString(m) } -func (*HeadSyncResponse) ProtoMessage() {} -func (*HeadSyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{4} -} -func (m *HeadSyncResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeadSyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeadSyncResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HeadSyncResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *HeadSyncResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeadSyncResponse.Merge(m, src) +func (x *HeadSyncResponse) Reset() { + *x = HeadSyncResponse{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncResponse) XXX_Size() int { - return m.Size() + +func (x *HeadSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HeadSyncResponse.DiscardUnknown(m) + +func (*HeadSyncResponse) ProtoMessage() {} + +func (x *HeadSyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HeadSyncResponse proto.InternalMessageInfo +// Deprecated: Use HeadSyncResponse.ProtoReflect.Descriptor instead. +func (*HeadSyncResponse) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{4} +} -func (m *HeadSyncResponse) GetResults() []*HeadSyncResult { - if m != nil { - return m.Results +func (x *HeadSyncResponse) GetResults() []*HeadSyncResult { + if x != nil { + return x.Results } return nil } -func (m *HeadSyncResponse) GetDiffType() DiffType { - if m != nil { - return m.DiffType +func (x *HeadSyncResponse) GetDiffType() DiffType { + if x != nil { + return x.DiffType } return DiffType_Initial } // ObjectSyncMessage is a message sent on object sync type ObjectSyncMessage struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` - ReplyId string `protobuf:"bytes,3,opt,name=replyId,proto3" json:"replyId,omitempty"` - Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` - ObjectId string `protobuf:"bytes,5,opt,name=objectId,proto3" json:"objectId,omitempty"` - ObjectType ObjectType `protobuf:"varint,6,opt,name=objectType,proto3,enum=spacesync.ObjectType" json:"objectType,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` + ReplyId string `protobuf:"bytes,3,opt,name=replyId,proto3" json:"replyId,omitempty"` + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` + ObjectId string `protobuf:"bytes,5,opt,name=objectId,proto3" json:"objectId,omitempty"` + ObjectType ObjectType `protobuf:"varint,6,opt,name=objectType,proto3,enum=spacesync.ObjectType" json:"objectType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *ObjectSyncMessage) Reset() { *m = ObjectSyncMessage{} } -func (m *ObjectSyncMessage) String() string { return proto.CompactTextString(m) } -func (*ObjectSyncMessage) ProtoMessage() {} -func (*ObjectSyncMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{5} -} -func (m *ObjectSyncMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObjectSyncMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ObjectSyncMessage) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *ObjectSyncMessage) Reset() { + *x = ObjectSyncMessage{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *ObjectSyncMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectSyncMessage.Merge(m, src) -} -func (m *ObjectSyncMessage) XXX_Size() int { - return m.Size() + +func (x *ObjectSyncMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ObjectSyncMessage) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectSyncMessage.DiscardUnknown(m) + +func (*ObjectSyncMessage) ProtoMessage() {} + +func (x *ObjectSyncMessage) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ObjectSyncMessage proto.InternalMessageInfo +// Deprecated: Use ObjectSyncMessage.ProtoReflect.Descriptor instead. +func (*ObjectSyncMessage) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{5} +} -func (m *ObjectSyncMessage) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *ObjectSyncMessage) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *ObjectSyncMessage) GetRequestId() string { - if m != nil { - return m.RequestId +func (x *ObjectSyncMessage) GetRequestId() string { + if x != nil { + return x.RequestId } return "" } -func (m *ObjectSyncMessage) GetReplyId() string { - if m != nil { - return m.ReplyId +func (x *ObjectSyncMessage) GetReplyId() string { + if x != nil { + return x.ReplyId } return "" } -func (m *ObjectSyncMessage) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *ObjectSyncMessage) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *ObjectSyncMessage) GetObjectId() string { - if m != nil { - return m.ObjectId +func (x *ObjectSyncMessage) GetObjectId() string { + if x != nil { + return x.ObjectId } return "" } -func (m *ObjectSyncMessage) GetObjectType() ObjectType { - if m != nil { - return m.ObjectType +func (x *ObjectSyncMessage) GetObjectType() ObjectType { + if x != nil { + return x.ObjectType } return ObjectType_Tree } // SpacePushRequest is a request to add space on a node containing only one acl record type SpacePushRequest struct { - Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Credential []byte `protobuf:"bytes,2,opt,name=Credential,proto3" json:"Credential,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Credential []byte `protobuf:"bytes,2,opt,name=Credential,proto3" json:"Credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpacePushRequest) Reset() { *m = SpacePushRequest{} } -func (m *SpacePushRequest) String() string { return proto.CompactTextString(m) } -func (*SpacePushRequest) ProtoMessage() {} -func (*SpacePushRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{6} -} -func (m *SpacePushRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpacePushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpacePushRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpacePushRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpacePushRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpacePushRequest.Merge(m, src) +func (x *SpacePushRequest) Reset() { + *x = SpacePushRequest{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpacePushRequest) XXX_Size() int { - return m.Size() + +func (x *SpacePushRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpacePushRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpacePushRequest.DiscardUnknown(m) + +func (*SpacePushRequest) ProtoMessage() {} + +func (x *SpacePushRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_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) } -var xxx_messageInfo_SpacePushRequest proto.InternalMessageInfo +// Deprecated: Use SpacePushRequest.ProtoReflect.Descriptor instead. +func (*SpacePushRequest) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{6} +} -func (m *SpacePushRequest) GetPayload() *SpacePayload { - if m != nil { - return m.Payload +func (x *SpacePushRequest) GetPayload() *SpacePayload { + if x != nil { + return x.Payload } return nil } -func (m *SpacePushRequest) GetCredential() []byte { - if m != nil { - return m.Credential +func (x *SpacePushRequest) GetCredential() []byte { + if x != nil { + return x.Credential } return nil } // SpacePushResponse is an empty response type SpacePushResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpacePushResponse) Reset() { *m = SpacePushResponse{} } -func (m *SpacePushResponse) String() string { return proto.CompactTextString(m) } -func (*SpacePushResponse) ProtoMessage() {} -func (*SpacePushResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{7} -} -func (m *SpacePushResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpacePushResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpacePushResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpacePushResponse) Reset() { + *x = SpacePushResponse{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpacePushResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpacePushResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpacePushResponse.Merge(m, src) -} -func (m *SpacePushResponse) XXX_Size() int { - return m.Size() + +func (x *SpacePushResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpacePushResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpacePushResponse.DiscardUnknown(m) + +func (*SpacePushResponse) ProtoMessage() {} + +func (x *SpacePushResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpacePushResponse proto.InternalMessageInfo +// Deprecated: Use SpacePushResponse.ProtoReflect.Descriptor instead. +func (*SpacePushResponse) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{7} +} // SpacePullRequest is a request to request a space on a node that doesn't have it type SpacePullRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpacePullRequest) Reset() { *m = SpacePullRequest{} } -func (m *SpacePullRequest) String() string { return proto.CompactTextString(m) } -func (*SpacePullRequest) ProtoMessage() {} -func (*SpacePullRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{8} -} -func (m *SpacePullRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpacePullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpacePullRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpacePullRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpacePullRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpacePullRequest.Merge(m, src) +func (x *SpacePullRequest) Reset() { + *x = SpacePullRequest{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpacePullRequest) XXX_Size() int { - return m.Size() + +func (x *SpacePullRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpacePullRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpacePullRequest.DiscardUnknown(m) + +func (*SpacePullRequest) ProtoMessage() {} + +func (x *SpacePullRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpacePullRequest proto.InternalMessageInfo +// Deprecated: Use SpacePullRequest.ProtoReflect.Descriptor instead. +func (*SpacePullRequest) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{8} +} -func (m *SpacePullRequest) GetId() string { - if m != nil { - return m.Id +func (x *SpacePullRequest) GetId() string { + if x != nil { + return x.Id } return "" } // SpacePullResponse is a response with header and acl root type SpacePullResponse struct { - Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpacePullResponse) Reset() { *m = SpacePullResponse{} } -func (m *SpacePullResponse) String() string { return proto.CompactTextString(m) } -func (*SpacePullResponse) ProtoMessage() {} -func (*SpacePullResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{9} -} -func (m *SpacePullResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpacePullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpacePullResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpacePullResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *SpacePullResponse) Reset() { + *x = SpacePullResponse{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpacePullResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpacePullResponse.Merge(m, src) -} -func (m *SpacePullResponse) XXX_Size() int { - return m.Size() + +func (x *SpacePullResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpacePullResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpacePullResponse.DiscardUnknown(m) + +func (*SpacePullResponse) ProtoMessage() {} + +func (x *SpacePullResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpacePullResponse proto.InternalMessageInfo +// Deprecated: Use SpacePullResponse.ProtoReflect.Descriptor instead. +func (*SpacePullResponse) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{9} +} -func (m *SpacePullResponse) GetPayload() *SpacePayload { - if m != nil { - return m.Payload +func (x *SpacePullResponse) GetPayload() *SpacePayload { + if x != nil { + return x.Payload } return nil } // SpacePayload is a payload for pushing a space type SpacePayload struct { - SpaceHeader *RawSpaceHeaderWithId `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"` - AclPayload []byte `protobuf:"bytes,2,opt,name=aclPayload,proto3" json:"aclPayload,omitempty"` - AclPayloadId string `protobuf:"bytes,3,opt,name=aclPayloadId,proto3" json:"aclPayloadId,omitempty"` - SpaceSettingsPayload []byte `protobuf:"bytes,4,opt,name=spaceSettingsPayload,proto3" json:"spaceSettingsPayload,omitempty"` - SpaceSettingsPayloadId string `protobuf:"bytes,5,opt,name=spaceSettingsPayloadId,proto3" json:"spaceSettingsPayloadId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceHeader *RawSpaceHeaderWithId `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"` + AclPayload []byte `protobuf:"bytes,2,opt,name=aclPayload,proto3" json:"aclPayload,omitempty"` + AclPayloadId string `protobuf:"bytes,3,opt,name=aclPayloadId,proto3" json:"aclPayloadId,omitempty"` + SpaceSettingsPayload []byte `protobuf:"bytes,4,opt,name=spaceSettingsPayload,proto3" json:"spaceSettingsPayload,omitempty"` + SpaceSettingsPayloadId string `protobuf:"bytes,5,opt,name=spaceSettingsPayloadId,proto3" json:"spaceSettingsPayloadId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpacePayload) Reset() { *m = SpacePayload{} } -func (m *SpacePayload) String() string { return proto.CompactTextString(m) } -func (*SpacePayload) ProtoMessage() {} -func (*SpacePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{10} -} -func (m *SpacePayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpacePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpacePayload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpacePayload) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpacePayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpacePayload.Merge(m, src) +func (x *SpacePayload) Reset() { + *x = SpacePayload{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpacePayload) XXX_Size() int { - return m.Size() + +func (x *SpacePayload) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpacePayload) XXX_DiscardUnknown() { - xxx_messageInfo_SpacePayload.DiscardUnknown(m) + +func (*SpacePayload) ProtoMessage() {} + +func (x *SpacePayload) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpacePayload proto.InternalMessageInfo +// Deprecated: Use SpacePayload.ProtoReflect.Descriptor instead. +func (*SpacePayload) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{10} +} -func (m *SpacePayload) GetSpaceHeader() *RawSpaceHeaderWithId { - if m != nil { - return m.SpaceHeader +func (x *SpacePayload) GetSpaceHeader() *RawSpaceHeaderWithId { + if x != nil { + return x.SpaceHeader } return nil } -func (m *SpacePayload) GetAclPayload() []byte { - if m != nil { - return m.AclPayload +func (x *SpacePayload) GetAclPayload() []byte { + if x != nil { + return x.AclPayload } return nil } -func (m *SpacePayload) GetAclPayloadId() string { - if m != nil { - return m.AclPayloadId +func (x *SpacePayload) GetAclPayloadId() string { + if x != nil { + return x.AclPayloadId } return "" } -func (m *SpacePayload) GetSpaceSettingsPayload() []byte { - if m != nil { - return m.SpaceSettingsPayload +func (x *SpacePayload) GetSpaceSettingsPayload() []byte { + if x != nil { + return x.SpaceSettingsPayload } return nil } -func (m *SpacePayload) GetSpaceSettingsPayloadId() string { - if m != nil { - return m.SpaceSettingsPayloadId +func (x *SpacePayload) GetSpaceSettingsPayloadId() string { + if x != nil { + return x.SpaceSettingsPayloadId } return "" } // SpaceHeader is a header for a space type SpaceHeader struct { - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - SpaceType string `protobuf:"bytes,3,opt,name=spaceType,proto3" json:"spaceType,omitempty"` - ReplicationKey uint64 `protobuf:"varint,4,opt,name=replicationKey,proto3" json:"replicationKey,omitempty"` - Seed []byte `protobuf:"bytes,5,opt,name=seed,proto3" json:"seed,omitempty"` - SpaceHeaderPayload []byte `protobuf:"bytes,6,opt,name=spaceHeaderPayload,proto3" json:"spaceHeaderPayload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + SpaceType string `protobuf:"bytes,3,opt,name=spaceType,proto3" json:"spaceType,omitempty"` + ReplicationKey uint64 `protobuf:"varint,4,opt,name=replicationKey,proto3" json:"replicationKey,omitempty"` + Seed []byte `protobuf:"bytes,5,opt,name=seed,proto3" json:"seed,omitempty"` + SpaceHeaderPayload []byte `protobuf:"bytes,6,opt,name=spaceHeaderPayload,proto3" json:"spaceHeaderPayload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceHeader) Reset() { *m = SpaceHeader{} } -func (m *SpaceHeader) String() string { return proto.CompactTextString(m) } -func (*SpaceHeader) ProtoMessage() {} -func (*SpaceHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{11} -} -func (m *SpaceHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpaceHeader) Reset() { + *x = SpaceHeader{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceHeader) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceHeader.Merge(m, src) -} -func (m *SpaceHeader) XXX_Size() int { - return m.Size() + +func (x *SpaceHeader) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceHeader) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceHeader.DiscardUnknown(m) + +func (*SpaceHeader) ProtoMessage() {} + +func (x *SpaceHeader) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceHeader proto.InternalMessageInfo +// Deprecated: Use SpaceHeader.ProtoReflect.Descriptor instead. +func (*SpaceHeader) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{11} +} -func (m *SpaceHeader) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *SpaceHeader) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *SpaceHeader) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *SpaceHeader) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *SpaceHeader) GetSpaceType() string { - if m != nil { - return m.SpaceType +func (x *SpaceHeader) GetSpaceType() string { + if x != nil { + return x.SpaceType } return "" } -func (m *SpaceHeader) GetReplicationKey() uint64 { - if m != nil { - return m.ReplicationKey +func (x *SpaceHeader) GetReplicationKey() uint64 { + if x != nil { + return x.ReplicationKey } return 0 } -func (m *SpaceHeader) GetSeed() []byte { - if m != nil { - return m.Seed +func (x *SpaceHeader) GetSeed() []byte { + if x != nil { + return x.Seed } return nil } -func (m *SpaceHeader) GetSpaceHeaderPayload() []byte { - if m != nil { - return m.SpaceHeaderPayload +func (x *SpaceHeader) GetSpaceHeaderPayload() []byte { + if x != nil { + return x.SpaceHeaderPayload } return nil } // RawSpaceHeader is raw header for SpaceHeader type RawSpaceHeader struct { - SpaceHeader []byte `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceHeader []byte `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RawSpaceHeader) Reset() { *m = RawSpaceHeader{} } -func (m *RawSpaceHeader) String() string { return proto.CompactTextString(m) } -func (*RawSpaceHeader) ProtoMessage() {} -func (*RawSpaceHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{12} -} -func (m *RawSpaceHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawSpaceHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RawSpaceHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RawSpaceHeader) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *RawSpaceHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawSpaceHeader.Merge(m, src) +func (x *RawSpaceHeader) Reset() { + *x = RawSpaceHeader{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RawSpaceHeader) XXX_Size() int { - return m.Size() + +func (x *RawSpaceHeader) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RawSpaceHeader) XXX_DiscardUnknown() { - xxx_messageInfo_RawSpaceHeader.DiscardUnknown(m) + +func (*RawSpaceHeader) ProtoMessage() {} + +func (x *RawSpaceHeader) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RawSpaceHeader proto.InternalMessageInfo +// Deprecated: Use RawSpaceHeader.ProtoReflect.Descriptor instead. +func (*RawSpaceHeader) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{12} +} -func (m *RawSpaceHeader) GetSpaceHeader() []byte { - if m != nil { - return m.SpaceHeader +func (x *RawSpaceHeader) GetSpaceHeader() []byte { + if x != nil { + return x.SpaceHeader } return nil } -func (m *RawSpaceHeader) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *RawSpaceHeader) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } // RawSpaceHeaderWithId is a marshalled RawSpaceHeader with its content id type RawSpaceHeaderWithId struct { - RawHeader []byte `protobuf:"bytes,1,opt,name=rawHeader,proto3" json:"rawHeader,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RawHeader []byte `protobuf:"bytes,1,opt,name=rawHeader,proto3" json:"rawHeader,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RawSpaceHeaderWithId) Reset() { *m = RawSpaceHeaderWithId{} } -func (m *RawSpaceHeaderWithId) String() string { return proto.CompactTextString(m) } -func (*RawSpaceHeaderWithId) ProtoMessage() {} -func (*RawSpaceHeaderWithId) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{13} -} -func (m *RawSpaceHeaderWithId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawSpaceHeaderWithId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RawSpaceHeaderWithId.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RawSpaceHeaderWithId) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *RawSpaceHeaderWithId) Reset() { + *x = RawSpaceHeaderWithId{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RawSpaceHeaderWithId) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawSpaceHeaderWithId.Merge(m, src) -} -func (m *RawSpaceHeaderWithId) XXX_Size() int { - return m.Size() + +func (x *RawSpaceHeaderWithId) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RawSpaceHeaderWithId) XXX_DiscardUnknown() { - xxx_messageInfo_RawSpaceHeaderWithId.DiscardUnknown(m) + +func (*RawSpaceHeaderWithId) ProtoMessage() {} + +func (x *RawSpaceHeaderWithId) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RawSpaceHeaderWithId proto.InternalMessageInfo +// Deprecated: Use RawSpaceHeaderWithId.ProtoReflect.Descriptor instead. +func (*RawSpaceHeaderWithId) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{13} +} -func (m *RawSpaceHeaderWithId) GetRawHeader() []byte { - if m != nil { - return m.RawHeader +func (x *RawSpaceHeaderWithId) GetRawHeader() []byte { + if x != nil { + return x.RawHeader } return nil } -func (m *RawSpaceHeaderWithId) GetId() string { - if m != nil { - return m.Id +func (x *RawSpaceHeaderWithId) GetId() string { + if x != nil { + return x.Id } return "" } // SpaceSettingsContent is a payload for a space settings object type SpaceSettingsContent struct { + state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Value: // // *SpaceSettingsContent_ObjectDelete // *SpaceSettingsContent_SpaceDelete - Value isSpaceSettingsContentValue `protobuf_oneof:"value"` + Value isSpaceSettingsContent_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceSettingsContent) Reset() { *m = SpaceSettingsContent{} } -func (m *SpaceSettingsContent) String() string { return proto.CompactTextString(m) } -func (*SpaceSettingsContent) ProtoMessage() {} -func (*SpaceSettingsContent) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{14} -} -func (m *SpaceSettingsContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceSettingsContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceSettingsContent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceSettingsContent) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceSettingsContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceSettingsContent.Merge(m, src) +func (x *SpaceSettingsContent) Reset() { + *x = SpaceSettingsContent{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceSettingsContent) XXX_Size() int { - return m.Size() -} -func (m *SpaceSettingsContent) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceSettingsContent.DiscardUnknown(m) + +func (x *SpaceSettingsContent) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_SpaceSettingsContent proto.InternalMessageInfo +func (*SpaceSettingsContent) ProtoMessage() {} -type isSpaceSettingsContentValue interface { - isSpaceSettingsContentValue() - MarshalTo([]byte) (int, error) - Size() int +func (x *SpaceSettingsContent) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type SpaceSettingsContent_ObjectDelete struct { - ObjectDelete *ObjectDelete `protobuf:"bytes,1,opt,name=objectDelete,proto3,oneof" json:"objectDelete,omitempty"` -} -type SpaceSettingsContent_SpaceDelete struct { - SpaceDelete *SpaceDelete `protobuf:"bytes,2,opt,name=spaceDelete,proto3,oneof" json:"spaceDelete,omitempty"` +// Deprecated: Use SpaceSettingsContent.ProtoReflect.Descriptor instead. +func (*SpaceSettingsContent) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{14} } -func (*SpaceSettingsContent_ObjectDelete) isSpaceSettingsContentValue() {} -func (*SpaceSettingsContent_SpaceDelete) isSpaceSettingsContentValue() {} - -func (m *SpaceSettingsContent) GetValue() isSpaceSettingsContentValue { - if m != nil { - return m.Value +func (x *SpaceSettingsContent) GetValue() isSpaceSettingsContent_Value { + if x != nil { + return x.Value } return nil } -func (m *SpaceSettingsContent) GetObjectDelete() *ObjectDelete { - if x, ok := m.GetValue().(*SpaceSettingsContent_ObjectDelete); ok { - return x.ObjectDelete +func (x *SpaceSettingsContent) GetObjectDelete() *ObjectDelete { + if x != nil { + if x, ok := x.Value.(*SpaceSettingsContent_ObjectDelete); ok { + return x.ObjectDelete + } } return nil } -func (m *SpaceSettingsContent) GetSpaceDelete() *SpaceDelete { - if x, ok := m.GetValue().(*SpaceSettingsContent_SpaceDelete); ok { - return x.SpaceDelete +func (x *SpaceSettingsContent) GetSpaceDelete() *SpaceDelete { + if x != nil { + if x, ok := x.Value.(*SpaceSettingsContent_SpaceDelete); ok { + return x.SpaceDelete + } } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SpaceSettingsContent) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SpaceSettingsContent_ObjectDelete)(nil), - (*SpaceSettingsContent_SpaceDelete)(nil), - } +type isSpaceSettingsContent_Value interface { + isSpaceSettingsContent_Value() } +type SpaceSettingsContent_ObjectDelete struct { + ObjectDelete *ObjectDelete `protobuf:"bytes,1,opt,name=objectDelete,proto3,oneof"` +} + +type SpaceSettingsContent_SpaceDelete struct { + SpaceDelete *SpaceDelete `protobuf:"bytes,2,opt,name=spaceDelete,proto3,oneof"` +} + +func (*SpaceSettingsContent_ObjectDelete) isSpaceSettingsContent_Value() {} + +func (*SpaceSettingsContent_SpaceDelete) isSpaceSettingsContent_Value() {} + // ObjectDelete is a message containing an object id which should be deleted type ObjectDelete struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *ObjectDelete) Reset() { *m = ObjectDelete{} } -func (m *ObjectDelete) String() string { return proto.CompactTextString(m) } -func (*ObjectDelete) ProtoMessage() {} -func (*ObjectDelete) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{15} -} -func (m *ObjectDelete) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObjectDelete.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ObjectDelete) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *ObjectDelete) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectDelete.Merge(m, src) +func (x *ObjectDelete) Reset() { + *x = ObjectDelete{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *ObjectDelete) XXX_Size() int { - return m.Size() + +func (x *ObjectDelete) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ObjectDelete) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectDelete.DiscardUnknown(m) + +func (*ObjectDelete) ProtoMessage() {} + +func (x *ObjectDelete) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ObjectDelete proto.InternalMessageInfo +// Deprecated: Use ObjectDelete.ProtoReflect.Descriptor instead. +func (*ObjectDelete) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{15} +} -func (m *ObjectDelete) GetId() string { - if m != nil { - return m.Id +func (x *ObjectDelete) GetId() string { + if x != nil { + return x.Id } return "" } // StoreHeader is a header for a store type StoreHeader struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - StorageName string `protobuf:"bytes,2,opt,name=storageName,proto3" json:"storageName,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + StorageName string `protobuf:"bytes,2,opt,name=storageName,proto3" json:"storageName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *StoreHeader) Reset() { *m = StoreHeader{} } -func (m *StoreHeader) String() string { return proto.CompactTextString(m) } -func (*StoreHeader) ProtoMessage() {} -func (*StoreHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{16} -} -func (m *StoreHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *StoreHeader) Reset() { + *x = StoreHeader{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *StoreHeader) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *StoreHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreHeader.Merge(m, src) -} -func (m *StoreHeader) XXX_Size() int { - return m.Size() + +func (x *StoreHeader) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StoreHeader) XXX_DiscardUnknown() { - xxx_messageInfo_StoreHeader.DiscardUnknown(m) + +func (*StoreHeader) ProtoMessage() {} + +func (x *StoreHeader) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StoreHeader proto.InternalMessageInfo +// Deprecated: Use StoreHeader.ProtoReflect.Descriptor instead. +func (*StoreHeader) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{16} +} -func (m *StoreHeader) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *StoreHeader) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *StoreHeader) GetStorageName() string { - if m != nil { - return m.StorageName +func (x *StoreHeader) GetStorageName() string { + if x != nil { + return x.StorageName } return "" } // SpaceDelete is a message containing deleter peer id type SpaceDelete struct { - DeleterPeerId string `protobuf:"bytes,1,opt,name=deleterPeerId,proto3" json:"deleterPeerId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DeleterPeerId string `protobuf:"bytes,1,opt,name=deleterPeerId,proto3" json:"deleterPeerId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceDelete) Reset() { *m = SpaceDelete{} } -func (m *SpaceDelete) String() string { return proto.CompactTextString(m) } -func (*SpaceDelete) ProtoMessage() {} -func (*SpaceDelete) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{17} -} -func (m *SpaceDelete) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceDelete.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceDelete) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceDelete) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceDelete.Merge(m, src) +func (x *SpaceDelete) Reset() { + *x = SpaceDelete{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceDelete) XXX_Size() int { - return m.Size() + +func (x *SpaceDelete) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceDelete) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceDelete.DiscardUnknown(m) + +func (*SpaceDelete) ProtoMessage() {} + +func (x *SpaceDelete) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceDelete proto.InternalMessageInfo +// Deprecated: Use SpaceDelete.ProtoReflect.Descriptor instead. +func (*SpaceDelete) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{17} +} -func (m *SpaceDelete) GetDeleterPeerId() string { - if m != nil { - return m.DeleterPeerId +func (x *SpaceDelete) GetDeleterPeerId() string { + if x != nil { + return x.DeleterPeerId } return "" } // SpaceSettingsSnapshot contains all the deleted ids in a snapshot type SpaceSettingsSnapshot struct { - DeletedIds []string `protobuf:"bytes,1,rep,name=deletedIds,proto3" json:"deletedIds,omitempty"` - DeleterPeerId string `protobuf:"bytes,2,opt,name=deleterPeerId,proto3" json:"deleterPeerId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DeletedIds []string `protobuf:"bytes,1,rep,name=deletedIds,proto3" json:"deletedIds,omitempty"` + DeleterPeerId string `protobuf:"bytes,2,opt,name=deleterPeerId,proto3" json:"deleterPeerId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceSettingsSnapshot) Reset() { *m = SpaceSettingsSnapshot{} } -func (m *SpaceSettingsSnapshot) String() string { return proto.CompactTextString(m) } -func (*SpaceSettingsSnapshot) ProtoMessage() {} -func (*SpaceSettingsSnapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{18} -} -func (m *SpaceSettingsSnapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceSettingsSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceSettingsSnapshot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceSettingsSnapshot) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *SpaceSettingsSnapshot) Reset() { + *x = SpaceSettingsSnapshot{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceSettingsSnapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceSettingsSnapshot.Merge(m, src) -} -func (m *SpaceSettingsSnapshot) XXX_Size() int { - return m.Size() + +func (x *SpaceSettingsSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceSettingsSnapshot) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceSettingsSnapshot.DiscardUnknown(m) + +func (*SpaceSettingsSnapshot) ProtoMessage() {} + +func (x *SpaceSettingsSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceSettingsSnapshot proto.InternalMessageInfo +// Deprecated: Use SpaceSettingsSnapshot.ProtoReflect.Descriptor instead. +func (*SpaceSettingsSnapshot) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{18} +} -func (m *SpaceSettingsSnapshot) GetDeletedIds() []string { - if m != nil { - return m.DeletedIds +func (x *SpaceSettingsSnapshot) GetDeletedIds() []string { + if x != nil { + return x.DeletedIds } return nil } -func (m *SpaceSettingsSnapshot) GetDeleterPeerId() string { - if m != nil { - return m.DeleterPeerId +func (x *SpaceSettingsSnapshot) GetDeleterPeerId() string { + if x != nil { + return x.DeleterPeerId } return "" } // SettingsData contains ObjectTree change payload type SettingsData struct { - Content []*SpaceSettingsContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` - Snapshot *SpaceSettingsSnapshot `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Content []*SpaceSettingsContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` + Snapshot *SpaceSettingsSnapshot `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SettingsData) Reset() { *m = SettingsData{} } -func (m *SettingsData) String() string { return proto.CompactTextString(m) } -func (*SettingsData) ProtoMessage() {} -func (*SettingsData) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{19} -} -func (m *SettingsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SettingsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SettingsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SettingsData) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SettingsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_SettingsData.Merge(m, src) +func (x *SettingsData) Reset() { + *x = SettingsData{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SettingsData) XXX_Size() int { - return m.Size() + +func (x *SettingsData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SettingsData) XXX_DiscardUnknown() { - xxx_messageInfo_SettingsData.DiscardUnknown(m) + +func (*SettingsData) ProtoMessage() {} + +func (x *SettingsData) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SettingsData proto.InternalMessageInfo +// Deprecated: Use SettingsData.ProtoReflect.Descriptor instead. +func (*SettingsData) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{19} +} -func (m *SettingsData) GetContent() []*SpaceSettingsContent { - if m != nil { - return m.Content +func (x *SettingsData) GetContent() []*SpaceSettingsContent { + if x != nil { + return x.Content } return nil } -func (m *SettingsData) GetSnapshot() *SpaceSettingsSnapshot { - if m != nil { - return m.Snapshot +func (x *SettingsData) GetSnapshot() *SpaceSettingsSnapshot { + if x != nil { + return x.Snapshot } return nil } type SpaceSubscription struct { - SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` - Action SpaceSubscriptionAction `protobuf:"varint,2,opt,name=action,proto3,enum=spacesync.SpaceSubscriptionAction" json:"action,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` + Action SpaceSubscriptionAction `protobuf:"varint,2,opt,name=action,proto3,enum=spacesync.SpaceSubscriptionAction" json:"action,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceSubscription) Reset() { *m = SpaceSubscription{} } -func (m *SpaceSubscription) String() string { return proto.CompactTextString(m) } -func (*SpaceSubscription) ProtoMessage() {} -func (*SpaceSubscription) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{20} -} -func (m *SpaceSubscription) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceSubscription.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpaceSubscription) Reset() { + *x = SpaceSubscription{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceSubscription) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceSubscription) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceSubscription.Merge(m, src) -} -func (m *SpaceSubscription) XXX_Size() int { - return m.Size() + +func (x *SpaceSubscription) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceSubscription) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceSubscription.DiscardUnknown(m) + +func (*SpaceSubscription) ProtoMessage() {} + +func (x *SpaceSubscription) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceSubscription proto.InternalMessageInfo +// Deprecated: Use SpaceSubscription.ProtoReflect.Descriptor instead. +func (*SpaceSubscription) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{20} +} -func (m *SpaceSubscription) GetSpaceIds() []string { - if m != nil { - return m.SpaceIds +func (x *SpaceSubscription) GetSpaceIds() []string { + if x != nil { + return x.SpaceIds } return nil } -func (m *SpaceSubscription) GetAction() SpaceSubscriptionAction { - if m != nil { - return m.Action +func (x *SpaceSubscription) GetAction() SpaceSubscriptionAction { + if x != nil { + return x.Action } return SpaceSubscriptionAction_Subscribe } // AclAddRecordRequest contains marshaled consensusproto.RawRecord type AclAddRecordRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAddRecordRequest) Reset() { *m = AclAddRecordRequest{} } -func (m *AclAddRecordRequest) String() string { return proto.CompactTextString(m) } -func (*AclAddRecordRequest) ProtoMessage() {} -func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{21} -} -func (m *AclAddRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAddRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAddRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAddRecordRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAddRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAddRecordRequest.Merge(m, src) +func (x *AclAddRecordRequest) Reset() { + *x = AclAddRecordRequest{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAddRecordRequest) XXX_Size() int { - return m.Size() + +func (x *AclAddRecordRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAddRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AclAddRecordRequest.DiscardUnknown(m) + +func (*AclAddRecordRequest) ProtoMessage() {} + +func (x *AclAddRecordRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAddRecordRequest proto.InternalMessageInfo +// Deprecated: Use AclAddRecordRequest.ProtoReflect.Descriptor instead. +func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{21} +} -func (m *AclAddRecordRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *AclAddRecordRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *AclAddRecordRequest) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *AclAddRecordRequest) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } // AclAddRecordResponse contains created record id and marshaled consensusproto.RawRecord type AclAddRecordResponse struct { - RecordId string `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RecordId string `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAddRecordResponse) Reset() { *m = AclAddRecordResponse{} } -func (m *AclAddRecordResponse) String() string { return proto.CompactTextString(m) } -func (*AclAddRecordResponse) ProtoMessage() {} -func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{22} -} -func (m *AclAddRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAddRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAddRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAddRecordResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AclAddRecordResponse) Reset() { + *x = AclAddRecordResponse{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAddRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAddRecordResponse.Merge(m, src) -} -func (m *AclAddRecordResponse) XXX_Size() int { - return m.Size() + +func (x *AclAddRecordResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAddRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AclAddRecordResponse.DiscardUnknown(m) + +func (*AclAddRecordResponse) ProtoMessage() {} + +func (x *AclAddRecordResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_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) } -var xxx_messageInfo_AclAddRecordResponse proto.InternalMessageInfo +// Deprecated: Use AclAddRecordResponse.ProtoReflect.Descriptor instead. +func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{22} +} -func (m *AclAddRecordResponse) GetRecordId() string { - if m != nil { - return m.RecordId +func (x *AclAddRecordResponse) GetRecordId() string { + if x != nil { + return x.RecordId } return "" } -func (m *AclAddRecordResponse) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *AclAddRecordResponse) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } @@ -1669,6567 +1564,862 @@ func (m *AclAddRecordResponse) GetPayload() []byte { // AclGetRecordsRequest can optionally contain the last known aclHead, the server will return only new records or an empty list if there are no new records. // If aclHead is not provided the whole list will be returned. type AclGetRecordsRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclGetRecordsRequest) Reset() { *m = AclGetRecordsRequest{} } -func (m *AclGetRecordsRequest) String() string { return proto.CompactTextString(m) } -func (*AclGetRecordsRequest) ProtoMessage() {} -func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{23} -} -func (m *AclGetRecordsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclGetRecordsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclGetRecordsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclGetRecordsRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclGetRecordsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclGetRecordsRequest.Merge(m, src) +func (x *AclGetRecordsRequest) Reset() { + *x = AclGetRecordsRequest{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclGetRecordsRequest) XXX_Size() int { - return m.Size() + +func (x *AclGetRecordsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclGetRecordsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AclGetRecordsRequest.DiscardUnknown(m) + +func (*AclGetRecordsRequest) ProtoMessage() {} + +func (x *AclGetRecordsRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_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) } -var xxx_messageInfo_AclGetRecordsRequest proto.InternalMessageInfo +// Deprecated: Use AclGetRecordsRequest.ProtoReflect.Descriptor instead. +func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{23} +} -func (m *AclGetRecordsRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *AclGetRecordsRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *AclGetRecordsRequest) GetAclHead() string { - if m != nil { - return m.AclHead +func (x *AclGetRecordsRequest) GetAclHead() string { + if x != nil { + return x.AclHead } return "" } // AclGetRecordsResponse contains list of marshaled consensusproto.RawRecordWithId type AclGetRecordsResponse struct { - Records [][]byte `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Records [][]byte `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclGetRecordsResponse) Reset() { *m = AclGetRecordsResponse{} } -func (m *AclGetRecordsResponse) String() string { return proto.CompactTextString(m) } -func (*AclGetRecordsResponse) ProtoMessage() {} -func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{24} -} -func (m *AclGetRecordsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclGetRecordsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclGetRecordsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AclGetRecordsResponse) Reset() { + *x = AclGetRecordsResponse{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclGetRecordsResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclGetRecordsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclGetRecordsResponse.Merge(m, src) -} -func (m *AclGetRecordsResponse) XXX_Size() int { - return m.Size() -} -func (m *AclGetRecordsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AclGetRecordsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AclGetRecordsResponse proto.InternalMessageInfo -func (m *AclGetRecordsResponse) GetRecords() [][]byte { - if m != nil { - return m.Records - } - return nil +func (x *AclGetRecordsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -type StoreDiffRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Ranges []*HeadSyncRange `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` -} +func (*AclGetRecordsResponse) ProtoMessage() {} -func (m *StoreDiffRequest) Reset() { *m = StoreDiffRequest{} } -func (m *StoreDiffRequest) String() string { return proto.CompactTextString(m) } -func (*StoreDiffRequest) ProtoMessage() {} -func (*StoreDiffRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{25} -} -func (m *StoreDiffRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreDiffRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreDiffRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *AclGetRecordsResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *StoreDiffRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *StoreDiffRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreDiffRequest.Merge(m, src) -} -func (m *StoreDiffRequest) XXX_Size() int { - return m.Size() -} -func (m *StoreDiffRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StoreDiffRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_StoreDiffRequest proto.InternalMessageInfo - -func (m *StoreDiffRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" +// Deprecated: Use AclGetRecordsResponse.ProtoReflect.Descriptor instead. +func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{24} } -func (m *StoreDiffRequest) GetRanges() []*HeadSyncRange { - if m != nil { - return m.Ranges +func (x *AclGetRecordsResponse) GetRecords() [][]byte { + if x != nil { + return x.Records } return nil } -type StoreDiffResponse struct { - Results []*HeadSyncResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +type StoreDiffRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Ranges []*HeadSyncRange `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *StoreDiffResponse) Reset() { *m = StoreDiffResponse{} } -func (m *StoreDiffResponse) String() string { return proto.CompactTextString(m) } -func (*StoreDiffResponse) ProtoMessage() {} -func (*StoreDiffResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{26} -} -func (m *StoreDiffResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreDiffResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreDiffResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StoreDiffResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *StoreDiffResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreDiffResponse.Merge(m, src) -} -func (m *StoreDiffResponse) XXX_Size() int { - return m.Size() -} -func (m *StoreDiffResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StoreDiffResponse.DiscardUnknown(m) +func (x *StoreDiffRequest) Reset() { + *x = StoreDiffRequest{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -var xxx_messageInfo_StoreDiffResponse proto.InternalMessageInfo - -func (m *StoreDiffResponse) GetResults() []*HeadSyncResult { - if m != nil { - return m.Results - } - return nil +func (x *StoreDiffRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -type StoreKeyValue struct { - KeyPeerId string `protobuf:"bytes,1,opt,name=keyPeerId,proto3" json:"keyPeerId,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - IdentitySignature []byte `protobuf:"bytes,3,opt,name=identitySignature,proto3" json:"identitySignature,omitempty"` - PeerSignature []byte `protobuf:"bytes,4,opt,name=peerSignature,proto3" json:"peerSignature,omitempty"` - SpaceId string `protobuf:"bytes,5,opt,name=spaceId,proto3" json:"spaceId,omitempty"` -} +func (*StoreDiffRequest) ProtoMessage() {} -func (m *StoreKeyValue) Reset() { *m = StoreKeyValue{} } -func (m *StoreKeyValue) String() string { return proto.CompactTextString(m) } -func (*StoreKeyValue) ProtoMessage() {} -func (*StoreKeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{27} -} -func (m *StoreKeyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *StoreDiffRequest) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *StoreKeyValue) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *StoreKeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKeyValue.Merge(m, src) -} -func (m *StoreKeyValue) XXX_Size() int { - return m.Size() -} -func (m *StoreKeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKeyValue.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_StoreKeyValue proto.InternalMessageInfo +// Deprecated: Use StoreDiffRequest.ProtoReflect.Descriptor instead. +func (*StoreDiffRequest) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{25} +} -func (m *StoreKeyValue) GetKeyPeerId() string { - if m != nil { - return m.KeyPeerId +func (x *StoreDiffRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *StoreKeyValue) GetValue() []byte { - if m != nil { - return m.Value +func (x *StoreDiffRequest) GetRanges() []*HeadSyncRange { + if x != nil { + return x.Ranges } return nil } -func (m *StoreKeyValue) GetIdentitySignature() []byte { - if m != nil { - return m.IdentitySignature - } - return nil +type StoreDiffResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Results []*HeadSyncResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *StoreKeyValue) GetPeerSignature() []byte { - if m != nil { - return m.PeerSignature - } - return nil +func (x *StoreDiffResponse) Reset() { + *x = StoreDiffResponse{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *StoreKeyValue) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" +func (x *StoreDiffResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -type StoreKeyValues struct { - KeyValues []*StoreKeyValue `protobuf:"bytes,1,rep,name=keyValues,proto3" json:"keyValues,omitempty"` -} +func (*StoreDiffResponse) ProtoMessage() {} -func (m *StoreKeyValues) Reset() { *m = StoreKeyValues{} } -func (m *StoreKeyValues) String() string { return proto.CompactTextString(m) } -func (*StoreKeyValues) ProtoMessage() {} -func (*StoreKeyValues) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{28} -} -func (m *StoreKeyValues) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKeyValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKeyValues.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *StoreDiffResponse) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) +} + +// Deprecated: Use StoreDiffResponse.ProtoReflect.Descriptor instead. +func (*StoreDiffResponse) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{26} } -func (m *StoreKeyValues) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *StoreDiffResponse) GetResults() []*HeadSyncResult { + if x != nil { + return x.Results } - return b, nil + return nil } -func (m *StoreKeyValues) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKeyValues.Merge(m, src) + +type StoreKeyValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyPeerId string `protobuf:"bytes,1,opt,name=keyPeerId,proto3" json:"keyPeerId,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + IdentitySignature []byte `protobuf:"bytes,3,opt,name=identitySignature,proto3" json:"identitySignature,omitempty"` + PeerSignature []byte `protobuf:"bytes,4,opt,name=peerSignature,proto3" json:"peerSignature,omitempty"` + SpaceId string `protobuf:"bytes,5,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *StoreKeyValues) XXX_Size() int { - return m.Size() + +func (x *StoreKeyValue) Reset() { + *x = StoreKeyValue{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *StoreKeyValues) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKeyValues.DiscardUnknown(m) + +func (x *StoreKeyValue) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_StoreKeyValues proto.InternalMessageInfo +func (*StoreKeyValue) ProtoMessage() {} -func (m *StoreKeyValues) GetKeyValues() []*StoreKeyValue { - if m != nil { - return m.KeyValues +func (x *StoreKeyValue) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type StoreKeyInner struct { - Peer []byte `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` - Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - TimestampMicro int64 `protobuf:"varint,4,opt,name=timestampMicro,proto3" json:"timestampMicro,omitempty"` - AclHeadId string `protobuf:"bytes,5,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"` - Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` +// Deprecated: Use StoreKeyValue.ProtoReflect.Descriptor instead. +func (*StoreKeyValue) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{27} } -func (m *StoreKeyInner) Reset() { *m = StoreKeyInner{} } -func (m *StoreKeyInner) String() string { return proto.CompactTextString(m) } -func (*StoreKeyInner) ProtoMessage() {} -func (*StoreKeyInner) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{29} -} -func (m *StoreKeyInner) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKeyInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKeyInner.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *StoreKeyValue) GetKeyPeerId() string { + if x != nil { + return x.KeyPeerId } -} -func (m *StoreKeyInner) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *StoreKeyInner) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKeyInner.Merge(m, src) -} -func (m *StoreKeyInner) XXX_Size() int { - return m.Size() -} -func (m *StoreKeyInner) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKeyInner.DiscardUnknown(m) + return "" } -var xxx_messageInfo_StoreKeyInner proto.InternalMessageInfo - -func (m *StoreKeyInner) GetPeer() []byte { - if m != nil { - return m.Peer +func (x *StoreKeyValue) GetValue() []byte { + if x != nil { + return x.Value } return nil } -func (m *StoreKeyInner) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *StoreKeyValue) GetIdentitySignature() []byte { + if x != nil { + return x.IdentitySignature } return nil } -func (m *StoreKeyInner) GetValue() []byte { - if m != nil { - return m.Value +func (x *StoreKeyValue) GetPeerSignature() []byte { + if x != nil { + return x.PeerSignature } return nil } -func (m *StoreKeyInner) GetTimestampMicro() int64 { - if m != nil { - return m.TimestampMicro +func (x *StoreKeyValue) GetSpaceId() string { + if x != nil { + return x.SpaceId } - return 0 + return "" } -func (m *StoreKeyInner) GetAclHeadId() string { - if m != nil { - return m.AclHeadId - } - return "" +type StoreKeyValues struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeyValues []*StoreKeyValue `protobuf:"bytes,1,rep,name=keyValues,proto3" json:"keyValues,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *StoreKeyInner) GetKey() string { - if m != nil { - return m.Key - } - return "" +func (x *StoreKeyValues) Reset() { + *x = StoreKeyValues{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -type StorageHeader struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - StorageName string `protobuf:"bytes,2,opt,name=storageName,proto3" json:"storageName,omitempty"` +func (x *StoreKeyValues) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageHeader) Reset() { *m = StorageHeader{} } -func (m *StorageHeader) String() string { return proto.CompactTextString(m) } -func (*StorageHeader) ProtoMessage() {} -func (*StorageHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_80e49f1f4ac27799, []int{30} -} -func (m *StorageHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StorageHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StorageHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*StoreKeyValues) ProtoMessage() {} + +func (x *StoreKeyValues) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *StorageHeader) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *StorageHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageHeader.Merge(m, src) -} -func (m *StorageHeader) XXX_Size() int { - return m.Size() -} -func (m *StorageHeader) XXX_DiscardUnknown() { - xxx_messageInfo_StorageHeader.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_StorageHeader proto.InternalMessageInfo +// Deprecated: Use StoreKeyValues.ProtoReflect.Descriptor instead. +func (*StoreKeyValues) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{28} +} -func (m *StorageHeader) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *StoreKeyValues) GetKeyValues() []*StoreKeyValue { + if x != nil { + return x.KeyValues } - return "" + return nil } -func (m *StorageHeader) GetStorageName() string { - if m != nil { - return m.StorageName - } - return "" +type StoreKeyInner struct { + state protoimpl.MessageState `protogen:"open.v1"` + Peer []byte `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` + Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + TimestampMicro int64 `protobuf:"varint,4,opt,name=timestampMicro,proto3" json:"timestampMicro,omitempty"` + AclHeadId string `protobuf:"bytes,5,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"` + Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func init() { - proto.RegisterEnum("spacesync.ErrCodes", ErrCodes_name, ErrCodes_value) - proto.RegisterEnum("spacesync.SpaceSubscriptionAction", SpaceSubscriptionAction_name, SpaceSubscriptionAction_value) - proto.RegisterEnum("spacesync.DiffType", DiffType_name, DiffType_value) - proto.RegisterEnum("spacesync.ObjectType", ObjectType_name, ObjectType_value) - proto.RegisterType((*HeadSyncRange)(nil), "spacesync.HeadSyncRange") - proto.RegisterType((*HeadSyncResult)(nil), "spacesync.HeadSyncResult") - proto.RegisterType((*HeadSyncResultElement)(nil), "spacesync.HeadSyncResultElement") - proto.RegisterType((*HeadSyncRequest)(nil), "spacesync.HeadSyncRequest") - proto.RegisterType((*HeadSyncResponse)(nil), "spacesync.HeadSyncResponse") - proto.RegisterType((*ObjectSyncMessage)(nil), "spacesync.ObjectSyncMessage") - proto.RegisterType((*SpacePushRequest)(nil), "spacesync.SpacePushRequest") - proto.RegisterType((*SpacePushResponse)(nil), "spacesync.SpacePushResponse") - proto.RegisterType((*SpacePullRequest)(nil), "spacesync.SpacePullRequest") - proto.RegisterType((*SpacePullResponse)(nil), "spacesync.SpacePullResponse") - proto.RegisterType((*SpacePayload)(nil), "spacesync.SpacePayload") - proto.RegisterType((*SpaceHeader)(nil), "spacesync.SpaceHeader") - proto.RegisterType((*RawSpaceHeader)(nil), "spacesync.RawSpaceHeader") - proto.RegisterType((*RawSpaceHeaderWithId)(nil), "spacesync.RawSpaceHeaderWithId") - proto.RegisterType((*SpaceSettingsContent)(nil), "spacesync.SpaceSettingsContent") - proto.RegisterType((*ObjectDelete)(nil), "spacesync.ObjectDelete") - proto.RegisterType((*StoreHeader)(nil), "spacesync.StoreHeader") - proto.RegisterType((*SpaceDelete)(nil), "spacesync.SpaceDelete") - proto.RegisterType((*SpaceSettingsSnapshot)(nil), "spacesync.SpaceSettingsSnapshot") - proto.RegisterType((*SettingsData)(nil), "spacesync.SettingsData") - proto.RegisterType((*SpaceSubscription)(nil), "spacesync.SpaceSubscription") - proto.RegisterType((*AclAddRecordRequest)(nil), "spacesync.AclAddRecordRequest") - proto.RegisterType((*AclAddRecordResponse)(nil), "spacesync.AclAddRecordResponse") - proto.RegisterType((*AclGetRecordsRequest)(nil), "spacesync.AclGetRecordsRequest") - proto.RegisterType((*AclGetRecordsResponse)(nil), "spacesync.AclGetRecordsResponse") - proto.RegisterType((*StoreDiffRequest)(nil), "spacesync.StoreDiffRequest") - proto.RegisterType((*StoreDiffResponse)(nil), "spacesync.StoreDiffResponse") - proto.RegisterType((*StoreKeyValue)(nil), "spacesync.StoreKeyValue") - proto.RegisterType((*StoreKeyValues)(nil), "spacesync.StoreKeyValues") - proto.RegisterType((*StoreKeyInner)(nil), "spacesync.StoreKeyInner") - proto.RegisterType((*StorageHeader)(nil), "spacesync.StorageHeader") -} - -func init() { - proto.RegisterFile("commonspace/spacesyncproto/protos/spacesync.proto", fileDescriptor_80e49f1f4ac27799) -} - -var fileDescriptor_80e49f1f4ac27799 = []byte{ - // 1572 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x18, 0x4d, 0x6f, 0x1b, 0x45, - 0x3b, 0xbb, 0x4e, 0x1c, 0xfb, 0x89, 0xe3, 0x6e, 0x26, 0x49, 0xe3, 0xd7, 0xad, 0x5c, 0x6b, 0xf4, - 0xaa, 0x6f, 0x14, 0xbd, 0xb4, 0x4d, 0x0a, 0x95, 0x5a, 0xe0, 0x90, 0x26, 0x69, 0x63, 0x4a, 0x9a, - 0x68, 0xdc, 0x0f, 0x09, 0x09, 0xa4, 0xcd, 0xee, 0x24, 0x59, 0xba, 0xde, 0x35, 0x3b, 0xe3, 0x36, - 0x3e, 0x72, 0xe2, 0x04, 0xe2, 0xcc, 0x7f, 0xe0, 0xc0, 0xbf, 0xe0, 0x58, 0x38, 0x71, 0x44, 0xed, - 0x9d, 0xdf, 0x80, 0x66, 0x76, 0x76, 0x76, 0xd6, 0x1f, 0xa5, 0xa8, 0x70, 0x89, 0xe7, 0x79, 0xe6, - 0xf9, 0xfe, 0x9c, 0x0d, 0x6c, 0x7a, 0x71, 0xaf, 0x17, 0x47, 0xac, 0xef, 0x7a, 0xf4, 0xba, 0xfc, - 0xcb, 0x86, 0x91, 0xd7, 0x4f, 0x62, 0x1e, 0x5f, 0x97, 0x7f, 0x59, 0x8e, 0xbd, 0x26, 0x11, 0xa8, - 0xaa, 0x11, 0x98, 0xc2, 0xe2, 0x3e, 0x75, 0xfd, 0xee, 0x30, 0xf2, 0x88, 0x1b, 0x9d, 0x52, 0x84, - 0x60, 0xf6, 0x24, 0x89, 0x7b, 0x0d, 0xab, 0x6d, 0xad, 0xcf, 0x12, 0x79, 0x46, 0x75, 0xb0, 0x79, - 0xdc, 0xb0, 0x25, 0xc6, 0xe6, 0x31, 0x5a, 0x81, 0xb9, 0x30, 0xe8, 0x05, 0xbc, 0x51, 0x6a, 0x5b, - 0xeb, 0x8b, 0x24, 0x05, 0x50, 0x13, 0x2a, 0x34, 0xa4, 0x3d, 0x1a, 0x71, 0xd6, 0x98, 0x6d, 0x5b, - 0xeb, 0x15, 0xa2, 0x61, 0x7c, 0x0e, 0x75, 0xad, 0x86, 0xb2, 0x41, 0xc8, 0x85, 0x9e, 0x33, 0x97, - 0x9d, 0x49, 0x3d, 0x35, 0x22, 0xcf, 0xe8, 0x23, 0x43, 0x82, 0xdd, 0x2e, 0xad, 0x2f, 0x6c, 0xb5, - 0xaf, 0xe5, 0xb6, 0x17, 0x05, 0xec, 0xa5, 0x84, 0xb9, 0x0e, 0x61, 0x95, 0x17, 0x0f, 0x22, 0x6d, - 0x95, 0x04, 0xf0, 0x87, 0xb0, 0x3a, 0x91, 0x51, 0x38, 0x15, 0xf8, 0x52, 0x7d, 0x95, 0xd8, 0x81, - 0x2f, 0x0d, 0xa2, 0xae, 0x2f, 0xdd, 0xac, 0x12, 0x79, 0xc6, 0xdf, 0x59, 0x70, 0x21, 0xe7, 0xfe, - 0x6a, 0x40, 0x19, 0x47, 0x0d, 0x98, 0x97, 0x36, 0x75, 0x32, 0xe6, 0x0c, 0x44, 0x37, 0xa0, 0x9c, - 0x88, 0x18, 0x66, 0xc6, 0x37, 0x26, 0x19, 0x2f, 0x08, 0x88, 0xa2, 0x43, 0xd7, 0xa1, 0xe2, 0x07, - 0x27, 0x27, 0x8f, 0x86, 0x7d, 0x2a, 0xad, 0xae, 0x6f, 0x2d, 0x1b, 0x3c, 0xbb, 0xea, 0x8a, 0x68, - 0x22, 0x7c, 0x0e, 0x8e, 0xe1, 0x4d, 0x3f, 0x8e, 0x18, 0x45, 0x37, 0x61, 0x3e, 0x91, 0x9e, 0xb1, - 0x86, 0x25, 0xf5, 0xfe, 0x67, 0x6a, 0xd0, 0x48, 0x46, 0x59, 0xd0, 0x6c, 0xbf, 0x8d, 0xe6, 0x5f, - 0x2d, 0x58, 0x3a, 0x3c, 0xfe, 0x92, 0x7a, 0x5c, 0x88, 0x3b, 0xa0, 0x8c, 0xb9, 0xa7, 0xf4, 0x0d, - 0xc1, 0xb8, 0x0c, 0xd5, 0x24, 0x8d, 0x58, 0x27, 0x8b, 0x69, 0x8e, 0x10, 0x7c, 0x09, 0xed, 0x87, - 0xc3, 0x8e, 0x2f, 0xfd, 0xae, 0x92, 0x0c, 0x14, 0x37, 0x7d, 0x77, 0x18, 0xc6, 0xae, 0x2f, 0x8b, - 0xa8, 0x46, 0x32, 0x50, 0xd4, 0x57, 0x2c, 0x0d, 0xe8, 0xf8, 0x8d, 0x39, 0xc9, 0xa4, 0x61, 0xf4, - 0x01, 0x40, 0x7a, 0x96, 0x0e, 0x95, 0xa5, 0x43, 0xab, 0x86, 0x43, 0x87, 0xfa, 0x92, 0x18, 0x84, - 0x98, 0x82, 0xd3, 0x15, 0x34, 0x47, 0x03, 0x76, 0x96, 0xe5, 0x77, 0x33, 0x37, 0x40, 0xb8, 0xb4, - 0xb0, 0xb5, 0x66, 0xc8, 0x49, 0xa9, 0xd3, 0xeb, 0xdc, 0xb2, 0x16, 0xc0, 0x4e, 0x42, 0x7d, 0x1a, - 0xf1, 0xc0, 0x0d, 0xa5, 0xb3, 0x35, 0x62, 0x60, 0xf0, 0x32, 0x2c, 0x19, 0x6a, 0xd2, 0xb4, 0x61, - 0xac, 0x75, 0x87, 0x61, 0xa6, 0x7b, 0xa4, 0x26, 0xf1, 0x3d, 0xcd, 0x28, 0x68, 0x54, 0xbe, 0xff, - 0xbe, 0x81, 0xf8, 0x6b, 0x1b, 0x6a, 0xe6, 0x0d, 0xda, 0x86, 0x05, 0xc9, 0x23, 0xca, 0x83, 0x26, - 0x4a, 0xce, 0x15, 0x43, 0x0e, 0x71, 0x5f, 0x74, 0x73, 0x82, 0xa7, 0x01, 0x3f, 0xeb, 0xf8, 0xc4, - 0xe4, 0x11, 0x4e, 0xbb, 0x5e, 0xa8, 0x04, 0x66, 0x4e, 0xe7, 0x18, 0x84, 0xa1, 0x96, 0x43, 0x3a, - 0xcf, 0x05, 0x1c, 0xda, 0x82, 0x15, 0x29, 0xb2, 0x4b, 0x39, 0x0f, 0xa2, 0x53, 0x76, 0x54, 0xc8, - 0xfc, 0xc4, 0x3b, 0x74, 0x0b, 0x2e, 0x4e, 0xc2, 0xeb, 0xa2, 0x98, 0x72, 0x8b, 0x7f, 0xb1, 0x60, - 0xc1, 0x70, 0x49, 0x94, 0x53, 0x20, 0x13, 0xc4, 0x87, 0x6a, 0x08, 0x69, 0x58, 0x14, 0x2f, 0x0f, - 0x7a, 0x94, 0x71, 0xb7, 0xd7, 0x97, 0xae, 0x95, 0x48, 0x8e, 0x10, 0xb7, 0x52, 0x87, 0x6e, 0xdb, - 0x2a, 0xc9, 0x11, 0xe8, 0x2a, 0xd4, 0x45, 0x2d, 0x07, 0x9e, 0xcb, 0x83, 0x38, 0x7a, 0x40, 0x87, - 0xd2, 0x9b, 0x59, 0x32, 0x82, 0x15, 0xf3, 0x86, 0x51, 0x9a, 0x5a, 0x5d, 0x23, 0xf2, 0x8c, 0xae, - 0x01, 0x32, 0x42, 0x9c, 0x45, 0xa3, 0x2c, 0x29, 0x26, 0xdc, 0xe0, 0x23, 0xa8, 0x17, 0x13, 0x85, - 0xda, 0xe3, 0x89, 0xad, 0x15, 0xf3, 0x26, 0xac, 0x0f, 0x4e, 0x23, 0x97, 0x0f, 0x12, 0xaa, 0xd2, - 0x96, 0x23, 0xf0, 0x2e, 0xac, 0x4c, 0x4a, 0xbd, 0x6c, 0x67, 0xf7, 0x45, 0x41, 0x6a, 0x8e, 0x50, - 0x75, 0x6b, 0xeb, 0xba, 0xfd, 0xc1, 0x82, 0x95, 0xae, 0x99, 0x86, 0x9d, 0x38, 0xe2, 0x62, 0xe8, - 0x7e, 0x0c, 0xb5, 0xb4, 0xfd, 0x76, 0x69, 0x48, 0x39, 0x9d, 0x50, 0xc0, 0x87, 0xc6, 0xf5, 0xfe, - 0x0c, 0x29, 0x90, 0xa3, 0x3b, 0xca, 0x3b, 0xc5, 0x6d, 0x4b, 0xee, 0x8b, 0xa3, 0xe5, 0xaf, 0x99, - 0x4d, 0xe2, 0xbb, 0xf3, 0x30, 0xf7, 0xdc, 0x0d, 0x07, 0x14, 0xb7, 0xa0, 0x66, 0x2a, 0x19, 0x6b, - 0xba, 0x0e, 0x2c, 0x74, 0x79, 0x9c, 0x64, 0xf1, 0x9a, 0x3e, 0xe2, 0x44, 0xac, 0x79, 0x9c, 0xb8, - 0xa7, 0xf4, 0xa1, 0xdb, 0xa3, 0xca, 0x7d, 0x13, 0x85, 0x6f, 0xaa, 0x92, 0x53, 0x9a, 0xfe, 0x0b, - 0x8b, 0xbe, 0x3c, 0x25, 0x47, 0x94, 0x26, 0x5a, 0x60, 0x11, 0x89, 0x3f, 0x87, 0xd5, 0x42, 0xec, - 0xba, 0x91, 0xdb, 0x67, 0x67, 0x31, 0x17, 0x1d, 0x97, 0x52, 0xfa, 0x1d, 0x3f, 0x9d, 0xf5, 0x55, - 0x62, 0x60, 0xc6, 0xc5, 0xdb, 0x93, 0xc4, 0x7f, 0x63, 0x41, 0x2d, 0x13, 0xbd, 0xeb, 0x72, 0x17, - 0xdd, 0x86, 0x79, 0x2f, 0x4d, 0x8f, 0xda, 0x1f, 0x57, 0x46, 0x03, 0x3a, 0x92, 0x45, 0x92, 0xd1, - 0x8b, 0x85, 0xcd, 0x94, 0x75, 0x2a, 0x19, 0xed, 0x69, 0xbc, 0x99, 0x17, 0x44, 0x73, 0xe0, 0x67, - 0x6a, 0xba, 0x75, 0x07, 0xc7, 0xcc, 0x4b, 0x82, 0xbe, 0xe8, 0x0c, 0xd1, 0x96, 0x2a, 0xbe, 0x99, - 0x8b, 0x1a, 0x46, 0x77, 0xa0, 0xec, 0x7a, 0x82, 0x4a, 0xad, 0x2c, 0x3c, 0xa6, 0xcc, 0x90, 0xb4, - 0x2d, 0x29, 0x89, 0xe2, 0xc0, 0x1d, 0x58, 0xde, 0xf6, 0xc2, 0x6d, 0xdf, 0x27, 0xd4, 0x8b, 0x13, - 0xff, 0xaf, 0xb7, 0xb9, 0xb1, 0x88, 0xec, 0xc2, 0x22, 0xc2, 0x9f, 0xc2, 0x4a, 0x51, 0x94, 0x1a, - 0xcc, 0x4d, 0xa8, 0x24, 0x12, 0xa3, 0x85, 0x69, 0xf8, 0x0d, 0xd2, 0x3e, 0x91, 0xd2, 0xee, 0x53, - 0x9e, 0x4a, 0x63, 0x6f, 0x65, 0x99, 0xeb, 0x85, 0xfb, 0xf9, 0x63, 0x25, 0x03, 0xf1, 0x26, 0xac, - 0x8e, 0xc8, 0x52, 0xa6, 0xc9, 0x7d, 0x2b, 0x51, 0x32, 0xa8, 0x35, 0x92, 0x81, 0xf8, 0x0b, 0x70, - 0x64, 0xb5, 0x8b, 0x95, 0xff, 0x2f, 0x3c, 0x71, 0xf0, 0x3e, 0x2c, 0x19, 0xf2, 0xdf, 0xe1, 0xc9, - 0x82, 0x7f, 0xb2, 0x60, 0x51, 0x8a, 0x7a, 0x40, 0x87, 0x4f, 0x44, 0x27, 0x8b, 0xa1, 0xf4, 0x8c, - 0x0e, 0x0b, 0xbd, 0x94, 0x23, 0xc4, 0x7b, 0x50, 0x36, 0xbc, 0x0a, 0x78, 0x0a, 0xa0, 0xff, 0xc3, - 0x52, 0x36, 0xe6, 0xbb, 0x7a, 0x0c, 0x96, 0x24, 0xc5, 0xf8, 0x85, 0x68, 0xa9, 0x3e, 0xa5, 0x49, - 0x4e, 0x99, 0x6e, 0xa6, 0x22, 0xd2, 0x8c, 0xd7, 0x5c, 0x21, 0x5e, 0x78, 0x1f, 0xea, 0x05, 0x93, - 0x19, 0xba, 0x25, 0x6d, 0x4e, 0x01, 0xe5, 0xbc, 0x19, 0xc4, 0x02, 0x35, 0xc9, 0x49, 0xf1, 0x8f, - 0x86, 0xf7, 0x9d, 0x28, 0xa2, 0x89, 0x58, 0x20, 0xc2, 0x8c, 0xec, 0x05, 0x2d, 0xce, 0x85, 0xa5, - 0x66, 0x8f, 0x2c, 0x35, 0x1d, 0x8f, 0x92, 0x19, 0x8f, 0xab, 0x50, 0xd7, 0x9b, 0xed, 0x20, 0xf0, - 0x92, 0x58, 0xba, 0x58, 0x22, 0x23, 0x58, 0x11, 0x6b, 0x55, 0x65, 0xda, 0xcb, 0x1c, 0x81, 0x1c, - 0x28, 0x3d, 0xa3, 0x43, 0xb9, 0xa9, 0xaa, 0x44, 0x1c, 0xf1, 0x83, 0xd4, 0x5c, 0xf7, 0xf4, 0x1f, - 0x98, 0xa3, 0x1b, 0x7f, 0x58, 0x50, 0xd9, 0x4b, 0x92, 0x9d, 0xd8, 0xa7, 0x0c, 0xd5, 0x01, 0x1e, - 0x47, 0xf4, 0xbc, 0x4f, 0x3d, 0x4e, 0x7d, 0x67, 0x06, 0x39, 0xea, 0x6d, 0x73, 0x10, 0x30, 0x16, - 0x44, 0xa7, 0x8e, 0x85, 0x2e, 0xa8, 0xb1, 0xbb, 0x77, 0x1e, 0x30, 0xce, 0x1c, 0x1b, 0x2d, 0xc3, - 0x05, 0x89, 0x78, 0x18, 0xf3, 0x4e, 0xb4, 0xe3, 0x7a, 0x67, 0xd4, 0x29, 0x21, 0x04, 0x75, 0x89, - 0xec, 0xb0, 0x74, 0x3c, 0xfb, 0xce, 0x2c, 0x6a, 0xc0, 0x8a, 0xac, 0x1e, 0xf6, 0x30, 0xe6, 0xaa, - 0x5a, 0x83, 0xe3, 0x90, 0x3a, 0x73, 0x68, 0x05, 0x1c, 0x42, 0x3d, 0x1a, 0xf4, 0x79, 0x87, 0x75, - 0xa2, 0xe7, 0x6e, 0x18, 0xf8, 0x4e, 0x59, 0xc8, 0x50, 0x80, 0x5a, 0xc9, 0xce, 0xbc, 0xa0, 0xdc, - 0x1d, 0xa4, 0xab, 0x9e, 0xaa, 0x8e, 0x72, 0x2a, 0xe8, 0x12, 0xac, 0x3d, 0x8a, 0xe3, 0x03, 0x37, - 0x1a, 0x2a, 0x1c, 0xbb, 0x97, 0xc4, 0x3d, 0xa1, 0xcc, 0xa9, 0x0a, 0x83, 0xf7, 0x92, 0x24, 0x4e, - 0x0e, 0x4f, 0x4e, 0x18, 0xe5, 0x8e, 0xbf, 0x71, 0x1b, 0xd6, 0xa6, 0x0c, 0x34, 0xb4, 0x08, 0x55, - 0x85, 0x3d, 0xa6, 0xce, 0x8c, 0x60, 0x7d, 0x1c, 0x31, 0x8d, 0xb0, 0x36, 0xfe, 0x07, 0x95, 0xec, - 0xf9, 0x8e, 0x16, 0x60, 0xbe, 0x13, 0x05, 0xe2, 0x0d, 0xea, 0xcc, 0xa0, 0x32, 0xd8, 0x4f, 0x36, - 0x1d, 0x4b, 0xfe, 0x6e, 0x39, 0xf6, 0xc6, 0x7b, 0x00, 0xf9, 0xb3, 0x18, 0x55, 0x60, 0xf6, 0x51, - 0x42, 0x85, 0xc4, 0x79, 0x28, 0x6d, 0x7b, 0xa1, 0x63, 0xa1, 0x1a, 0x54, 0xb2, 0x4a, 0x74, 0xec, - 0xad, 0x6f, 0xcb, 0x50, 0x4d, 0x6d, 0x1a, 0x46, 0x1e, 0xda, 0x81, 0x4a, 0xd6, 0xa7, 0xa8, 0x39, - 0xb1, 0x79, 0xa5, 0x93, 0xcd, 0x4b, 0x93, 0x1b, 0x3b, 0x1d, 0x03, 0xf7, 0xa0, 0xaa, 0x67, 0x03, - 0xba, 0x34, 0xda, 0x05, 0xc6, 0x44, 0x6a, 0x5e, 0x9e, 0x7c, 0xa9, 0xe4, 0xdc, 0x57, 0xad, 0xb1, - 0x97, 0x7d, 0x0a, 0x4e, 0xed, 0xa8, 0xe6, 0xd4, 0x9b, 0x75, 0xeb, 0x86, 0x25, 0x0d, 0xca, 0x1e, - 0xea, 0x45, 0x83, 0x46, 0xbe, 0x12, 0x8a, 0x06, 0x8d, 0xbe, 0xed, 0x0d, 0x39, 0x61, 0x38, 0x49, - 0x8e, 0x7e, 0xf1, 0x4f, 0x92, 0x63, 0x3c, 0xf5, 0x09, 0x38, 0xf9, 0x37, 0x57, 0x97, 0x27, 0xd4, - 0xed, 0xa1, 0xcb, 0x63, 0x8f, 0x25, 0xe3, 0x83, 0xac, 0xf9, 0xc6, 0x5b, 0xe9, 0xe3, 0x7e, 0x96, - 0x76, 0x99, 0xbb, 0x77, 0x90, 0x86, 0x9e, 0xc2, 0x5a, 0x8e, 0x54, 0x0e, 0xbd, 0xbb, 0x91, 0x37, - 0x2c, 0x74, 0x08, 0x35, 0x73, 0xc1, 0xa2, 0x96, 0x41, 0x3f, 0x61, 0x89, 0x37, 0xaf, 0x4c, 0xbd, - 0xd7, 0x71, 0x5c, 0x2c, 0xec, 0x45, 0x34, 0xc2, 0x31, 0xb6, 0x7d, 0x9b, 0xed, 0xe9, 0x04, 0xa9, - 0xcc, 0xbb, 0xef, 0xff, 0xfc, 0xaa, 0x65, 0xbd, 0x7c, 0xd5, 0xb2, 0x7e, 0x7f, 0xd5, 0xb2, 0xbe, - 0x7f, 0xdd, 0x9a, 0x79, 0xf9, 0xba, 0x35, 0xf3, 0xdb, 0xeb, 0xd6, 0xcc, 0x67, 0xcd, 0xe9, 0xff, - 0x91, 0x39, 0x2e, 0xcb, 0x9f, 0x9b, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x8f, 0x50, 0x36, - 0xb6, 0x11, 0x00, 0x00, -} - -func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *StoreKeyInner) Reset() { + *x = StoreKeyInner{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *StoreKeyInner) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Elements { - i-- - if m.Elements { - dAtA[i] = 1 - } else { - dAtA[i] = 0 +func (*StoreKeyInner) ProtoMessage() {} + +func (x *StoreKeyInner) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x20 - } - if m.Limit != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x18 + return ms } - if m.To != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.To)) - i-- - dAtA[i] = 0x10 - } - if m.From != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.From)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *HeadSyncResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// Deprecated: Use StoreKeyInner.ProtoReflect.Descriptor instead. +func (*StoreKeyInner) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{29} } -func (m *HeadSyncResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *StoreKeyInner) GetPeer() []byte { + if x != nil { + return x.Peer + } + return nil } -func (m *HeadSyncResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Count != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x18 - } - if len(m.Elements) > 0 { - for iNdEx := len(m.Elements) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Elements[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } +func (x *StoreKeyInner) GetIdentity() []byte { + if x != nil { + return x.Identity } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return nil } -func (m *HeadSyncResultElement) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *StoreKeyInner) GetValue() []byte { + if x != nil { + return x.Value } - return dAtA[:n], nil + return nil } -func (m *HeadSyncResultElement) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *StoreKeyInner) GetTimestampMicro() int64 { + if x != nil { + return x.TimestampMicro + } + return 0 } -func (m *HeadSyncResultElement) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Head) > 0 { - i -= len(m.Head) - copy(dAtA[i:], m.Head) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Head))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa +func (x *StoreKeyInner) GetAclHeadId() string { + if x != nil { + return x.AclHeadId } - return len(dAtA) - i, nil + return "" } -func (m *HeadSyncRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *StoreKeyInner) GetKey() string { + if x != nil { + return x.Key } - return dAtA[:n], nil + return "" } -func (m *HeadSyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type StorageHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + StorageName string `protobuf:"bytes,2,opt,name=storageName,proto3" json:"storageName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *HeadSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DiffType != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.DiffType)) - i-- - dAtA[i] = 0x18 - } - if len(m.Ranges) > 0 { - for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ranges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func (x *StorageHeader) Reset() { + *x = StorageHeader{} + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *HeadSyncResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *StorageHeader) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HeadSyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*StorageHeader) ProtoMessage() {} -func (m *HeadSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DiffType != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.DiffType)) - i-- - dAtA[i] = 0x10 - } - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *StorageHeader) ProtoReflect() protoreflect.Message { + mi := &file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *ObjectSyncMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ObjectSyncMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use StorageHeader.ProtoReflect.Descriptor instead. +func (*StorageHeader) Descriptor() ([]byte, []int) { + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP(), []int{30} } -func (m *ObjectSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ObjectType != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.ObjectType)) - i-- - dAtA[i] = 0x30 +func (x *StorageHeader) GetSpaceId() string { + if x != nil { + return x.SpaceId } - if len(m.ObjectId) > 0 { - i -= len(m.ObjectId) - copy(dAtA[i:], m.ObjectId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.ObjectId))) - i-- - dAtA[i] = 0x2a - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x22 - } - if len(m.ReplyId) > 0 { - i -= len(m.ReplyId) - copy(dAtA[i:], m.ReplyId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.ReplyId))) - i-- - dAtA[i] = 0x1a - } - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return "" } -func (m *SpacePushRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *StorageHeader) GetStorageName() string { + if x != nil { + return x.StorageName } - return dAtA[:n], nil + return "" } -func (m *SpacePushRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var File_commonspace_spacesyncproto_protos_spacesync_proto protoreflect.FileDescriptor + +var file_commonspace_spacesyncproto_protos_spacesync_proto_rawDesc = string([]byte{ + 0x0a, 0x31, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x22, 0x65, + 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x02, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x78, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3c, 0x0a, 0x08, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, + 0x6e, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x3b, 0x0a, 0x15, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x22, 0x8e, 0x01, 0x0a, + 0x0f, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x08, + 0x64, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x22, 0x78, 0x0a, + 0x10, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x69, 0x66, 0x66, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, + 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x49, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x65, 0x0a, 0x10, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x0a, 0x10, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x11, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x41, 0x0a, 0x0b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x52, 0x61, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x0b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x6c, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x63, + 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x6c, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x61, 0x63, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x36, 0x0a, 0x16, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x16, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x12, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x50, 0x0a, 0x0e, + 0x52, 0x61, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x44, + 0x0a, 0x14, 0x52, 0x61, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x61, 0x77, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, + 0x0c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0c, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x0b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x1e, 0x0a, 0x0c, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x49, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x0b, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, + 0x64, 0x22, 0x5d, 0x0a, 0x15, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x49, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, + 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x6b, 0x0a, 0x11, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x13, 0x41, 0x63, 0x6c, 0x41, 0x64, + 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x4c, 0x0a, 0x14, 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x4a, 0x0a, 0x14, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x22, 0x31, 0x0a, 0x15, + 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, + 0x5e, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, + 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, + 0x6e, 0x63, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, + 0x48, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6b, + 0x65, 0x79, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6b, 0x65, 0x79, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x2c, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, + 0x0d, 0x70, 0x65, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x48, 0x0a, + 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6b, 0x65, + 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x65, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x26, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x63, 0x72, + 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x6c, 0x48, 0x65, + 0x61, 0x64, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x6c, 0x48, + 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0xee, 0x01, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x70, 0x61, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x74, + 0x49, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x04, 0x12, 0x18, 0x0a, + 0x14, 0x50, 0x65, 0x65, 0x72, 0x49, 0x73, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x69, 0x62, 0x6c, 0x65, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x49, 0x73, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x06, 0x12, 0x12, 0x0a, + 0x0e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x10, + 0x07, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x6f, 0x6f, 0x4d, 0x61, + 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x65, + 0x65, 0x72, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x10, 0x64, 0x2a, 0x39, 0x0a, 0x17, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x10, 0x00, 0x12, + 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x10, 0x01, + 0x2a, 0x27, 0x0a, 0x08, 0x44, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, + 0x01, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x02, 0x2a, 0x2d, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x10, + 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x63, 0x6c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x65, + 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x32, 0x8d, 0x06, 0x0a, 0x09, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x43, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x64, 0x53, 0x79, + 0x6e, 0x63, 0x12, 0x1a, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x18, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x09, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x75, 0x6c, + 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x10, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x12, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x48, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x1c, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x57, 0x0a, 0x17, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1c, 0x5a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *SpacePushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Credential) > 0 { - i -= len(m.Credential) - copy(dAtA[i:], m.Credential) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Credential))) - i-- - dAtA[i] = 0x12 - } - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpacePushResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpacePushResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpacePushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *SpacePullRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpacePullRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpacePullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpacePullResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpacePullResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpacePullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpacePayload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpacePayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpacePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceSettingsPayloadId) > 0 { - i -= len(m.SpaceSettingsPayloadId) - copy(dAtA[i:], m.SpaceSettingsPayloadId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceSettingsPayloadId))) - i-- - dAtA[i] = 0x2a - } - if len(m.SpaceSettingsPayload) > 0 { - i -= len(m.SpaceSettingsPayload) - copy(dAtA[i:], m.SpaceSettingsPayload) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceSettingsPayload))) - i-- - dAtA[i] = 0x22 - } - if len(m.AclPayloadId) > 0 { - i -= len(m.AclPayloadId) - copy(dAtA[i:], m.AclPayloadId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.AclPayloadId))) - i-- - dAtA[i] = 0x1a - } - if len(m.AclPayload) > 0 { - i -= len(m.AclPayload) - copy(dAtA[i:], m.AclPayload) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.AclPayload))) - i-- - dAtA[i] = 0x12 - } - if m.SpaceHeader != nil { - { - size, err := m.SpaceHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceHeaderPayload) > 0 { - i -= len(m.SpaceHeaderPayload) - copy(dAtA[i:], m.SpaceHeaderPayload) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceHeaderPayload))) - i-- - dAtA[i] = 0x32 - } - if len(m.Seed) > 0 { - i -= len(m.Seed) - copy(dAtA[i:], m.Seed) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Seed))) - i-- - dAtA[i] = 0x2a - } - if m.ReplicationKey != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.ReplicationKey)) - i-- - dAtA[i] = 0x20 - } - if len(m.SpaceType) > 0 { - i -= len(m.SpaceType) - copy(dAtA[i:], m.SpaceType) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceType))) - i-- - dAtA[i] = 0x1a - } - if m.Timestamp != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x10 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RawSpaceHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RawSpaceHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RawSpaceHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceHeader) > 0 { - i -= len(m.SpaceHeader) - copy(dAtA[i:], m.SpaceHeader) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceHeader))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RawSpaceHeaderWithId) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RawSpaceHeaderWithId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RawSpaceHeaderWithId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.RawHeader) > 0 { - i -= len(m.RawHeader) - copy(dAtA[i:], m.RawHeader) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.RawHeader))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceSettingsContent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceSettingsContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSettingsContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SpaceSettingsContent_ObjectDelete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSettingsContent_ObjectDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ObjectDelete != nil { - { - size, err := m.ObjectDelete.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SpaceSettingsContent_SpaceDelete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSettingsContent_SpaceDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SpaceDelete != nil { - { - size, err := m.SpaceDelete.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ObjectDelete) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ObjectDelete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ObjectDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StoreHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StorageName) > 0 { - i -= len(m.StorageName) - copy(dAtA[i:], m.StorageName) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.StorageName))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceDelete) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceDelete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeleterPeerId) > 0 { - i -= len(m.DeleterPeerId) - copy(dAtA[i:], m.DeleterPeerId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.DeleterPeerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceSettingsSnapshot) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceSettingsSnapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSettingsSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeleterPeerId) > 0 { - i -= len(m.DeleterPeerId) - copy(dAtA[i:], m.DeleterPeerId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.DeleterPeerId))) - i-- - dAtA[i] = 0x12 - } - if len(m.DeletedIds) > 0 { - for iNdEx := len(m.DeletedIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DeletedIds[iNdEx]) - copy(dAtA[i:], m.DeletedIds[iNdEx]) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.DeletedIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SettingsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SettingsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SettingsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Snapshot != nil { - { - size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Content) > 0 { - for iNdEx := len(m.Content) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Content[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SpaceSubscription) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceSubscription) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Action != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.Action)) - i-- - dAtA[i] = 0x10 - } - if len(m.SpaceIds) > 0 { - for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SpaceIds[iNdEx]) - copy(dAtA[i:], m.SpaceIds[iNdEx]) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AclAddRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAddRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAddRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAddRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAddRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAddRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if len(m.RecordId) > 0 { - i -= len(m.RecordId) - copy(dAtA[i:], m.RecordId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.RecordId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclGetRecordsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclGetRecordsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclGetRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AclHead) > 0 { - i -= len(m.AclHead) - copy(dAtA[i:], m.AclHead) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.AclHead))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclGetRecordsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclGetRecordsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclGetRecordsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Records[iNdEx]) - copy(dAtA[i:], m.Records[iNdEx]) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Records[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *StoreDiffRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreDiffRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreDiffRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ranges) > 0 { - for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ranges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StoreDiffResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreDiffResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreDiffResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *StoreKeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreKeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x2a - } - if len(m.PeerSignature) > 0 { - i -= len(m.PeerSignature) - copy(dAtA[i:], m.PeerSignature) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.PeerSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.IdentitySignature) > 0 { - i -= len(m.IdentitySignature) - copy(dAtA[i:], m.IdentitySignature) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.IdentitySignature))) - i-- - dAtA[i] = 0x1a - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.KeyPeerId) > 0 { - i -= len(m.KeyPeerId) - copy(dAtA[i:], m.KeyPeerId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.KeyPeerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StoreKeyValues) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreKeyValues) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKeyValues) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.KeyValues) > 0 { - for iNdEx := len(m.KeyValues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.KeyValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpacesync(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *StoreKeyInner) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreKeyInner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKeyInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x32 - } - if len(m.AclHeadId) > 0 { - i -= len(m.AclHeadId) - copy(dAtA[i:], m.AclHeadId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.AclHeadId))) - i-- - dAtA[i] = 0x2a - } - if m.TimestampMicro != 0 { - i = encodeVarintSpacesync(dAtA, i, uint64(m.TimestampMicro)) - i-- - dAtA[i] = 0x20 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x12 - } - if len(m.Peer) > 0 { - i -= len(m.Peer) - copy(dAtA[i:], m.Peer) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Peer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StorageHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StorageHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StorageName) > 0 { - i -= len(m.StorageName) - copy(dAtA[i:], m.StorageName) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.StorageName))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintSpacesync(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSpacesync(dAtA []byte, offset int, v uint64) int { - offset -= sovSpacesync(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *HeadSyncRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.From != 0 { - n += 1 + sovSpacesync(uint64(m.From)) - } - if m.To != 0 { - n += 1 + sovSpacesync(uint64(m.To)) - } - if m.Limit != 0 { - n += 1 + sovSpacesync(uint64(m.Limit)) - } - if m.Elements { - n += 2 - } - return n -} - -func (m *HeadSyncResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if len(m.Elements) > 0 { - for _, e := range m.Elements { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - if m.Count != 0 { - n += 1 + sovSpacesync(uint64(m.Count)) - } - return n -} - -func (m *HeadSyncResultElement) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Head) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *HeadSyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if len(m.Ranges) > 0 { - for _, e := range m.Ranges { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - if m.DiffType != 0 { - n += 1 + sovSpacesync(uint64(m.DiffType)) - } - return n -} - -func (m *HeadSyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - if m.DiffType != 0 { - n += 1 + sovSpacesync(uint64(m.DiffType)) - } - return n -} - -func (m *ObjectSyncMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.ReplyId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.ObjectId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if m.ObjectType != 0 { - n += 1 + sovSpacesync(uint64(m.ObjectType)) - } - return n -} - -func (m *SpacePushRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Credential) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpacePushResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SpacePullRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpacePullResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpacePayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SpaceHeader != nil { - l = m.SpaceHeader.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.AclPayload) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.AclPayloadId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.SpaceSettingsPayload) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.SpaceSettingsPayloadId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpaceHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovSpacesync(uint64(m.Timestamp)) - } - l = len(m.SpaceType) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if m.ReplicationKey != 0 { - n += 1 + sovSpacesync(uint64(m.ReplicationKey)) - } - l = len(m.Seed) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.SpaceHeaderPayload) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *RawSpaceHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceHeader) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *RawSpaceHeaderWithId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RawHeader) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpaceSettingsContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *SpaceSettingsContent_ObjectDelete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ObjectDelete != nil { - l = m.ObjectDelete.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} -func (m *SpaceSettingsContent_SpaceDelete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SpaceDelete != nil { - l = m.SpaceDelete.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} -func (m *ObjectDelete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *StoreHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.StorageName) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpaceDelete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DeleterPeerId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpaceSettingsSnapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DeletedIds) > 0 { - for _, s := range m.DeletedIds { - l = len(s) - n += 1 + l + sovSpacesync(uint64(l)) - } - } - l = len(m.DeleterPeerId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SettingsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Content) > 0 { - for _, e := range m.Content { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - if m.Snapshot != nil { - l = m.Snapshot.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *SpaceSubscription) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SpaceIds) > 0 { - for _, s := range m.SpaceIds { - l = len(s) - n += 1 + l + sovSpacesync(uint64(l)) - } - } - if m.Action != 0 { - n += 1 + sovSpacesync(uint64(m.Action)) - } - return n -} - -func (m *AclAddRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *AclAddRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RecordId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *AclGetRecordsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.AclHead) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *AclGetRecordsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Records) > 0 { - for _, b := range m.Records { - l = len(b) - n += 1 + l + sovSpacesync(uint64(l)) - } - } - return n -} - -func (m *StoreDiffRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if len(m.Ranges) > 0 { - for _, e := range m.Ranges { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - return n -} - -func (m *StoreDiffResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - return n -} - -func (m *StoreKeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.KeyPeerId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.IdentitySignature) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.PeerSignature) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *StoreKeyValues) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.KeyValues) > 0 { - for _, e := range m.KeyValues { - l = e.Size() - n += 1 + l + sovSpacesync(uint64(l)) - } - } - return n -} - -func (m *StoreKeyInner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Peer) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - if m.TimestampMicro != 0 { - n += 1 + sovSpacesync(uint64(m.TimestampMicro)) - } - l = len(m.AclHeadId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func (m *StorageHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - l = len(m.StorageName) - if l > 0 { - n += 1 + l + sovSpacesync(uint64(l)) - } - return n -} - -func sovSpacesync(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSpacesync(x uint64) (n int) { - return sovSpacesync(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *HeadSyncRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeadSyncRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeadSyncRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - m.From = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.From |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - m.To = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.To |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Elements = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HeadSyncResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeadSyncResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeadSyncResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Elements = append(m.Elements, &HeadSyncResultElement{}) - if err := m.Elements[len(m.Elements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HeadSyncResultElement) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeadSyncResultElement: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeadSyncResultElement: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Head = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HeadSyncRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeadSyncRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeadSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ranges = append(m.Ranges, &HeadSyncRange{}) - if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiffType", wireType) - } - m.DiffType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiffType |= DiffType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HeadSyncResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeadSyncResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeadSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, &HeadSyncResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiffType", wireType) - } - m.DiffType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiffType |= DiffType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ObjectSyncMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectSyncMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReplyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReplyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ObjectId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType) - } - m.ObjectType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObjectType |= ObjectType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpacePushRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpacePushRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpacePushRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &SpacePayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credential = append(m.Credential[:0], dAtA[iNdEx:postIndex]...) - if m.Credential == nil { - m.Credential = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpacePushResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpacePushResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpacePushResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpacePullRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpacePullRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpacePullRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpacePullResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpacePullResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpacePullResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &SpacePayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpacePayload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpacePayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpacePayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SpaceHeader == nil { - m.SpaceHeader = &RawSpaceHeaderWithId{} - } - if err := m.SpaceHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclPayload = append(m.AclPayload[:0], dAtA[iNdEx:postIndex]...) - if m.AclPayload == nil { - m.AclPayload = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclPayloadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclPayloadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceSettingsPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceSettingsPayload = append(m.SpaceSettingsPayload[:0], dAtA[iNdEx:postIndex]...) - if m.SpaceSettingsPayload == nil { - m.SpaceSettingsPayload = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceSettingsPayloadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceSettingsPayloadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReplicationKey", wireType) - } - m.ReplicationKey = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReplicationKey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...) - if m.Seed == nil { - m.Seed = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceHeaderPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceHeaderPayload = append(m.SpaceHeaderPayload[:0], dAtA[iNdEx:postIndex]...) - if m.SpaceHeaderPayload == nil { - m.SpaceHeaderPayload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RawSpaceHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawSpaceHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawSpaceHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceHeader", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceHeader = append(m.SpaceHeader[:0], dAtA[iNdEx:postIndex]...) - if m.SpaceHeader == nil { - m.SpaceHeader = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RawSpaceHeaderWithId) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawSpaceHeaderWithId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawSpaceHeaderWithId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RawHeader", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RawHeader = append(m.RawHeader[:0], dAtA[iNdEx:postIndex]...) - if m.RawHeader == nil { - m.RawHeader = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceSettingsContent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceSettingsContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceSettingsContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectDelete", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ObjectDelete{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &SpaceSettingsContent_ObjectDelete{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceDelete", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SpaceDelete{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &SpaceSettingsContent_SpaceDelete{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ObjectDelete) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectDelete: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectDelete: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceDelete) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceDelete: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceDelete: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeleterPeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeleterPeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceSettingsSnapshot) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceSettingsSnapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceSettingsSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletedIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletedIds = append(m.DeletedIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeleterPeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeleterPeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SettingsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Content = append(m.Content, &SpaceSettingsContent{}) - if err := m.Content[len(m.Content)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Snapshot == nil { - m.Snapshot = &SpaceSettingsSnapshot{} - } - if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceSubscription) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceSubscription: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceSubscription: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - m.Action = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Action |= SpaceSubscriptionAction(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAddRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAddRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAddRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAddRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAddRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAddRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclGetRecordsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclGetRecordsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclGetRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHead = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclGetRecordsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclGetRecordsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclGetRecordsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, make([]byte, postIndex-iNdEx)) - copy(m.Records[len(m.Records)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreDiffRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreDiffRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreDiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ranges = append(m.Ranges, &HeadSyncRange{}) - if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreDiffResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreDiffResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreDiffResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, &HeadSyncResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreKeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyPeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyPeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentitySignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdentitySignature = append(m.IdentitySignature[:0], dAtA[iNdEx:postIndex]...) - if m.IdentitySignature == nil { - m.IdentitySignature = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerSignature = append(m.PeerSignature[:0], dAtA[iNdEx:postIndex]...) - if m.PeerSignature == nil { - m.PeerSignature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKeyValues) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreKeyValues: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKeyValues: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyValues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyValues = append(m.KeyValues, &StoreKeyValue{}) - if err := m.KeyValues[len(m.KeyValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKeyInner) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreKeyInner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKeyInner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...) - if m.Peer == nil { - m.Peer = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimestampMicro", wireType) - } - m.TimestampMicro = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimestampMicro |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHeadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StorageHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StorageHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpacesync - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSpacesync - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSpacesync - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpacesync(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpacesync - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +var ( + file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescOnce sync.Once + file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescData []byte +) - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSpacesync(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpacesync - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpacesync - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpacesync - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSpacesync - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSpacesync - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSpacesync - } - if depth == 0 { - return iNdEx, nil - } +func file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescGZIP() []byte { + file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescOnce.Do(func() { + file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_commonspace_spacesyncproto_protos_spacesync_proto_rawDesc), len(file_commonspace_spacesyncproto_protos_spacesync_proto_rawDesc))) + }) + return file_commonspace_spacesyncproto_protos_spacesync_proto_rawDescData +} + +var file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_commonspace_spacesyncproto_protos_spacesync_proto_goTypes = []any{ + (ErrCodes)(0), // 0: spacesync.ErrCodes + (SpaceSubscriptionAction)(0), // 1: spacesync.SpaceSubscriptionAction + (DiffType)(0), // 2: spacesync.DiffType + (ObjectType)(0), // 3: spacesync.ObjectType + (*HeadSyncRange)(nil), // 4: spacesync.HeadSyncRange + (*HeadSyncResult)(nil), // 5: spacesync.HeadSyncResult + (*HeadSyncResultElement)(nil), // 6: spacesync.HeadSyncResultElement + (*HeadSyncRequest)(nil), // 7: spacesync.HeadSyncRequest + (*HeadSyncResponse)(nil), // 8: spacesync.HeadSyncResponse + (*ObjectSyncMessage)(nil), // 9: spacesync.ObjectSyncMessage + (*SpacePushRequest)(nil), // 10: spacesync.SpacePushRequest + (*SpacePushResponse)(nil), // 11: spacesync.SpacePushResponse + (*SpacePullRequest)(nil), // 12: spacesync.SpacePullRequest + (*SpacePullResponse)(nil), // 13: spacesync.SpacePullResponse + (*SpacePayload)(nil), // 14: spacesync.SpacePayload + (*SpaceHeader)(nil), // 15: spacesync.SpaceHeader + (*RawSpaceHeader)(nil), // 16: spacesync.RawSpaceHeader + (*RawSpaceHeaderWithId)(nil), // 17: spacesync.RawSpaceHeaderWithId + (*SpaceSettingsContent)(nil), // 18: spacesync.SpaceSettingsContent + (*ObjectDelete)(nil), // 19: spacesync.ObjectDelete + (*StoreHeader)(nil), // 20: spacesync.StoreHeader + (*SpaceDelete)(nil), // 21: spacesync.SpaceDelete + (*SpaceSettingsSnapshot)(nil), // 22: spacesync.SpaceSettingsSnapshot + (*SettingsData)(nil), // 23: spacesync.SettingsData + (*SpaceSubscription)(nil), // 24: spacesync.SpaceSubscription + (*AclAddRecordRequest)(nil), // 25: spacesync.AclAddRecordRequest + (*AclAddRecordResponse)(nil), // 26: spacesync.AclAddRecordResponse + (*AclGetRecordsRequest)(nil), // 27: spacesync.AclGetRecordsRequest + (*AclGetRecordsResponse)(nil), // 28: spacesync.AclGetRecordsResponse + (*StoreDiffRequest)(nil), // 29: spacesync.StoreDiffRequest + (*StoreDiffResponse)(nil), // 30: spacesync.StoreDiffResponse + (*StoreKeyValue)(nil), // 31: spacesync.StoreKeyValue + (*StoreKeyValues)(nil), // 32: spacesync.StoreKeyValues + (*StoreKeyInner)(nil), // 33: spacesync.StoreKeyInner + (*StorageHeader)(nil), // 34: spacesync.StorageHeader +} +var file_commonspace_spacesyncproto_protos_spacesync_proto_depIdxs = []int32{ + 6, // 0: spacesync.HeadSyncResult.elements:type_name -> spacesync.HeadSyncResultElement + 4, // 1: spacesync.HeadSyncRequest.ranges:type_name -> spacesync.HeadSyncRange + 2, // 2: spacesync.HeadSyncRequest.diffType:type_name -> spacesync.DiffType + 5, // 3: spacesync.HeadSyncResponse.results:type_name -> spacesync.HeadSyncResult + 2, // 4: spacesync.HeadSyncResponse.diffType:type_name -> spacesync.DiffType + 3, // 5: spacesync.ObjectSyncMessage.objectType:type_name -> spacesync.ObjectType + 14, // 6: spacesync.SpacePushRequest.payload:type_name -> spacesync.SpacePayload + 14, // 7: spacesync.SpacePullResponse.payload:type_name -> spacesync.SpacePayload + 17, // 8: spacesync.SpacePayload.spaceHeader:type_name -> spacesync.RawSpaceHeaderWithId + 19, // 9: spacesync.SpaceSettingsContent.objectDelete:type_name -> spacesync.ObjectDelete + 21, // 10: spacesync.SpaceSettingsContent.spaceDelete:type_name -> spacesync.SpaceDelete + 18, // 11: spacesync.SettingsData.content:type_name -> spacesync.SpaceSettingsContent + 22, // 12: spacesync.SettingsData.snapshot:type_name -> spacesync.SpaceSettingsSnapshot + 1, // 13: spacesync.SpaceSubscription.action:type_name -> spacesync.SpaceSubscriptionAction + 4, // 14: spacesync.StoreDiffRequest.ranges:type_name -> spacesync.HeadSyncRange + 5, // 15: spacesync.StoreDiffResponse.results:type_name -> spacesync.HeadSyncResult + 31, // 16: spacesync.StoreKeyValues.keyValues:type_name -> spacesync.StoreKeyValue + 7, // 17: spacesync.SpaceSync.HeadSync:input_type -> spacesync.HeadSyncRequest + 29, // 18: spacesync.SpaceSync.StoreDiff:input_type -> spacesync.StoreDiffRequest + 31, // 19: spacesync.SpaceSync.StoreElements:input_type -> spacesync.StoreKeyValue + 10, // 20: spacesync.SpaceSync.SpacePush:input_type -> spacesync.SpacePushRequest + 12, // 21: spacesync.SpaceSync.SpacePull:input_type -> spacesync.SpacePullRequest + 9, // 22: spacesync.SpaceSync.ObjectSyncStream:input_type -> spacesync.ObjectSyncMessage + 9, // 23: spacesync.SpaceSync.ObjectSync:input_type -> spacesync.ObjectSyncMessage + 9, // 24: spacesync.SpaceSync.ObjectSyncRequestStream:input_type -> spacesync.ObjectSyncMessage + 25, // 25: spacesync.SpaceSync.AclAddRecord:input_type -> spacesync.AclAddRecordRequest + 27, // 26: spacesync.SpaceSync.AclGetRecords:input_type -> spacesync.AclGetRecordsRequest + 8, // 27: spacesync.SpaceSync.HeadSync:output_type -> spacesync.HeadSyncResponse + 30, // 28: spacesync.SpaceSync.StoreDiff:output_type -> spacesync.StoreDiffResponse + 31, // 29: spacesync.SpaceSync.StoreElements:output_type -> spacesync.StoreKeyValue + 11, // 30: spacesync.SpaceSync.SpacePush:output_type -> spacesync.SpacePushResponse + 13, // 31: spacesync.SpaceSync.SpacePull:output_type -> spacesync.SpacePullResponse + 9, // 32: spacesync.SpaceSync.ObjectSyncStream:output_type -> spacesync.ObjectSyncMessage + 9, // 33: spacesync.SpaceSync.ObjectSync:output_type -> spacesync.ObjectSyncMessage + 9, // 34: spacesync.SpaceSync.ObjectSyncRequestStream:output_type -> spacesync.ObjectSyncMessage + 26, // 35: spacesync.SpaceSync.AclAddRecord:output_type -> spacesync.AclAddRecordResponse + 28, // 36: spacesync.SpaceSync.AclGetRecords:output_type -> spacesync.AclGetRecordsResponse + 27, // [27:37] is the sub-list for method output_type + 17, // [17:27] 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_commonspace_spacesyncproto_protos_spacesync_proto_init() } +func file_commonspace_spacesyncproto_protos_spacesync_proto_init() { + if File_commonspace_spacesyncproto_protos_spacesync_proto != nil { + return + } + file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes[14].OneofWrappers = []any{ + (*SpaceSettingsContent_ObjectDelete)(nil), + (*SpaceSettingsContent_SpaceDelete)(nil), } - return 0, io.ErrUnexpectedEOF + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_commonspace_spacesyncproto_protos_spacesync_proto_rawDesc), len(file_commonspace_spacesyncproto_protos_spacesync_proto_rawDesc)), + NumEnums: 4, + NumMessages: 31, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_commonspace_spacesyncproto_protos_spacesync_proto_goTypes, + DependencyIndexes: file_commonspace_spacesyncproto_protos_spacesync_proto_depIdxs, + EnumInfos: file_commonspace_spacesyncproto_protos_spacesync_proto_enumTypes, + MessageInfos: file_commonspace_spacesyncproto_protos_spacesync_proto_msgTypes, + }.Build() + File_commonspace_spacesyncproto_protos_spacesync_proto = out.File + file_commonspace_spacesyncproto_protos_spacesync_proto_goTypes = nil + file_commonspace_spacesyncproto_protos_spacesync_proto_depIdxs = nil } - -var ( - ErrInvalidLengthSpacesync = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSpacesync = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSpacesync = fmt.Errorf("proto: unexpected end of group") -) diff --git a/commonspace/spacesyncproto/spacesync_drpc.pb.go b/commonspace/spacesyncproto/spacesync_drpc.pb.go index fe93109b4..a75904a51 100644 --- a/commonspace/spacesyncproto/spacesync_drpc.pb.go +++ b/commonspace/spacesyncproto/spacesync_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: commonspace/spacesyncproto/protos/spacesync.proto package spacesyncproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto struct{} func (drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCSpaceSyncClient interface { diff --git a/commonspace/spacesyncproto/spacesync_vtproto.pb.go b/commonspace/spacesyncproto/spacesync_vtproto.pb.go new file mode 100644 index 000000000..10a1426cd --- /dev/null +++ b/commonspace/spacesyncproto/spacesync_vtproto.pb.go @@ -0,0 +1,6196 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: commonspace/spacesyncproto/protos/spacesync.proto + +package spacesyncproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *HeadSyncRange) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadSyncRange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HeadSyncRange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Elements { + i-- + if m.Elements { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Limit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x18 + } + if m.To != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + i-- + dAtA[i] = 0x10 + } + if m.From != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *HeadSyncResult) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadSyncResult) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HeadSyncResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Count != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x18 + } + if len(m.Elements) > 0 { + for iNdEx := len(m.Elements) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Elements[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadSyncResultElement) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadSyncResultElement) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HeadSyncResultElement) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Head) > 0 { + i -= len(m.Head) + copy(dAtA[i:], m.Head) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Head))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadSyncRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadSyncRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HeadSyncRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DiffType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiffType)) + i-- + dAtA[i] = 0x18 + } + if len(m.Ranges) > 0 { + for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Ranges[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadSyncResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeadSyncResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *HeadSyncResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DiffType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiffType)) + i-- + dAtA[i] = 0x10 + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Results[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ObjectSyncMessage) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ObjectSyncMessage) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ObjectSyncMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ObjectType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ObjectType)) + i-- + dAtA[i] = 0x30 + } + if len(m.ObjectId) > 0 { + i -= len(m.ObjectId) + copy(dAtA[i:], m.ObjectId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ObjectId))) + i-- + dAtA[i] = 0x2a + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x22 + } + if len(m.ReplyId) > 0 { + i -= len(m.ReplyId) + copy(dAtA[i:], m.ReplyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ReplyId))) + i-- + dAtA[i] = 0x1a + } + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpacePushRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpacePushRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpacePushRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Credential) > 0 { + i -= len(m.Credential) + copy(dAtA[i:], m.Credential) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Credential))) + i-- + dAtA[i] = 0x12 + } + if m.Payload != nil { + size, err := m.Payload.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpacePushResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpacePushResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpacePushResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *SpacePullRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpacePullRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpacePullRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpacePullResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpacePullResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpacePullResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Payload != nil { + size, err := m.Payload.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpacePayload) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpacePayload) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpacePayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceSettingsPayloadId) > 0 { + i -= len(m.SpaceSettingsPayloadId) + copy(dAtA[i:], m.SpaceSettingsPayloadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceSettingsPayloadId))) + i-- + dAtA[i] = 0x2a + } + if len(m.SpaceSettingsPayload) > 0 { + i -= len(m.SpaceSettingsPayload) + copy(dAtA[i:], m.SpaceSettingsPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceSettingsPayload))) + i-- + dAtA[i] = 0x22 + } + if len(m.AclPayloadId) > 0 { + i -= len(m.AclPayloadId) + copy(dAtA[i:], m.AclPayloadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclPayloadId))) + i-- + dAtA[i] = 0x1a + } + if len(m.AclPayload) > 0 { + i -= len(m.AclPayload) + copy(dAtA[i:], m.AclPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclPayload))) + i-- + dAtA[i] = 0x12 + } + if m.SpaceHeader != nil { + size, err := m.SpaceHeader.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceHeader) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceHeader) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceHeaderPayload) > 0 { + i -= len(m.SpaceHeaderPayload) + copy(dAtA[i:], m.SpaceHeaderPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceHeaderPayload))) + i-- + dAtA[i] = 0x32 + } + if len(m.Seed) > 0 { + i -= len(m.Seed) + copy(dAtA[i:], m.Seed) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Seed))) + i-- + dAtA[i] = 0x2a + } + if m.ReplicationKey != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ReplicationKey)) + i-- + dAtA[i] = 0x20 + } + if len(m.SpaceType) > 0 { + i -= len(m.SpaceType) + copy(dAtA[i:], m.SpaceType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceType))) + i-- + dAtA[i] = 0x1a + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x10 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RawSpaceHeader) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawSpaceHeader) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RawSpaceHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceHeader) > 0 { + i -= len(m.SpaceHeader) + copy(dAtA[i:], m.SpaceHeader) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceHeader))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RawSpaceHeaderWithId) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawSpaceHeaderWithId) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RawSpaceHeaderWithId) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.RawHeader) > 0 { + i -= len(m.RawHeader) + copy(dAtA[i:], m.RawHeader) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RawHeader))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceSettingsContent) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceSettingsContent) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSettingsContent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Value.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *SpaceSettingsContent_ObjectDelete) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSettingsContent_ObjectDelete) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ObjectDelete != nil { + size, err := m.ObjectDelete.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *SpaceSettingsContent_SpaceDelete) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSettingsContent_SpaceDelete) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SpaceDelete != nil { + size, err := m.SpaceDelete.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *ObjectDelete) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ObjectDelete) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ObjectDelete) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StoreHeader) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreHeader) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StoreHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.StorageName) > 0 { + i -= len(m.StorageName) + copy(dAtA[i:], m.StorageName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StorageName))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceDelete) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceDelete) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceDelete) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.DeleterPeerId) > 0 { + i -= len(m.DeleterPeerId) + copy(dAtA[i:], m.DeleterPeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeleterPeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceSettingsSnapshot) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceSettingsSnapshot) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSettingsSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.DeleterPeerId) > 0 { + i -= len(m.DeleterPeerId) + copy(dAtA[i:], m.DeleterPeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeleterPeerId))) + i-- + dAtA[i] = 0x12 + } + if len(m.DeletedIds) > 0 { + for iNdEx := len(m.DeletedIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeletedIds[iNdEx]) + copy(dAtA[i:], m.DeletedIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletedIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SettingsData) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SettingsData) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SettingsData) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Snapshot != nil { + size, err := m.Snapshot.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Content) > 0 { + for iNdEx := len(m.Content) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Content[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SpaceSubscription) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceSubscription) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSubscription) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Action != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x10 + } + if len(m.SpaceIds) > 0 { + for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpaceIds[iNdEx]) + copy(dAtA[i:], m.SpaceIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclAddRecordRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAddRecordRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAddRecordRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAddRecordResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAddRecordResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAddRecordResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + if len(m.RecordId) > 0 { + i -= len(m.RecordId) + copy(dAtA[i:], m.RecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RecordId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclGetRecordsRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclGetRecordsRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclGetRecordsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AclHead) > 0 { + i -= len(m.AclHead) + copy(dAtA[i:], m.AclHead) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHead))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclGetRecordsResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclGetRecordsResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclGetRecordsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Records[iNdEx]) + copy(dAtA[i:], m.Records[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Records[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *StoreDiffRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreDiffRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StoreDiffRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Ranges) > 0 { + for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Ranges[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StoreDiffResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreDiffResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StoreDiffResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Results[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *StoreKeyValue) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreKeyValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StoreKeyValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x2a + } + if len(m.PeerSignature) > 0 { + i -= len(m.PeerSignature) + copy(dAtA[i:], m.PeerSignature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PeerSignature))) + i-- + dAtA[i] = 0x22 + } + if len(m.IdentitySignature) > 0 { + i -= len(m.IdentitySignature) + copy(dAtA[i:], m.IdentitySignature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.IdentitySignature))) + i-- + dAtA[i] = 0x1a + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.KeyPeerId) > 0 { + i -= len(m.KeyPeerId) + copy(dAtA[i:], m.KeyPeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.KeyPeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StoreKeyValues) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreKeyValues) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StoreKeyValues) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.KeyValues) > 0 { + for iNdEx := len(m.KeyValues) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.KeyValues[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *StoreKeyInner) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreKeyInner) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StoreKeyInner) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x32 + } + if len(m.AclHeadId) > 0 { + i -= len(m.AclHeadId) + copy(dAtA[i:], m.AclHeadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHeadId))) + i-- + dAtA[i] = 0x2a + } + if m.TimestampMicro != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TimestampMicro)) + i-- + dAtA[i] = 0x20 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.Peer) > 0 { + i -= len(m.Peer) + copy(dAtA[i:], m.Peer) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Peer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StorageHeader) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageHeader) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StorageHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.StorageName) > 0 { + i -= len(m.StorageName) + copy(dAtA[i:], m.StorageName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StorageName))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HeadSyncRange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.From != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + } + if m.To != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + } + if m.Limit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Limit)) + } + if m.Elements { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *HeadSyncResult) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Elements) > 0 { + for _, e := range m.Elements { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Count != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) + } + n += len(m.unknownFields) + return n +} + +func (m *HeadSyncResultElement) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Head) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *HeadSyncRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.DiffType != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiffType)) + } + n += len(m.unknownFields) + return n +} + +func (m *HeadSyncResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.DiffType != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiffType)) + } + n += len(m.unknownFields) + return n +} + +func (m *ObjectSyncMessage) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ReplyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ObjectId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ObjectType != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ObjectType)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpacePushRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Payload != nil { + l = m.Payload.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Credential) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpacePushResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *SpacePullRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpacePullResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Payload != nil { + l = m.Payload.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpacePayload) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SpaceHeader != nil { + l = m.SpaceHeader.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AclPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AclPayloadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceSettingsPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceSettingsPayloadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceHeader) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.SpaceType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ReplicationKey != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ReplicationKey)) + } + l = len(m.Seed) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceHeaderPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RawSpaceHeader) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceHeader) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RawSpaceHeaderWithId) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RawHeader) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceSettingsContent) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceSettingsContent_ObjectDelete) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ObjectDelete != nil { + l = m.ObjectDelete.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *SpaceSettingsContent_SpaceDelete) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SpaceDelete != nil { + l = m.SpaceDelete.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *ObjectDelete) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StoreHeader) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.StorageName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceDelete) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DeleterPeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceSettingsSnapshot) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DeletedIds) > 0 { + for _, s := range m.DeletedIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.DeleterPeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SettingsData) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Content) > 0 { + for _, e := range m.Content { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Snapshot != nil { + l = m.Snapshot.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceSubscription) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpaceIds) > 0 { + for _, s := range m.SpaceIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Action != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Action)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAddRecordRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAddRecordResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclGetRecordsRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AclHead) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclGetRecordsResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, b := range m.Records { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StoreDiffRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StoreDiffResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StoreKeyValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.KeyPeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.IdentitySignature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.PeerSignature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StoreKeyValues) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.KeyValues) > 0 { + for _, e := range m.KeyValues { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StoreKeyInner) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Peer) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.TimestampMicro != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.TimestampMicro)) + } + l = len(m.AclHeadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StorageHeader) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.StorageName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *HeadSyncRange) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadSyncRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadSyncRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Elements = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadSyncResult) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadSyncResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadSyncResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Elements = append(m.Elements, &HeadSyncResultElement{}) + if err := m.Elements[len(m.Elements)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadSyncResultElement) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadSyncResultElement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadSyncResultElement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Head = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadSyncRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadSyncRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ranges = append(m.Ranges, &HeadSyncRange{}) + if err := m.Ranges[len(m.Ranges)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiffType", wireType) + } + m.DiffType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiffType |= DiffType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeadSyncResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeadSyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeadSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &HeadSyncResult{}) + if err := m.Results[len(m.Results)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiffType", wireType) + } + m.DiffType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiffType |= DiffType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectSyncMessage) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectSyncMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReplyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ObjectId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType) + } + m.ObjectType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObjectType |= ObjectType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpacePushRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpacePushRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpacePushRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Payload == nil { + m.Payload = &SpacePayload{} + } + if err := m.Payload.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Credential = append(m.Credential[:0], dAtA[iNdEx:postIndex]...) + if m.Credential == nil { + m.Credential = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpacePushResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpacePushResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpacePushResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpacePullRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpacePullRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpacePullRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpacePullResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpacePullResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpacePullResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Payload == nil { + m.Payload = &SpacePayload{} + } + if err := m.Payload.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpacePayload) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpacePayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpacePayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SpaceHeader == nil { + m.SpaceHeader = &RawSpaceHeaderWithId{} + } + if err := m.SpaceHeader.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclPayload = append(m.AclPayload[:0], dAtA[iNdEx:postIndex]...) + if m.AclPayload == nil { + m.AclPayload = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclPayloadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclPayloadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceSettingsPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceSettingsPayload = append(m.SpaceSettingsPayload[:0], dAtA[iNdEx:postIndex]...) + if m.SpaceSettingsPayload == nil { + m.SpaceSettingsPayload = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceSettingsPayloadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceSettingsPayloadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceHeader) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplicationKey", wireType) + } + m.ReplicationKey = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReplicationKey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...) + if m.Seed == nil { + m.Seed = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceHeaderPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceHeaderPayload = append(m.SpaceHeaderPayload[:0], dAtA[iNdEx:postIndex]...) + if m.SpaceHeaderPayload == nil { + m.SpaceHeaderPayload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RawSpaceHeader) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawSpaceHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawSpaceHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceHeader", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceHeader = append(m.SpaceHeader[:0], dAtA[iNdEx:postIndex]...) + if m.SpaceHeader == nil { + m.SpaceHeader = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RawSpaceHeaderWithId) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawSpaceHeaderWithId: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawSpaceHeaderWithId: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawHeader", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RawHeader = append(m.RawHeader[:0], dAtA[iNdEx:postIndex]...) + if m.RawHeader == nil { + m.RawHeader = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceSettingsContent) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceSettingsContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceSettingsContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectDelete", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*SpaceSettingsContent_ObjectDelete); ok { + if err := oneof.ObjectDelete.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ObjectDelete{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &SpaceSettingsContent_ObjectDelete{ObjectDelete: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceDelete", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*SpaceSettingsContent_SpaceDelete); ok { + if err := oneof.SpaceDelete.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &SpaceDelete{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &SpaceSettingsContent_SpaceDelete{SpaceDelete: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectDelete) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectDelete: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectDelete: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreHeader) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceDelete) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceDelete: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceDelete: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeleterPeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeleterPeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceSettingsSnapshot) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceSettingsSnapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceSettingsSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletedIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletedIds = append(m.DeletedIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeleterPeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeleterPeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SettingsData) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SettingsData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SettingsData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Content = append(m.Content, &SpaceSettingsContent{}) + if err := m.Content[len(m.Content)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Snapshot == nil { + m.Snapshot = &SpaceSettingsSnapshot{} + } + if err := m.Snapshot.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceSubscription) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceSubscription: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceSubscription: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + m.Action = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Action |= SpaceSubscriptionAction(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAddRecordRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAddRecordRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAddRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAddRecordResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAddRecordResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAddRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclGetRecordsRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclGetRecordsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclGetRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHead = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclGetRecordsResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclGetRecordsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclGetRecordsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, make([]byte, postIndex-iNdEx)) + copy(m.Records[len(m.Records)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreDiffRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreDiffRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreDiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ranges = append(m.Ranges, &HeadSyncRange{}) + if err := m.Ranges[len(m.Ranges)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreDiffResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreDiffResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreDiffResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &HeadSyncResult{}) + if err := m.Results[len(m.Results)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreKeyValue) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreKeyValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKeyValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyPeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyPeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentitySignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdentitySignature = append(m.IdentitySignature[:0], dAtA[iNdEx:postIndex]...) + if m.IdentitySignature == nil { + m.IdentitySignature = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerSignature = append(m.PeerSignature[:0], dAtA[iNdEx:postIndex]...) + if m.PeerSignature == nil { + m.PeerSignature = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreKeyValues) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreKeyValues: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKeyValues: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyValues", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyValues = append(m.KeyValues, &StoreKeyValue{}) + if err := m.KeyValues[len(m.KeyValues)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreKeyInner) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreKeyInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKeyInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...) + if m.Peer == nil { + m.Peer = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimestampMicro", wireType) + } + m.TimestampMicro = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimestampMicro |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHeadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageHeader) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/commonspace/spaceutils_test.go b/commonspace/spaceutils_test.go index 2d5e97d5a..558ea158d 100644 --- a/commonspace/spaceutils_test.go +++ b/commonspace/spaceutils_test.go @@ -572,7 +572,7 @@ func (s *streamOpener) HandleMessage(peerCtx context.Context, peerId string, msg } if syncMsg.SpaceId() == "" { var msg = &spacesyncproto.SpaceSubscription{} - if err = msg.Unmarshal(syncMsg.Bytes); err != nil { + if err = msg.UnmarshalVT(syncMsg.Bytes); err != nil { return } log.InfoCtx(peerCtx, "got subscription message", zap.Strings("spaceIds", msg.SpaceIds)) @@ -616,7 +616,7 @@ func (s *streamOpener) OpenStream(ctx context.Context, p peer.Peer) (stream drpc SpaceIds: []string{s.spaceId}, Action: spacesyncproto.SpaceSubscriptionAction_Subscribe, } - payload, err := msg.Marshal() + payload, err := msg.MarshalVT() if err != nil { return } diff --git a/commonspace/sync/objectsync/objectmessages/headupdate.go b/commonspace/sync/objectsync/objectmessages/headupdate.go index e8510f0e3..4b5cb4387 100644 --- a/commonspace/sync/objectsync/objectmessages/headupdate.go +++ b/commonspace/sync/objectsync/objectmessages/headupdate.go @@ -4,10 +4,10 @@ import ( "fmt" "sync" - "github.com/anyproto/protobuf/proto" "storj.io/drpc" "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "github.com/anyproto/any-sync/protobuf" ) var messagePool = &sync.Pool{ @@ -74,7 +74,7 @@ func (h *HeadUpdate) SetPeerId(peerId string) { h.Meta.PeerId = peerId } -func (h *HeadUpdate) SetProtoMessage(message proto.Message) error { +func (h *HeadUpdate) SetProtoMessage(message protobuf.Message) error { var ( msg *spacesyncproto.ObjectSyncMessage ok bool @@ -90,7 +90,7 @@ func (h *HeadUpdate) SetProtoMessage(message proto.Message) error { return nil } -func (h *HeadUpdate) ProtoMessage() (proto.Message, error) { +func (h *HeadUpdate) ProtoMessage() (protobuf.Message, error) { if h.Update != nil { payload, err := h.Update.Marshall(h.Meta) if err != nil { diff --git a/commonspace/sync/objectsync/objectmessages/request.go b/commonspace/sync/objectsync/objectmessages/request.go index 042ba8c40..394f1be4d 100644 --- a/commonspace/sync/objectsync/objectmessages/request.go +++ b/commonspace/sync/objectsync/objectmessages/request.go @@ -1,9 +1,8 @@ package objectmessages import ( - "github.com/anyproto/protobuf/proto" - "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "google.golang.org/protobuf/proto" ) type InnerRequest interface { diff --git a/commonspace/sync/objectsync/objectsync_test.go b/commonspace/sync/objectsync/objectsync_test.go index f3a61e38c..1062538eb 100644 --- a/commonspace/sync/objectsync/objectsync_test.go +++ b/commonspace/sync/objectsync/objectsync_test.go @@ -3,9 +3,9 @@ package objectsync import ( "context" "fmt" + "google.golang.org/protobuf/proto" "testing" - "github.com/anyproto/protobuf/proto" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -92,7 +92,7 @@ func TestObjectSync_HandleStreamRequest(t *testing.T) { Id: "objectId", } treeSyncMsg := treechangeproto.WrapFullRequest(fullSyncReq, rootCh) - payload, err := treeSyncMsg.Marshal() + payload, err := treeSyncMsg.MarshalVT() require.NoError(t, err) sendResponse := func(resp proto.Message) error { return nil @@ -114,7 +114,7 @@ func TestObjectSync_HandleStreamRequest(t *testing.T) { Id: "objectId", } treeSyncMsg := treechangeproto.WrapFullRequest(fullSyncReq, rootCh) - payload, err := treeSyncMsg.Marshal() + payload, err := treeSyncMsg.MarshalVT() require.NoError(t, err) sendResponse := func(resp proto.Message) error { return nil diff --git a/commonspace/sync/objectsync/synchandler.go b/commonspace/sync/objectsync/synchandler.go index 2cc9d984c..89509bf69 100644 --- a/commonspace/sync/objectsync/synchandler.go +++ b/commonspace/sync/objectsync/synchandler.go @@ -4,8 +4,8 @@ import ( "context" "errors" "fmt" + "google.golang.org/protobuf/proto" - "github.com/anyproto/protobuf/proto" "go.uber.org/zap" "storj.io/drpc" @@ -87,7 +87,7 @@ func (o *objectSync) HandleStreamRequest(ctx context.Context, rq syncdeps.Reques return nil, treechangeproto.ErrGetTree } treeSyncMsg := &treechangeproto.TreeSyncMessage{} - err := proto.Unmarshal(req.Bytes, treeSyncMsg) + err := treeSyncMsg.UnmarshalVT(req.Bytes) if err != nil { return nil, treechangeproto.ErrGetTree } diff --git a/commonspace/sync/requestmanager.go b/commonspace/sync/requestmanager.go index 1832dd435..7eb9848e8 100644 --- a/commonspace/sync/requestmanager.go +++ b/commonspace/sync/requestmanager.go @@ -6,12 +6,12 @@ import ( "io" "strings" - "github.com/anyproto/protobuf/proto" + "google.golang.org/protobuf/proto" + "storj.io/drpc" "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/commonspace/sync/syncdeps" - "github.com/anyproto/any-sync/net/streampool" "github.com/anyproto/any-sync/util/syncqueues" ) @@ -50,7 +50,7 @@ func (r *requestManager) SendRequest(ctx context.Context, rq syncdeps.Request, c calledOnce := false for { resp := collector.NewResponse() - err := stream.MsgRecv(resp, streampool.EncodingProto) + err := stream.MsgRecv(resp, nil) if err != nil { if errors.Is(err, io.EOF) && calledOnce { return nil @@ -93,7 +93,7 @@ func (r *requestManager) HandleStreamRequest(ctx context.Context, rq syncdeps.Re r.metric.UpdateQueueSize(size, syncdeps.MsgTypeIncomingRequest, true) defer r.metric.UpdateQueueSize(size, syncdeps.MsgTypeIncomingRequest, false) newRq, err := r.handler.HandleStreamRequest(ctx, rq, r.metric, func(resp proto.Message) error { - return stream.MsgSend(resp, streampool.EncodingProto) + return stream.MsgSend(resp, nil) }) // here is a little bit non-standard decision, because we can return error but still can queue the request if newRq != nil { diff --git a/commonspace/sync/requeststat.go b/commonspace/sync/requeststat.go index 5a7403b8e..a4b67d7f4 100644 --- a/commonspace/sync/requeststat.go +++ b/commonspace/sync/requeststat.go @@ -46,7 +46,7 @@ func (r *requestStat) AddQueueRequest(peerId string, req *spacesyncproto.ObjectS defer r.Unlock() stat := r.peerStats[peerId] stat.QueueCount++ - stat.QueueSize += int64(req.Size()) + stat.QueueSize += int64(req.SizeVT()) r.peerStats[peerId] = stat } @@ -55,7 +55,7 @@ func (r *requestStat) AddSyncRequest(peerId string, req *spacesyncproto.ObjectSy defer r.Unlock() stat := r.peerStats[peerId] stat.SyncCount++ - stat.SyncSize += int64(req.Size()) + stat.SyncSize += int64(req.SizeVT()) r.peerStats[peerId] = stat } @@ -64,7 +64,7 @@ func (r *requestStat) RemoveSyncRequest(peerId string, req *spacesyncproto.Objec defer r.Unlock() stat := r.peerStats[peerId] stat.SyncCount-- - stat.SyncSize -= int64(req.Size()) + stat.SyncSize -= int64(req.SizeVT()) r.peerStats[peerId] = stat } @@ -73,7 +73,7 @@ func (r *requestStat) RemoveQueueRequest(peerId string, req *spacesyncproto.Obje defer r.Unlock() stat := r.peerStats[peerId] stat.QueueCount-- - stat.QueueSize -= int64(req.Size()) + stat.QueueSize -= int64(req.SizeVT()) r.peerStats[peerId] = stat } diff --git a/commonspace/sync/sync_test.go b/commonspace/sync/sync_test.go index 0a4d93c05..7fef6775b 100644 --- a/commonspace/sync/sync_test.go +++ b/commonspace/sync/sync_test.go @@ -2,12 +2,13 @@ package sync import ( "context" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" "io" "sync" "testing" "time" - "github.com/anyproto/protobuf/proto" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" "storj.io/drpc" @@ -350,6 +351,10 @@ type testResponse struct { msg string } +func (t *testResponse) ProtoReflect() protoreflect.Message { + panic("implement me") +} + func (t *testResponse) Reset() { } diff --git a/commonspace/sync/syncdeps/mock_syncdeps/mock_syncdeps.go b/commonspace/sync/syncdeps/mock_syncdeps/mock_syncdeps.go index 50d1cfd9b..cbab9ac08 100644 --- a/commonspace/sync/syncdeps/mock_syncdeps/mock_syncdeps.go +++ b/commonspace/sync/syncdeps/mock_syncdeps/mock_syncdeps.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_syncdeps/mock_syncdeps.go github.com/anyproto/any-sync/commonspace/sync/syncdeps ObjectSyncHandler,RequestSender,ResponseCollector // + // Package mock_syncdeps is a generated GoMock package. package mock_syncdeps @@ -14,8 +15,8 @@ import ( syncdeps "github.com/anyproto/any-sync/commonspace/sync/syncdeps" syncstatus "github.com/anyproto/any-sync/commonspace/syncstatus" - proto "github.com/anyproto/protobuf/proto" gomock "go.uber.org/mock/gomock" + proto "google.golang.org/protobuf/proto" drpc "storj.io/drpc" ) @@ -23,6 +24,7 @@ import ( type MockObjectSyncHandler struct { ctrl *gomock.Controller recorder *MockObjectSyncHandlerMockRecorder + isgomock struct{} } // MockObjectSyncHandlerMockRecorder is the mock recorder for MockObjectSyncHandler. @@ -43,47 +45,47 @@ func (m *MockObjectSyncHandler) EXPECT() *MockObjectSyncHandlerMockRecorder { } // HandleHeadUpdate mocks base method. -func (m *MockObjectSyncHandler) HandleHeadUpdate(arg0 context.Context, arg1 syncstatus.StatusUpdater, arg2 drpc.Message) (syncdeps.Request, error) { +func (m *MockObjectSyncHandler) HandleHeadUpdate(ctx context.Context, statusUpdater syncstatus.StatusUpdater, headUpdate drpc.Message) (syncdeps.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleHeadUpdate", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "HandleHeadUpdate", ctx, statusUpdater, headUpdate) ret0, _ := ret[0].(syncdeps.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleHeadUpdate indicates an expected call of HandleHeadUpdate. -func (mr *MockObjectSyncHandlerMockRecorder) HandleHeadUpdate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockObjectSyncHandlerMockRecorder) HandleHeadUpdate(ctx, statusUpdater, headUpdate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockObjectSyncHandler)(nil).HandleHeadUpdate), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockObjectSyncHandler)(nil).HandleHeadUpdate), ctx, statusUpdater, headUpdate) } // HandleResponse mocks base method. -func (m *MockObjectSyncHandler) HandleResponse(arg0 context.Context, arg1, arg2 string, arg3 syncdeps.Response) error { +func (m *MockObjectSyncHandler) HandleResponse(ctx context.Context, peerId, objectId string, resp syncdeps.Response) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleResponse", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "HandleResponse", ctx, peerId, objectId, resp) ret0, _ := ret[0].(error) return ret0 } // HandleResponse indicates an expected call of HandleResponse. -func (mr *MockObjectSyncHandlerMockRecorder) HandleResponse(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectSyncHandlerMockRecorder) HandleResponse(ctx, peerId, objectId, resp any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockObjectSyncHandler)(nil).HandleResponse), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockObjectSyncHandler)(nil).HandleResponse), ctx, peerId, objectId, resp) } // HandleStreamRequest mocks base method. -func (m *MockObjectSyncHandler) HandleStreamRequest(arg0 context.Context, arg1 syncdeps.Request, arg2 syncdeps.QueueSizeUpdater, arg3 func(proto.Message) error) (syncdeps.Request, error) { +func (m *MockObjectSyncHandler) HandleStreamRequest(ctx context.Context, rq syncdeps.Request, updater syncdeps.QueueSizeUpdater, send func(proto.Message) error) (syncdeps.Request, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleStreamRequest", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "HandleStreamRequest", ctx, rq, updater, send) ret0, _ := ret[0].(syncdeps.Request) ret1, _ := ret[1].(error) return ret0, ret1 } // HandleStreamRequest indicates an expected call of HandleStreamRequest. -func (mr *MockObjectSyncHandlerMockRecorder) HandleStreamRequest(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockObjectSyncHandlerMockRecorder) HandleStreamRequest(ctx, rq, updater, send any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockObjectSyncHandler)(nil).HandleStreamRequest), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockObjectSyncHandler)(nil).HandleStreamRequest), ctx, rq, updater, send) } // ResponseCollector mocks base method. @@ -104,6 +106,7 @@ func (mr *MockObjectSyncHandlerMockRecorder) ResponseCollector() *gomock.Call { type MockRequestSender struct { ctrl *gomock.Controller recorder *MockRequestSenderMockRecorder + isgomock struct{} } // MockRequestSenderMockRecorder is the mock recorder for MockRequestSender. @@ -124,23 +127,24 @@ func (m *MockRequestSender) EXPECT() *MockRequestSenderMockRecorder { } // SendRequest mocks base method. -func (m *MockRequestSender) SendRequest(arg0 context.Context, arg1 syncdeps.Request, arg2 syncdeps.ResponseCollector) error { +func (m *MockRequestSender) SendRequest(ctx context.Context, rq syncdeps.Request, collector syncdeps.ResponseCollector) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendRequest", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SendRequest", ctx, rq, collector) ret0, _ := ret[0].(error) return ret0 } // SendRequest indicates an expected call of SendRequest. -func (mr *MockRequestSenderMockRecorder) SendRequest(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockRequestSenderMockRecorder) SendRequest(ctx, rq, collector any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRequest", reflect.TypeOf((*MockRequestSender)(nil).SendRequest), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRequest", reflect.TypeOf((*MockRequestSender)(nil).SendRequest), ctx, rq, collector) } // MockResponseCollector is a mock of ResponseCollector interface. type MockResponseCollector struct { ctrl *gomock.Controller recorder *MockResponseCollectorMockRecorder + isgomock struct{} } // MockResponseCollectorMockRecorder is the mock recorder for MockResponseCollector. @@ -161,17 +165,17 @@ func (m *MockResponseCollector) EXPECT() *MockResponseCollectorMockRecorder { } // CollectResponse mocks base method. -func (m *MockResponseCollector) CollectResponse(arg0 context.Context, arg1, arg2 string, arg3 syncdeps.Response) error { +func (m *MockResponseCollector) CollectResponse(ctx context.Context, peerId, objectId string, resp syncdeps.Response) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CollectResponse", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "CollectResponse", ctx, peerId, objectId, resp) ret0, _ := ret[0].(error) return ret0 } // CollectResponse indicates an expected call of CollectResponse. -func (mr *MockResponseCollectorMockRecorder) CollectResponse(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockResponseCollectorMockRecorder) CollectResponse(ctx, peerId, objectId, resp any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CollectResponse", reflect.TypeOf((*MockResponseCollector)(nil).CollectResponse), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CollectResponse", reflect.TypeOf((*MockResponseCollector)(nil).CollectResponse), ctx, peerId, objectId, resp) } // NewResponse mocks base method. diff --git a/commonspace/sync/syncdeps/request.go b/commonspace/sync/syncdeps/request.go index 7da54ad94..3b0b5a2dd 100644 --- a/commonspace/sync/syncdeps/request.go +++ b/commonspace/sync/syncdeps/request.go @@ -1,6 +1,6 @@ package syncdeps -import "github.com/anyproto/protobuf/proto" +import "google.golang.org/protobuf/proto" type Request interface { PeerId() string diff --git a/commonspace/sync/syncdeps/syncdeps.go b/commonspace/sync/syncdeps/syncdeps.go index ccb6f0dd6..826e308e5 100644 --- a/commonspace/sync/syncdeps/syncdeps.go +++ b/commonspace/sync/syncdeps/syncdeps.go @@ -3,8 +3,8 @@ package syncdeps import ( "context" + "google.golang.org/protobuf/proto" - "github.com/anyproto/protobuf/proto" "storj.io/drpc" "github.com/anyproto/any-sync/app" diff --git a/commonspace/syncstatus/mock_syncstatus/mock_syncstatus.go b/commonspace/syncstatus/mock_syncstatus/mock_syncstatus.go index ba3b328f8..79a4d43b4 100644 --- a/commonspace/syncstatus/mock_syncstatus/mock_syncstatus.go +++ b/commonspace/syncstatus/mock_syncstatus/mock_syncstatus.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_syncstatus/mock_syncstatus.go github.com/anyproto/any-sync/commonspace/syncstatus StatusUpdater // + // Package mock_syncstatus is a generated GoMock package. package mock_syncstatus @@ -19,6 +20,7 @@ import ( type MockStatusUpdater struct { ctrl *gomock.Controller recorder *MockStatusUpdaterMockRecorder + isgomock struct{} } // MockStatusUpdaterMockRecorder is the mock recorder for MockStatusUpdater. @@ -39,53 +41,53 @@ func (m *MockStatusUpdater) EXPECT() *MockStatusUpdaterMockRecorder { } // HeadsApply mocks base method. -func (m *MockStatusUpdater) HeadsApply(arg0, arg1 string, arg2 []string, arg3 bool) { +func (m *MockStatusUpdater) HeadsApply(senderId, treeId string, heads []string, allAdded bool) { m.ctrl.T.Helper() - m.ctrl.Call(m, "HeadsApply", arg0, arg1, arg2, arg3) + m.ctrl.Call(m, "HeadsApply", senderId, treeId, heads, allAdded) } // HeadsApply indicates an expected call of HeadsApply. -func (mr *MockStatusUpdaterMockRecorder) HeadsApply(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockStatusUpdaterMockRecorder) HeadsApply(senderId, treeId, heads, allAdded any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadsApply", reflect.TypeOf((*MockStatusUpdater)(nil).HeadsApply), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadsApply", reflect.TypeOf((*MockStatusUpdater)(nil).HeadsApply), senderId, treeId, heads, allAdded) } // HeadsChange mocks base method. -func (m *MockStatusUpdater) HeadsChange(arg0 string, arg1 []string) { +func (m *MockStatusUpdater) HeadsChange(treeId string, heads []string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "HeadsChange", arg0, arg1) + m.ctrl.Call(m, "HeadsChange", treeId, heads) } // HeadsChange indicates an expected call of HeadsChange. -func (mr *MockStatusUpdaterMockRecorder) HeadsChange(arg0, arg1 any) *gomock.Call { +func (mr *MockStatusUpdaterMockRecorder) HeadsChange(treeId, heads any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadsChange", reflect.TypeOf((*MockStatusUpdater)(nil).HeadsChange), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadsChange", reflect.TypeOf((*MockStatusUpdater)(nil).HeadsChange), treeId, heads) } // HeadsReceive mocks base method. -func (m *MockStatusUpdater) HeadsReceive(arg0, arg1 string, arg2 []string) { +func (m *MockStatusUpdater) HeadsReceive(senderId, treeId string, heads []string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "HeadsReceive", arg0, arg1, arg2) + m.ctrl.Call(m, "HeadsReceive", senderId, treeId, heads) } // HeadsReceive indicates an expected call of HeadsReceive. -func (mr *MockStatusUpdaterMockRecorder) HeadsReceive(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatusUpdaterMockRecorder) HeadsReceive(senderId, treeId, heads any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadsReceive", reflect.TypeOf((*MockStatusUpdater)(nil).HeadsReceive), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadsReceive", reflect.TypeOf((*MockStatusUpdater)(nil).HeadsReceive), senderId, treeId, heads) } // Init mocks base method. -func (m *MockStatusUpdater) Init(arg0 *app.App) error { +func (m *MockStatusUpdater) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockStatusUpdaterMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockStatusUpdaterMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockStatusUpdater)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockStatusUpdater)(nil).Init), a) } // Name mocks base method. @@ -103,13 +105,13 @@ func (mr *MockStatusUpdaterMockRecorder) Name() *gomock.Call { } // ObjectReceive mocks base method. -func (m *MockStatusUpdater) ObjectReceive(arg0, arg1 string, arg2 []string) { +func (m *MockStatusUpdater) ObjectReceive(senderId, treeId string, heads []string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ObjectReceive", arg0, arg1, arg2) + m.ctrl.Call(m, "ObjectReceive", senderId, treeId, heads) } // ObjectReceive indicates an expected call of ObjectReceive. -func (mr *MockStatusUpdaterMockRecorder) ObjectReceive(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStatusUpdaterMockRecorder) ObjectReceive(senderId, treeId, heads any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectReceive", reflect.TypeOf((*MockStatusUpdater)(nil).ObjectReceive), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectReceive", reflect.TypeOf((*MockStatusUpdater)(nil).ObjectReceive), senderId, treeId, heads) } diff --git a/consensus/consensusclient/client_test.go b/consensus/consensusclient/client_test.go index dd26e7c0d..55ecf7a18 100644 --- a/consensus/consensusclient/client_test.go +++ b/consensus/consensusclient/client_test.go @@ -201,7 +201,7 @@ func (t *testServer) RecordAdd(ctx context.Context, req *consensusproto.RecordAd return nil, err } } - data, _ := req.Record.Marshal() + data, _ := req.Record.MarshalVT() id, _ := cidutil.NewCidFromBytes(data) return &consensusproto.RawRecordWithId{Id: id, Payload: data}, nil } diff --git a/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go b/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go index c3bf7a3ce..895836d96 100644 --- a/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go +++ b/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_consensusclient/mock_consensusclient.go github.com/anyproto/any-sync/consensus/consensusclient Service // + // Package mock_consensusclient is a generated GoMock package. package mock_consensusclient @@ -22,6 +23,7 @@ import ( type MockService struct { ctrl *gomock.Controller recorder *MockServiceMockRecorder + isgomock struct{} } // MockServiceMockRecorder is the mock recorder for MockService. @@ -42,74 +44,74 @@ func (m *MockService) EXPECT() *MockServiceMockRecorder { } // AddLog mocks base method. -func (m *MockService) AddLog(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecordWithId) error { +func (m *MockService) AddLog(ctx context.Context, logId string, rec *consensusproto.RawRecordWithId) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddLog", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddLog", ctx, logId, rec) ret0, _ := ret[0].(error) return ret0 } // AddLog indicates an expected call of AddLog. -func (mr *MockServiceMockRecorder) AddLog(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceMockRecorder) AddLog(ctx, logId, rec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLog", reflect.TypeOf((*MockService)(nil).AddLog), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLog", reflect.TypeOf((*MockService)(nil).AddLog), ctx, logId, rec) } // AddRecord mocks base method. -func (m *MockService) AddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { +func (m *MockService) AddRecord(ctx context.Context, logId string, rec *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRecord", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddRecord", ctx, logId, rec) ret0, _ := ret[0].(*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRecord indicates an expected call of AddRecord. -func (mr *MockServiceMockRecorder) AddRecord(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockServiceMockRecorder) AddRecord(ctx, logId, rec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockService)(nil).AddRecord), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockService)(nil).AddRecord), ctx, logId, rec) } // Close mocks base method. -func (m *MockService) Close(arg0 context.Context) error { +func (m *MockService) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockServiceMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), ctx) } // DeleteLog mocks base method. -func (m *MockService) DeleteLog(arg0 context.Context, arg1 string) error { +func (m *MockService) DeleteLog(ctx context.Context, logId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteLog", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteLog", ctx, logId) ret0, _ := ret[0].(error) return ret0 } // DeleteLog indicates an expected call of DeleteLog. -func (mr *MockServiceMockRecorder) DeleteLog(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceMockRecorder) DeleteLog(ctx, logId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLog", reflect.TypeOf((*MockService)(nil).DeleteLog), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLog", reflect.TypeOf((*MockService)(nil).DeleteLog), ctx, logId) } // Init mocks base method. -func (m *MockService) Init(arg0 *app.App) error { +func (m *MockService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), a) } // Name mocks base method. @@ -127,43 +129,43 @@ func (mr *MockServiceMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockService) Run(arg0 context.Context) error { +func (m *MockService) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockServiceMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockService)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockService)(nil).Run), ctx) } // UnWatch mocks base method. -func (m *MockService) UnWatch(arg0 string) error { +func (m *MockService) UnWatch(logId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UnWatch", arg0) + ret := m.ctrl.Call(m, "UnWatch", logId) ret0, _ := ret[0].(error) return ret0 } // UnWatch indicates an expected call of UnWatch. -func (mr *MockServiceMockRecorder) UnWatch(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) UnWatch(logId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnWatch", reflect.TypeOf((*MockService)(nil).UnWatch), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnWatch", reflect.TypeOf((*MockService)(nil).UnWatch), logId) } // Watch mocks base method. -func (m *MockService) Watch(arg0 string, arg1 consensusclient.Watcher) error { +func (m *MockService) Watch(logId string, w consensusclient.Watcher) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Watch", arg0, arg1) + ret := m.ctrl.Call(m, "Watch", logId, w) ret0, _ := ret[0].(error) return ret0 } // Watch indicates an expected call of Watch. -func (mr *MockServiceMockRecorder) Watch(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Watch(logId, w any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockService)(nil).Watch), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockService)(nil).Watch), logId, w) } diff --git a/consensus/consensusproto/consensus.pb.go b/consensus/consensusproto/consensus.pb.go index 296eefd86..8839ec484 100644 --- a/consensus/consensusproto/consensus.pb.go +++ b/consensus/consensusproto/consensus.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: consensus/consensusproto/protos/consensus.proto package consensusproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ErrCodes int32 @@ -34,4266 +33,1197 @@ const ( ErrCodes_ErrorOffset ErrCodes = 500 ) -var ErrCodes_name = map[int32]string{ - 0: "Unexpected", - 1: "LogExists", - 2: "LogNotFound", - 3: "RecordConflict", - 4: "Forbidden", - 5: "InvalidPayload", - 500: "ErrorOffset", -} +// Enum value maps for ErrCodes. +var ( + ErrCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "LogExists", + 2: "LogNotFound", + 3: "RecordConflict", + 4: "Forbidden", + 5: "InvalidPayload", + 500: "ErrorOffset", + } + ErrCodes_value = map[string]int32{ + "Unexpected": 0, + "LogExists": 1, + "LogNotFound": 2, + "RecordConflict": 3, + "Forbidden": 4, + "InvalidPayload": 5, + "ErrorOffset": 500, + } +) -var ErrCodes_value = map[string]int32{ - "Unexpected": 0, - "LogExists": 1, - "LogNotFound": 2, - "RecordConflict": 3, - "Forbidden": 4, - "InvalidPayload": 5, - "ErrorOffset": 500, +func (x ErrCodes) Enum() *ErrCodes { + p := new(ErrCodes) + *p = x + return p } func (x ErrCodes) String() string { - return proto.EnumName(ErrCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ErrCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{0} +func (ErrCodes) Descriptor() protoreflect.EnumDescriptor { + return file_consensus_consensusproto_protos_consensus_proto_enumTypes[0].Descriptor() } -type Log struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Records []*RawRecordWithId `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"` +func (ErrCodes) Type() protoreflect.EnumType { + return &file_consensus_consensusproto_protos_consensus_proto_enumTypes[0] } -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{0} -} -func (m *Log) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Log.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x ErrCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *Log) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +// Deprecated: Use ErrCodes.Descriptor instead. +func (ErrCodes) EnumDescriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{0} +} + +type Log struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Records []*RawRecordWithId `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_Log.Merge(m, src) + +func (x *Log) Reset() { + *x = Log{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Log) XXX_Size() int { - return m.Size() + +func (x *Log) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Log) XXX_DiscardUnknown() { - xxx_messageInfo_Log.DiscardUnknown(m) + +func (*Log) ProtoMessage() {} + +func (x *Log) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Log proto.InternalMessageInfo +// Deprecated: Use Log.ProtoReflect.Descriptor instead. +func (*Log) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{0} +} -func (m *Log) GetId() string { - if m != nil { - return m.Id +func (x *Log) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *Log) GetRecords() []*RawRecordWithId { - if m != nil { - return m.Records +func (x *Log) GetRecords() []*RawRecordWithId { + if x != nil { + return x.Records } return nil } // RawRecord is a proto message containing the payload in bytes, signature of the account who added it and signature of the acceptor type RawRecord struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - AcceptorIdentity []byte `protobuf:"bytes,3,opt,name=acceptorIdentity,proto3" json:"acceptorIdentity,omitempty"` - AcceptorSignature []byte `protobuf:"bytes,4,opt,name=acceptorSignature,proto3" json:"acceptorSignature,omitempty"` - AcceptorTimestamp int64 `protobuf:"varint,5,opt,name=acceptorTimestamp,proto3" json:"acceptorTimestamp,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + AcceptorIdentity []byte `protobuf:"bytes,3,opt,name=acceptorIdentity,proto3" json:"acceptorIdentity,omitempty"` + AcceptorSignature []byte `protobuf:"bytes,4,opt,name=acceptorSignature,proto3" json:"acceptorSignature,omitempty"` + AcceptorTimestamp int64 `protobuf:"varint,5,opt,name=acceptorTimestamp,proto3" json:"acceptorTimestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RawRecord) Reset() { *m = RawRecord{} } -func (m *RawRecord) String() string { return proto.CompactTextString(m) } -func (*RawRecord) ProtoMessage() {} -func (*RawRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{1} -} -func (m *RawRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RawRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RawRecord) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *RawRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawRecord.Merge(m, src) +func (x *RawRecord) Reset() { + *x = RawRecord{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RawRecord) XXX_Size() int { - return m.Size() + +func (x *RawRecord) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RawRecord) XXX_DiscardUnknown() { - xxx_messageInfo_RawRecord.DiscardUnknown(m) + +func (*RawRecord) ProtoMessage() {} + +func (x *RawRecord) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RawRecord proto.InternalMessageInfo +// Deprecated: Use RawRecord.ProtoReflect.Descriptor instead. +func (*RawRecord) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{1} +} -func (m *RawRecord) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *RawRecord) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *RawRecord) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *RawRecord) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } -func (m *RawRecord) GetAcceptorIdentity() []byte { - if m != nil { - return m.AcceptorIdentity +func (x *RawRecord) GetAcceptorIdentity() []byte { + if x != nil { + return x.AcceptorIdentity } return nil } -func (m *RawRecord) GetAcceptorSignature() []byte { - if m != nil { - return m.AcceptorSignature +func (x *RawRecord) GetAcceptorSignature() []byte { + if x != nil { + return x.AcceptorSignature } return nil } -func (m *RawRecord) GetAcceptorTimestamp() int64 { - if m != nil { - return m.AcceptorTimestamp +func (x *RawRecord) GetAcceptorTimestamp() int64 { + if x != nil { + return x.AcceptorTimestamp } return 0 } // RawRecordWithId is a raw record and the id for convenience type RawRecordWithId struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RawRecordWithId) Reset() { *m = RawRecordWithId{} } -func (m *RawRecordWithId) String() string { return proto.CompactTextString(m) } -func (*RawRecordWithId) ProtoMessage() {} -func (*RawRecordWithId) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{2} -} -func (m *RawRecordWithId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RawRecordWithId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RawRecordWithId.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RawRecordWithId) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *RawRecordWithId) Reset() { + *x = RawRecordWithId{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RawRecordWithId) XXX_Merge(src proto.Message) { - xxx_messageInfo_RawRecordWithId.Merge(m, src) -} -func (m *RawRecordWithId) XXX_Size() int { - return m.Size() + +func (x *RawRecordWithId) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RawRecordWithId) XXX_DiscardUnknown() { - xxx_messageInfo_RawRecordWithId.DiscardUnknown(m) + +func (*RawRecordWithId) ProtoMessage() {} + +func (x *RawRecordWithId) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RawRecordWithId proto.InternalMessageInfo +// Deprecated: Use RawRecordWithId.ProtoReflect.Descriptor instead. +func (*RawRecordWithId) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{2} +} -func (m *RawRecordWithId) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *RawRecordWithId) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *RawRecordWithId) GetId() string { - if m != nil { - return m.Id +func (x *RawRecordWithId) GetId() string { + if x != nil { + return x.Id } return "" } // Record is a record containing a data type Record struct { - PrevId string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"` - Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + PrevId string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"` + Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Record) Reset() { *m = Record{} } -func (m *Record) String() string { return proto.CompactTextString(m) } -func (*Record) ProtoMessage() {} -func (*Record) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{3} -} -func (m *Record) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Record.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Record) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Record) XXX_Merge(src proto.Message) { - xxx_messageInfo_Record.Merge(m, src) +func (x *Record) Reset() { + *x = Record{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Record) XXX_Size() int { - return m.Size() + +func (x *Record) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Record) XXX_DiscardUnknown() { - xxx_messageInfo_Record.DiscardUnknown(m) + +func (*Record) ProtoMessage() {} + +func (x *Record) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Record proto.InternalMessageInfo +// Deprecated: Use Record.ProtoReflect.Descriptor instead. +func (*Record) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{3} +} -func (m *Record) GetPrevId() string { - if m != nil { - return m.PrevId +func (x *Record) GetPrevId() string { + if x != nil { + return x.PrevId } return "" } -func (m *Record) GetIdentity() []byte { - if m != nil { - return m.Identity +func (x *Record) GetIdentity() []byte { + if x != nil { + return x.Identity } return nil } -func (m *Record) GetData() []byte { - if m != nil { - return m.Data +func (x *Record) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *Record) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *Record) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } type Ok struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Ok) Reset() { *m = Ok{} } -func (m *Ok) String() string { return proto.CompactTextString(m) } -func (*Ok) ProtoMessage() {} -func (*Ok) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{4} -} -func (m *Ok) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ok) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ok.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *Ok) Reset() { + *x = Ok{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Ok) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Ok) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ok.Merge(m, src) -} -func (m *Ok) XXX_Size() int { - return m.Size() + +func (x *Ok) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Ok) XXX_DiscardUnknown() { - xxx_messageInfo_Ok.DiscardUnknown(m) + +func (*Ok) ProtoMessage() {} + +func (x *Ok) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Ok proto.InternalMessageInfo +// Deprecated: Use Ok.ProtoReflect.Descriptor instead. +func (*Ok) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{4} +} type LogAddRequest struct { - LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` // first record in the log, consensus node not sign it - Record *RawRecordWithId `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + Record *RawRecordWithId `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogAddRequest) Reset() { *m = LogAddRequest{} } -func (m *LogAddRequest) String() string { return proto.CompactTextString(m) } -func (*LogAddRequest) ProtoMessage() {} -func (*LogAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{5} -} -func (m *LogAddRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogAddRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogAddRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogAddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogAddRequest.Merge(m, src) +func (x *LogAddRequest) Reset() { + *x = LogAddRequest{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogAddRequest) XXX_Size() int { - return m.Size() + +func (x *LogAddRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogAddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogAddRequest.DiscardUnknown(m) + +func (*LogAddRequest) ProtoMessage() {} + +func (x *LogAddRequest) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LogAddRequest proto.InternalMessageInfo +// Deprecated: Use LogAddRequest.ProtoReflect.Descriptor instead. +func (*LogAddRequest) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{5} +} -func (m *LogAddRequest) GetLogId() string { - if m != nil { - return m.LogId +func (x *LogAddRequest) GetLogId() string { + if x != nil { + return x.LogId } return "" } -func (m *LogAddRequest) GetRecord() *RawRecordWithId { - if m != nil { - return m.Record +func (x *LogAddRequest) GetRecord() *RawRecordWithId { + if x != nil { + return x.Record } return nil } type RecordAddRequest struct { - LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` - Record *RawRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` + Record *RawRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *RecordAddRequest) Reset() { *m = RecordAddRequest{} } -func (m *RecordAddRequest) String() string { return proto.CompactTextString(m) } -func (*RecordAddRequest) ProtoMessage() {} -func (*RecordAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{6} -} -func (m *RecordAddRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RecordAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RecordAddRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RecordAddRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *RecordAddRequest) Reset() { + *x = RecordAddRequest{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *RecordAddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecordAddRequest.Merge(m, src) -} -func (m *RecordAddRequest) XXX_Size() int { - return m.Size() + +func (x *RecordAddRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RecordAddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RecordAddRequest.DiscardUnknown(m) + +func (*RecordAddRequest) ProtoMessage() {} + +func (x *RecordAddRequest) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_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) } -var xxx_messageInfo_RecordAddRequest proto.InternalMessageInfo +// Deprecated: Use RecordAddRequest.ProtoReflect.Descriptor instead. +func (*RecordAddRequest) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{6} +} -func (m *RecordAddRequest) GetLogId() string { - if m != nil { - return m.LogId +func (x *RecordAddRequest) GetLogId() string { + if x != nil { + return x.LogId } return "" } -func (m *RecordAddRequest) GetRecord() *RawRecord { - if m != nil { - return m.Record +func (x *RecordAddRequest) GetRecord() *RawRecord { + if x != nil { + return x.Record } return nil } type LogWatchRequest struct { - WatchIds []string `protobuf:"bytes,1,rep,name=watchIds,proto3" json:"watchIds,omitempty"` - UnwatchIds []string `protobuf:"bytes,2,rep,name=unwatchIds,proto3" json:"unwatchIds,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + WatchIds []string `protobuf:"bytes,1,rep,name=watchIds,proto3" json:"watchIds,omitempty"` + UnwatchIds []string `protobuf:"bytes,2,rep,name=unwatchIds,proto3" json:"unwatchIds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogWatchRequest) Reset() { *m = LogWatchRequest{} } -func (m *LogWatchRequest) String() string { return proto.CompactTextString(m) } -func (*LogWatchRequest) ProtoMessage() {} -func (*LogWatchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{7} -} -func (m *LogWatchRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogWatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogWatchRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogWatchRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogWatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogWatchRequest.Merge(m, src) +func (x *LogWatchRequest) Reset() { + *x = LogWatchRequest{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogWatchRequest) XXX_Size() int { - return m.Size() + +func (x *LogWatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogWatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogWatchRequest.DiscardUnknown(m) + +func (*LogWatchRequest) ProtoMessage() {} + +func (x *LogWatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LogWatchRequest proto.InternalMessageInfo +// Deprecated: Use LogWatchRequest.ProtoReflect.Descriptor instead. +func (*LogWatchRequest) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{7} +} -func (m *LogWatchRequest) GetWatchIds() []string { - if m != nil { - return m.WatchIds +func (x *LogWatchRequest) GetWatchIds() []string { + if x != nil { + return x.WatchIds } return nil } -func (m *LogWatchRequest) GetUnwatchIds() []string { - if m != nil { - return m.UnwatchIds +func (x *LogWatchRequest) GetUnwatchIds() []string { + if x != nil { + return x.UnwatchIds } return nil } type LogWatchEvent struct { - LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` - Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` - Error *Err `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` + Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + Error *Err `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogWatchEvent) Reset() { *m = LogWatchEvent{} } -func (m *LogWatchEvent) String() string { return proto.CompactTextString(m) } -func (*LogWatchEvent) ProtoMessage() {} -func (*LogWatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{8} -} -func (m *LogWatchEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogWatchEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogWatchEvent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *LogWatchEvent) Reset() { + *x = LogWatchEvent{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogWatchEvent) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogWatchEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogWatchEvent.Merge(m, src) -} -func (m *LogWatchEvent) XXX_Size() int { - return m.Size() + +func (x *LogWatchEvent) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogWatchEvent) XXX_DiscardUnknown() { - xxx_messageInfo_LogWatchEvent.DiscardUnknown(m) + +func (*LogWatchEvent) ProtoMessage() {} + +func (x *LogWatchEvent) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LogWatchEvent proto.InternalMessageInfo +// Deprecated: Use LogWatchEvent.ProtoReflect.Descriptor instead. +func (*LogWatchEvent) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{8} +} -func (m *LogWatchEvent) GetLogId() string { - if m != nil { - return m.LogId +func (x *LogWatchEvent) GetLogId() string { + if x != nil { + return x.LogId } return "" } -func (m *LogWatchEvent) GetRecords() []*RawRecordWithId { - if m != nil { - return m.Records +func (x *LogWatchEvent) GetRecords() []*RawRecordWithId { + if x != nil { + return x.Records } return nil } -func (m *LogWatchEvent) GetError() *Err { - if m != nil { - return m.Error +func (x *LogWatchEvent) GetError() *Err { + if x != nil { + return x.Error } return nil } type LogDeleteRequest struct { - LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogDeleteRequest) Reset() { *m = LogDeleteRequest{} } -func (m *LogDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*LogDeleteRequest) ProtoMessage() {} -func (*LogDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{9} -} -func (m *LogDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogDeleteRequest.Merge(m, src) +func (x *LogDeleteRequest) Reset() { + *x = LogDeleteRequest{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogDeleteRequest) XXX_Size() int { - return m.Size() -} -func (m *LogDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogDeleteRequest.DiscardUnknown(m) + +func (x *LogDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_LogDeleteRequest proto.InternalMessageInfo +func (*LogDeleteRequest) ProtoMessage() {} -func (m *LogDeleteRequest) GetLogId() string { - if m != nil { - return m.LogId +func (x *LogDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type Err struct { - Error ErrCodes `protobuf:"varint,1,opt,name=error,proto3,enum=consensusProto.ErrCodes" json:"error,omitempty"` +// Deprecated: Use LogDeleteRequest.ProtoReflect.Descriptor instead. +func (*LogDeleteRequest) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{9} } -func (m *Err) Reset() { *m = Err{} } -func (m *Err) String() string { return proto.CompactTextString(m) } -func (*Err) ProtoMessage() {} -func (*Err) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{10} -} -func (m *Err) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Err) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Err.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *LogDeleteRequest) GetLogId() string { + if x != nil { + return x.LogId } + return "" } -func (m *Err) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type Err struct { + state protoimpl.MessageState `protogen:"open.v1"` + Error ErrCodes `protobuf:"varint,1,opt,name=error,proto3,enum=consensusProto.ErrCodes" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Err) XXX_Merge(src proto.Message) { - xxx_messageInfo_Err.Merge(m, src) + +func (x *Err) Reset() { + *x = Err{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Err) XXX_Size() int { - return m.Size() + +func (x *Err) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Err) XXX_DiscardUnknown() { - xxx_messageInfo_Err.DiscardUnknown(m) + +func (*Err) ProtoMessage() {} + +func (x *Err) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Err proto.InternalMessageInfo +// Deprecated: Use Err.ProtoReflect.Descriptor instead. +func (*Err) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{10} +} -func (m *Err) GetError() ErrCodes { - if m != nil { - return m.Error +func (x *Err) GetError() ErrCodes { + if x != nil { + return x.Error } return ErrCodes_Unexpected } // LogSyncContentValue provides different types for log sync type LogSyncContentValue struct { + state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Value: // // *LogSyncContentValue_HeadUpdate // *LogSyncContentValue_FullSyncRequest // *LogSyncContentValue_FullSyncResponse - Value isLogSyncContentValueValue `protobuf_oneof:"value"` + Value isLogSyncContentValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogSyncContentValue) Reset() { *m = LogSyncContentValue{} } -func (m *LogSyncContentValue) String() string { return proto.CompactTextString(m) } -func (*LogSyncContentValue) ProtoMessage() {} -func (*LogSyncContentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{11} -} -func (m *LogSyncContentValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogSyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogSyncContentValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogSyncContentValue) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogSyncContentValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSyncContentValue.Merge(m, src) +func (x *LogSyncContentValue) Reset() { + *x = LogSyncContentValue{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogSyncContentValue) XXX_Size() int { - return m.Size() -} -func (m *LogSyncContentValue) XXX_DiscardUnknown() { - xxx_messageInfo_LogSyncContentValue.DiscardUnknown(m) + +func (x *LogSyncContentValue) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_LogSyncContentValue proto.InternalMessageInfo +func (*LogSyncContentValue) ProtoMessage() {} -type isLogSyncContentValueValue interface { - isLogSyncContentValueValue() - MarshalTo([]byte) (int, error) - Size() int +func (x *LogSyncContentValue) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type LogSyncContentValue_HeadUpdate struct { - HeadUpdate *LogHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"` -} -type LogSyncContentValue_FullSyncRequest struct { - FullSyncRequest *LogFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"` -} -type LogSyncContentValue_FullSyncResponse struct { - FullSyncResponse *LogFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"` +// Deprecated: Use LogSyncContentValue.ProtoReflect.Descriptor instead. +func (*LogSyncContentValue) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{11} } -func (*LogSyncContentValue_HeadUpdate) isLogSyncContentValueValue() {} -func (*LogSyncContentValue_FullSyncRequest) isLogSyncContentValueValue() {} -func (*LogSyncContentValue_FullSyncResponse) isLogSyncContentValueValue() {} - -func (m *LogSyncContentValue) GetValue() isLogSyncContentValueValue { - if m != nil { - return m.Value +func (x *LogSyncContentValue) GetValue() isLogSyncContentValue_Value { + if x != nil { + return x.Value } return nil } -func (m *LogSyncContentValue) GetHeadUpdate() *LogHeadUpdate { - if x, ok := m.GetValue().(*LogSyncContentValue_HeadUpdate); ok { - return x.HeadUpdate +func (x *LogSyncContentValue) GetHeadUpdate() *LogHeadUpdate { + if x != nil { + if x, ok := x.Value.(*LogSyncContentValue_HeadUpdate); ok { + return x.HeadUpdate + } } return nil } -func (m *LogSyncContentValue) GetFullSyncRequest() *LogFullSyncRequest { - if x, ok := m.GetValue().(*LogSyncContentValue_FullSyncRequest); ok { - return x.FullSyncRequest +func (x *LogSyncContentValue) GetFullSyncRequest() *LogFullSyncRequest { + if x != nil { + if x, ok := x.Value.(*LogSyncContentValue_FullSyncRequest); ok { + return x.FullSyncRequest + } } return nil } -func (m *LogSyncContentValue) GetFullSyncResponse() *LogFullSyncResponse { - if x, ok := m.GetValue().(*LogSyncContentValue_FullSyncResponse); ok { - return x.FullSyncResponse +func (x *LogSyncContentValue) GetFullSyncResponse() *LogFullSyncResponse { + if x != nil { + if x, ok := x.Value.(*LogSyncContentValue_FullSyncResponse); ok { + return x.FullSyncResponse + } } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*LogSyncContentValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*LogSyncContentValue_HeadUpdate)(nil), - (*LogSyncContentValue_FullSyncRequest)(nil), - (*LogSyncContentValue_FullSyncResponse)(nil), - } +type isLogSyncContentValue_Value interface { + isLogSyncContentValue_Value() } -// LogSyncMessage is a message sent when we are syncing logs -type LogSyncMessage struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - Content *LogSyncContentValue `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` +type LogSyncContentValue_HeadUpdate struct { + HeadUpdate *LogHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof"` } -func (m *LogSyncMessage) Reset() { *m = LogSyncMessage{} } -func (m *LogSyncMessage) String() string { return proto.CompactTextString(m) } -func (*LogSyncMessage) ProtoMessage() {} -func (*LogSyncMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{12} -} -func (m *LogSyncMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogSyncMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type LogSyncContentValue_FullSyncRequest struct { + FullSyncRequest *LogFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof"` } -func (m *LogSyncMessage) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type LogSyncContentValue_FullSyncResponse struct { + FullSyncResponse *LogFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof"` +} + +func (*LogSyncContentValue_HeadUpdate) isLogSyncContentValue_Value() {} + +func (*LogSyncContentValue_FullSyncRequest) isLogSyncContentValue_Value() {} + +func (*LogSyncContentValue_FullSyncResponse) isLogSyncContentValue_Value() {} + +// LogSyncMessage is a message sent when we are syncing logs +type LogSyncMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + Content *LogSyncContentValue `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogSyncMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSyncMessage.Merge(m, src) + +func (x *LogSyncMessage) Reset() { + *x = LogSyncMessage{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogSyncMessage) XXX_Size() int { - return m.Size() + +func (x *LogSyncMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogSyncMessage) XXX_DiscardUnknown() { - xxx_messageInfo_LogSyncMessage.DiscardUnknown(m) + +func (*LogSyncMessage) ProtoMessage() {} + +func (x *LogSyncMessage) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LogSyncMessage proto.InternalMessageInfo +// Deprecated: Use LogSyncMessage.ProtoReflect.Descriptor instead. +func (*LogSyncMessage) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{12} +} -func (m *LogSyncMessage) GetId() string { - if m != nil { - return m.Id +func (x *LogSyncMessage) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *LogSyncMessage) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *LogSyncMessage) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *LogSyncMessage) GetContent() *LogSyncContentValue { - if m != nil { - return m.Content +func (x *LogSyncMessage) GetContent() *LogSyncContentValue { + if x != nil { + return x.Content } return nil } // LogHeadUpdate is a message sent on consensus log head update type LogHeadUpdate struct { - Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` - Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` + Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogHeadUpdate) Reset() { *m = LogHeadUpdate{} } -func (m *LogHeadUpdate) String() string { return proto.CompactTextString(m) } -func (*LogHeadUpdate) ProtoMessage() {} -func (*LogHeadUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{13} -} -func (m *LogHeadUpdate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogHeadUpdate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *LogHeadUpdate) Reset() { + *x = LogHeadUpdate{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogHeadUpdate) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogHeadUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogHeadUpdate.Merge(m, src) -} -func (m *LogHeadUpdate) XXX_Size() int { - return m.Size() + +func (x *LogHeadUpdate) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogHeadUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_LogHeadUpdate.DiscardUnknown(m) + +func (*LogHeadUpdate) ProtoMessage() {} + +func (x *LogHeadUpdate) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LogHeadUpdate proto.InternalMessageInfo +// Deprecated: Use LogHeadUpdate.ProtoReflect.Descriptor instead. +func (*LogHeadUpdate) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{13} +} -func (m *LogHeadUpdate) GetHead() string { - if m != nil { - return m.Head +func (x *LogHeadUpdate) GetHead() string { + if x != nil { + return x.Head } return "" } -func (m *LogHeadUpdate) GetRecords() []*RawRecordWithId { - if m != nil { - return m.Records +func (x *LogHeadUpdate) GetRecords() []*RawRecordWithId { + if x != nil { + return x.Records } return nil } // LogFullSyncRequest is a message sent when consensus log needs full sync type LogFullSyncRequest struct { - Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` - Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` + Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogFullSyncRequest) Reset() { *m = LogFullSyncRequest{} } -func (m *LogFullSyncRequest) String() string { return proto.CompactTextString(m) } -func (*LogFullSyncRequest) ProtoMessage() {} -func (*LogFullSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{14} -} -func (m *LogFullSyncRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogFullSyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogFullSyncRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogFullSyncRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *LogFullSyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogFullSyncRequest.Merge(m, src) +func (x *LogFullSyncRequest) Reset() { + *x = LogFullSyncRequest{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogFullSyncRequest) XXX_Size() int { - return m.Size() + +func (x *LogFullSyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LogFullSyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogFullSyncRequest.DiscardUnknown(m) + +func (*LogFullSyncRequest) ProtoMessage() {} + +func (x *LogFullSyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LogFullSyncRequest proto.InternalMessageInfo +// Deprecated: Use LogFullSyncRequest.ProtoReflect.Descriptor instead. +func (*LogFullSyncRequest) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{14} +} -func (m *LogFullSyncRequest) GetHead() string { - if m != nil { - return m.Head +func (x *LogFullSyncRequest) GetHead() string { + if x != nil { + return x.Head } return "" } -func (m *LogFullSyncRequest) GetRecords() []*RawRecordWithId { - if m != nil { - return m.Records +func (x *LogFullSyncRequest) GetRecords() []*RawRecordWithId { + if x != nil { + return x.Records } return nil } // LogFullSyncResponse is a message sent as a response for a specific full sync type LogFullSyncResponse struct { - Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` - Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Head string `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` + Records []*RawRecordWithId `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *LogFullSyncResponse) Reset() { *m = LogFullSyncResponse{} } -func (m *LogFullSyncResponse) String() string { return proto.CompactTextString(m) } -func (*LogFullSyncResponse) ProtoMessage() {} -func (*LogFullSyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8d7f1c16b400059, []int{15} -} -func (m *LogFullSyncResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogFullSyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogFullSyncResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogFullSyncResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *LogFullSyncResponse) Reset() { + *x = LogFullSyncResponse{} + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *LogFullSyncResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogFullSyncResponse.Merge(m, src) -} -func (m *LogFullSyncResponse) XXX_Size() int { - return m.Size() -} -func (m *LogFullSyncResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogFullSyncResponse.DiscardUnknown(m) + +func (x *LogFullSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_LogFullSyncResponse proto.InternalMessageInfo +func (*LogFullSyncResponse) ProtoMessage() {} -func (m *LogFullSyncResponse) GetHead() string { - if m != nil { - return m.Head +func (x *LogFullSyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *LogFullSyncResponse) GetRecords() []*RawRecordWithId { - if m != nil { - return m.Records - } - return nil +// Deprecated: Use LogFullSyncResponse.ProtoReflect.Descriptor instead. +func (*LogFullSyncResponse) Descriptor() ([]byte, []int) { + return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{15} } -func init() { - proto.RegisterEnum("consensusProto.ErrCodes", ErrCodes_name, ErrCodes_value) - proto.RegisterType((*Log)(nil), "consensusProto.Log") - proto.RegisterType((*RawRecord)(nil), "consensusProto.RawRecord") - proto.RegisterType((*RawRecordWithId)(nil), "consensusProto.RawRecordWithId") - proto.RegisterType((*Record)(nil), "consensusProto.Record") - proto.RegisterType((*Ok)(nil), "consensusProto.Ok") - proto.RegisterType((*LogAddRequest)(nil), "consensusProto.LogAddRequest") - proto.RegisterType((*RecordAddRequest)(nil), "consensusProto.RecordAddRequest") - proto.RegisterType((*LogWatchRequest)(nil), "consensusProto.LogWatchRequest") - proto.RegisterType((*LogWatchEvent)(nil), "consensusProto.LogWatchEvent") - proto.RegisterType((*LogDeleteRequest)(nil), "consensusProto.LogDeleteRequest") - proto.RegisterType((*Err)(nil), "consensusProto.Err") - proto.RegisterType((*LogSyncContentValue)(nil), "consensusProto.LogSyncContentValue") - proto.RegisterType((*LogSyncMessage)(nil), "consensusProto.LogSyncMessage") - proto.RegisterType((*LogHeadUpdate)(nil), "consensusProto.LogHeadUpdate") - proto.RegisterType((*LogFullSyncRequest)(nil), "consensusProto.LogFullSyncRequest") - proto.RegisterType((*LogFullSyncResponse)(nil), "consensusProto.LogFullSyncResponse") -} - -func init() { - proto.RegisterFile("consensus/consensusproto/protos/consensus.proto", fileDescriptor_b8d7f1c16b400059) -} - -var fileDescriptor_b8d7f1c16b400059 = []byte{ - // 830 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x8e, 0xdb, 0x54, - 0x10, 0x8e, 0xed, 0xfc, 0x4e, 0x68, 0x62, 0xa6, 0x08, 0x99, 0x88, 0xa6, 0x91, 0xb9, 0x09, 0x15, - 0x4a, 0x21, 0x08, 0x21, 0x54, 0x21, 0xd4, 0x86, 0xac, 0x12, 0xc9, 0xcd, 0x2e, 0x2e, 0xa5, 0x12, - 0x48, 0x48, 0xae, 0xcf, 0x89, 0xd7, 0xaa, 0xeb, 0x63, 0xec, 0x93, 0xb4, 0xb9, 0x85, 0x4b, 0x6e, - 0x78, 0x0f, 0x5e, 0x04, 0x89, 0x9b, 0x5e, 0x72, 0x89, 0x76, 0x5f, 0x81, 0x07, 0x40, 0x3e, 0xfe, - 0x49, 0xd6, 0x4e, 0x52, 0x50, 0xf7, 0x66, 0xd7, 0x33, 0xf3, 0xcd, 0x37, 0x73, 0xbe, 0x73, 0x66, - 0x14, 0xb8, 0x6b, 0x33, 0x3f, 0xa2, 0x7e, 0xb4, 0x8a, 0xb6, 0x5f, 0x41, 0xc8, 0x38, 0xbb, 0x2b, - 0xfe, 0xee, 0x78, 0x47, 0xc2, 0x81, 0x9d, 0xdc, 0x71, 0x16, 0xdb, 0xfa, 0x19, 0x28, 0x06, 0x73, - 0xb0, 0x03, 0xb2, 0x4b, 0x34, 0x69, 0x20, 0x0d, 0x5b, 0xa6, 0xec, 0x12, 0xfc, 0x02, 0x1a, 0x21, - 0xb5, 0x59, 0x48, 0x22, 0x4d, 0x19, 0x28, 0xc3, 0xf6, 0xf8, 0xf6, 0xe8, 0x6a, 0xe2, 0xc8, 0xb4, - 0x5e, 0x98, 0x02, 0xf1, 0xc4, 0xe5, 0xe7, 0x73, 0x62, 0x66, 0x78, 0xfd, 0x4f, 0x09, 0x5a, 0x79, - 0x10, 0x35, 0x68, 0x04, 0xd6, 0xc6, 0x63, 0x56, 0xc2, 0xfe, 0x96, 0x99, 0x99, 0xf8, 0x3e, 0xb4, - 0x22, 0xd7, 0xf1, 0x2d, 0xbe, 0x0a, 0xa9, 0x26, 0x8b, 0xd8, 0xd6, 0x81, 0x77, 0x40, 0xb5, 0x6c, - 0x9b, 0x06, 0x9c, 0x85, 0x73, 0x42, 0x7d, 0xee, 0xf2, 0x8d, 0xa6, 0x08, 0x50, 0xc9, 0x8f, 0x1f, - 0xc1, 0xdb, 0x99, 0xef, 0x51, 0xce, 0x58, 0x15, 0xe0, 0x72, 0x60, 0x17, 0xfd, 0xad, 0xfb, 0x9c, - 0x46, 0xdc, 0x7a, 0x1e, 0x68, 0xb5, 0x81, 0x34, 0x54, 0xcc, 0x72, 0x40, 0xbf, 0x07, 0xdd, 0xc2, - 0x49, 0x8f, 0x1c, 0x29, 0x51, 0x51, 0xce, 0x54, 0xd4, 0x7d, 0xa8, 0xa7, 0x32, 0xbc, 0x0b, 0xf5, - 0x20, 0xa4, 0xeb, 0x79, 0xa6, 0x71, 0x6a, 0x61, 0x0f, 0x9a, 0x6e, 0x76, 0xbc, 0x44, 0x83, 0xdc, - 0x46, 0x84, 0x2a, 0xb1, 0xb8, 0x95, 0x1e, 0x5b, 0x7c, 0xc7, 0xa2, 0xf1, 0xbc, 0xe9, 0xaa, 0x68, - 0x7a, 0xeb, 0xd0, 0xab, 0x20, 0x9f, 0x3e, 0xd3, 0x7f, 0x84, 0x1b, 0x06, 0x73, 0xee, 0x13, 0x62, - 0xd2, 0x9f, 0x56, 0x34, 0xe2, 0xf8, 0x0e, 0xd4, 0x3c, 0xe6, 0xe4, 0xb5, 0x13, 0x03, 0x3f, 0x87, - 0x7a, 0x72, 0x65, 0xa2, 0xf0, 0x7f, 0xb8, 0xe1, 0x14, 0xae, 0xff, 0x00, 0x6a, 0xe2, 0x7f, 0x6d, - 0x89, 0x4f, 0x0a, 0x25, 0xde, 0x3b, 0x58, 0x22, 0x27, 0x7f, 0x08, 0x5d, 0x83, 0x39, 0x4f, 0x2c, - 0x6e, 0x9f, 0x67, 0xdc, 0x3d, 0x68, 0xbe, 0x88, 0xed, 0x39, 0x89, 0x34, 0x69, 0xa0, 0x0c, 0x5b, - 0x66, 0x6e, 0x63, 0x1f, 0x60, 0xe5, 0xe7, 0x51, 0x59, 0x44, 0x77, 0x3c, 0xfa, 0xaf, 0x92, 0x10, - 0x43, 0xf0, 0x4d, 0xd7, 0xd4, 0x3f, 0xd4, 0xe9, 0xce, 0x7b, 0x97, 0xff, 0xdf, 0x7b, 0xc7, 0x0f, - 0xa1, 0x46, 0xc3, 0x90, 0x85, 0xe2, 0x9e, 0xda, 0xe3, 0x9b, 0xc5, 0xc4, 0x69, 0x18, 0x9a, 0x09, - 0x42, 0x1f, 0x82, 0x6a, 0x30, 0xe7, 0x6b, 0xea, 0x51, 0x4e, 0x8f, 0x2a, 0xa7, 0x7f, 0x06, 0xca, - 0x34, 0x0c, 0x71, 0x94, 0x71, 0xc7, 0xc1, 0xce, 0x58, 0xdb, 0xc3, 0x3d, 0x61, 0x84, 0x46, 0x59, - 0x81, 0x9f, 0x65, 0xb8, 0x69, 0x30, 0xe7, 0xd1, 0xc6, 0xb7, 0x27, 0xcc, 0xe7, 0xd4, 0xe7, 0xdf, - 0x59, 0xde, 0x8a, 0xe2, 0x57, 0x00, 0xe7, 0xd4, 0x22, 0x8f, 0x03, 0x62, 0x71, 0x2a, 0xc8, 0xda, - 0xe3, 0x5b, 0x45, 0x32, 0x83, 0x39, 0xb3, 0x1c, 0x34, 0xab, 0x98, 0x3b, 0x29, 0xb8, 0x80, 0xee, - 0x72, 0xe5, 0x79, 0x31, 0x71, 0xda, 0x78, 0x7a, 0xa5, 0xfa, 0x1e, 0x96, 0x93, 0xab, 0xc8, 0x59, - 0xc5, 0x2c, 0x26, 0xe3, 0x37, 0xa0, 0x6e, 0x5d, 0x51, 0x10, 0x53, 0xa4, 0xfa, 0x7d, 0x70, 0x94, - 0x30, 0x81, 0xce, 0x2a, 0x66, 0x29, 0xfd, 0x41, 0x03, 0x6a, 0xeb, 0xf8, 0xb0, 0xfa, 0x06, 0x3a, - 0xa9, 0x06, 0x0f, 0x69, 0x14, 0x59, 0x0e, 0x2d, 0x6d, 0xb7, 0x9d, 0x09, 0x96, 0xaf, 0x4e, 0xf0, - 0x97, 0xd0, 0xb0, 0x13, 0xe1, 0x8e, 0xb4, 0x53, 0x94, 0xd7, 0xcc, 0x72, 0xd2, 0xd1, 0xdb, 0xaa, - 0x18, 0xcf, 0x70, 0xac, 0x62, 0x5a, 0x5b, 0x7c, 0xbf, 0xc1, 0x5b, 0xd3, 0x6d, 0xc0, 0xb2, 0xbe, - 0xd7, 0x5d, 0x84, 0x88, 0x37, 0x54, 0xd4, 0xfc, 0x9a, 0xab, 0xdc, 0xf9, 0x45, 0x82, 0x66, 0xf6, - 0x7c, 0xb1, 0x03, 0xf0, 0xd8, 0xa7, 0x2f, 0x03, 0x6a, 0x73, 0x4a, 0xd4, 0x0a, 0xde, 0x80, 0x96, - 0xc1, 0x9c, 0xe9, 0x4b, 0x37, 0xe2, 0x91, 0x2a, 0x61, 0x17, 0xda, 0x06, 0x73, 0x16, 0x8c, 0x9f, - 0xb0, 0x95, 0x4f, 0x54, 0x19, 0x11, 0x3a, 0x09, 0xeb, 0x84, 0xf9, 0x4b, 0xcf, 0xb5, 0xb9, 0xaa, - 0xc4, 0x39, 0x27, 0x2c, 0x7c, 0xea, 0x12, 0x42, 0x7d, 0xb5, 0x1a, 0x43, 0xe6, 0xfe, 0xda, 0xf2, - 0x5c, 0x72, 0x96, 0xdc, 0xad, 0x5a, 0x43, 0x15, 0xda, 0xd3, 0x78, 0x4e, 0x4e, 0x97, 0xcb, 0x88, - 0x72, 0xf5, 0x1f, 0x65, 0xfc, 0xbb, 0x0c, 0xad, 0x49, 0xd6, 0x31, 0xde, 0x83, 0x7a, 0xb2, 0x39, - 0x71, 0xdf, 0x70, 0x6c, 0xd7, 0x5d, 0x0f, 0x8b, 0xe1, 0xd3, 0x67, 0xb8, 0x80, 0x56, 0xbe, 0x16, - 0x71, 0x50, 0xd2, 0xa1, 0xb0, 0x31, 0x7b, 0xaf, 0x53, 0x0a, 0x17, 0xd0, 0xcc, 0x36, 0x17, 0xde, - 0xde, 0xd3, 0xce, 0xee, 0x8e, 0xec, 0xdd, 0x3a, 0x04, 0x10, 0x4b, 0x6f, 0x28, 0x7d, 0x2c, 0xe1, - 0x7d, 0xa1, 0x69, 0xb2, 0x7c, 0xca, 0xfd, 0x15, 0xf7, 0xd2, 0xbe, 0x23, 0x3e, 0x18, 0xff, 0x71, - 0xd1, 0x97, 0x5e, 0x5d, 0xf4, 0xa5, 0xbf, 0x2f, 0xfa, 0xd2, 0x6f, 0x97, 0xfd, 0xca, 0xab, 0xcb, - 0x7e, 0xe5, 0xaf, 0xcb, 0x7e, 0xe5, 0x7b, 0xed, 0xd0, 0xef, 0x90, 0xa7, 0x75, 0xf1, 0xef, 0xd3, - 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, 0x81, 0xbd, 0x26, 0xaa, 0x08, 0x00, 0x00, -} - -func (m *Log) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *LogFullSyncResponse) GetHead() string { + if x != nil { + return x.Head } - return dAtA[:n], nil -} - -func (m *Log) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return "" } -func (m *RawRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *LogFullSyncResponse) GetRecords() []*RawRecordWithId { + if x != nil { + return x.Records } - return dAtA[:n], nil + return nil } -func (m *RawRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var File_consensus_consensusproto_protos_consensus_proto protoreflect.FileDescriptor + +var file_consensus_consensusproto_protos_consensus_proto_rawDesc = string([]byte{ + 0x0a, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x50, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x09, 0x52, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x10, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x6f, + 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x11, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0x3b, 0x0a, 0x0f, 0x52, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, + 0x74, 0x68, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6e, + 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x76, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x76, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x04, + 0x0a, 0x02, 0x4f, 0x6b, 0x22, 0x5e, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x77, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x22, 0x5b, 0x0a, 0x10, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x41, 0x64, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x31, + 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x22, 0x4d, 0x0a, 0x0f, 0x4c, 0x6f, 0x67, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x6e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x6e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x73, + 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x57, 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x72, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x28, + 0x0a, 0x10, 0x4c, 0x6f, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x03, 0x45, 0x72, 0x72, 0x12, + 0x2e, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, + 0x82, 0x02, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, + 0x48, 0x65, 0x61, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x65, + 0x61, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x66, 0x75, 0x6c, 0x6c, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x66, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x10, 0x66, 0x75, 0x6c, 0x6c, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x10, 0x66, 0x75, 0x6c, 0x6c, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x79, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x3d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x5e, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x65, 0x61, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, + 0x63, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x77, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x73, 0x22, 0x64, 0x0a, 0x13, 0x4c, 0x6f, 0x67, 0x46, 0x75, 0x6c, 0x6c, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x65, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, + 0x39, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, + 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2a, 0x83, 0x01, 0x0a, 0x08, 0x45, + 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x45, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x74, + 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x46, + 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x05, 0x12, 0x10, + 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x10, 0xf4, 0x03, + 0x32, 0xab, 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x12, 0x3b, + 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x41, 0x64, 0x64, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x41, 0x64, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4f, 0x6b, 0x12, 0x4e, 0x0a, 0x09, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x41, 0x64, 0x64, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x77, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x08, 0x4c, + 0x6f, 0x67, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x57, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x09, 0x4c, + 0x6f, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4f, 0x6b, 0x42, 0x1a, + 0x5a, 0x18, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +}) + +var ( + file_consensus_consensusproto_protos_consensus_proto_rawDescOnce sync.Once + file_consensus_consensusproto_protos_consensus_proto_rawDescData []byte +) -func (m *RawRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AcceptorTimestamp != 0 { - i = encodeVarintConsensus(dAtA, i, uint64(m.AcceptorTimestamp)) - i-- - dAtA[i] = 0x28 +func file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP() []byte { + file_consensus_consensusproto_protos_consensus_proto_rawDescOnce.Do(func() { + file_consensus_consensusproto_protos_consensus_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_consensus_consensusproto_protos_consensus_proto_rawDesc), len(file_consensus_consensusproto_protos_consensus_proto_rawDesc))) + }) + return file_consensus_consensusproto_protos_consensus_proto_rawDescData +} + +var file_consensus_consensusproto_protos_consensus_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_consensus_consensusproto_protos_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_consensus_consensusproto_protos_consensus_proto_goTypes = []any{ + (ErrCodes)(0), // 0: consensusProto.ErrCodes + (*Log)(nil), // 1: consensusProto.Log + (*RawRecord)(nil), // 2: consensusProto.RawRecord + (*RawRecordWithId)(nil), // 3: consensusProto.RawRecordWithId + (*Record)(nil), // 4: consensusProto.Record + (*Ok)(nil), // 5: consensusProto.Ok + (*LogAddRequest)(nil), // 6: consensusProto.LogAddRequest + (*RecordAddRequest)(nil), // 7: consensusProto.RecordAddRequest + (*LogWatchRequest)(nil), // 8: consensusProto.LogWatchRequest + (*LogWatchEvent)(nil), // 9: consensusProto.LogWatchEvent + (*LogDeleteRequest)(nil), // 10: consensusProto.LogDeleteRequest + (*Err)(nil), // 11: consensusProto.Err + (*LogSyncContentValue)(nil), // 12: consensusProto.LogSyncContentValue + (*LogSyncMessage)(nil), // 13: consensusProto.LogSyncMessage + (*LogHeadUpdate)(nil), // 14: consensusProto.LogHeadUpdate + (*LogFullSyncRequest)(nil), // 15: consensusProto.LogFullSyncRequest + (*LogFullSyncResponse)(nil), // 16: consensusProto.LogFullSyncResponse +} +var file_consensus_consensusproto_protos_consensus_proto_depIdxs = []int32{ + 3, // 0: consensusProto.Log.records:type_name -> consensusProto.RawRecordWithId + 3, // 1: consensusProto.LogAddRequest.record:type_name -> consensusProto.RawRecordWithId + 2, // 2: consensusProto.RecordAddRequest.record:type_name -> consensusProto.RawRecord + 3, // 3: consensusProto.LogWatchEvent.records:type_name -> consensusProto.RawRecordWithId + 11, // 4: consensusProto.LogWatchEvent.error:type_name -> consensusProto.Err + 0, // 5: consensusProto.Err.error:type_name -> consensusProto.ErrCodes + 14, // 6: consensusProto.LogSyncContentValue.headUpdate:type_name -> consensusProto.LogHeadUpdate + 15, // 7: consensusProto.LogSyncContentValue.fullSyncRequest:type_name -> consensusProto.LogFullSyncRequest + 16, // 8: consensusProto.LogSyncContentValue.fullSyncResponse:type_name -> consensusProto.LogFullSyncResponse + 12, // 9: consensusProto.LogSyncMessage.content:type_name -> consensusProto.LogSyncContentValue + 3, // 10: consensusProto.LogHeadUpdate.records:type_name -> consensusProto.RawRecordWithId + 3, // 11: consensusProto.LogFullSyncRequest.records:type_name -> consensusProto.RawRecordWithId + 3, // 12: consensusProto.LogFullSyncResponse.records:type_name -> consensusProto.RawRecordWithId + 6, // 13: consensusProto.Consensus.LogAdd:input_type -> consensusProto.LogAddRequest + 7, // 14: consensusProto.Consensus.RecordAdd:input_type -> consensusProto.RecordAddRequest + 8, // 15: consensusProto.Consensus.LogWatch:input_type -> consensusProto.LogWatchRequest + 10, // 16: consensusProto.Consensus.LogDelete:input_type -> consensusProto.LogDeleteRequest + 5, // 17: consensusProto.Consensus.LogAdd:output_type -> consensusProto.Ok + 3, // 18: consensusProto.Consensus.RecordAdd:output_type -> consensusProto.RawRecordWithId + 9, // 19: consensusProto.Consensus.LogWatch:output_type -> consensusProto.LogWatchEvent + 5, // 20: consensusProto.Consensus.LogDelete:output_type -> consensusProto.Ok + 17, // [17:21] is the sub-list for method output_type + 13, // [13:17] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_consensus_consensusproto_protos_consensus_proto_init() } +func file_consensus_consensusproto_protos_consensus_proto_init() { + if File_consensus_consensusproto_protos_consensus_proto != nil { + return + } + file_consensus_consensusproto_protos_consensus_proto_msgTypes[11].OneofWrappers = []any{ + (*LogSyncContentValue_HeadUpdate)(nil), + (*LogSyncContentValue_FullSyncRequest)(nil), + (*LogSyncContentValue_FullSyncResponse)(nil), } - if len(m.AcceptorSignature) > 0 { - i -= len(m.AcceptorSignature) - copy(dAtA[i:], m.AcceptorSignature) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.AcceptorSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.AcceptorIdentity) > 0 { - i -= len(m.AcceptorIdentity) - copy(dAtA[i:], m.AcceptorIdentity) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.AcceptorIdentity))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RawRecordWithId) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RawRecordWithId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RawRecordWithId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Record) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Record) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != 0 { - i = encodeVarintConsensus(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x20 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x12 - } - if len(m.PrevId) > 0 { - i -= len(m.PrevId) - copy(dAtA[i:], m.PrevId) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.PrevId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Ok) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Ok) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ok) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *LogAddRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogAddRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Record != nil { - { - size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.LogId) > 0 { - i -= len(m.LogId) - copy(dAtA[i:], m.LogId) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RecordAddRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RecordAddRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RecordAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Record != nil { - { - size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.LogId) > 0 { - i -= len(m.LogId) - copy(dAtA[i:], m.LogId) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogWatchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogWatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogWatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UnwatchIds) > 0 { - for iNdEx := len(m.UnwatchIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UnwatchIds[iNdEx]) - copy(dAtA[i:], m.UnwatchIds[iNdEx]) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.UnwatchIds[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.WatchIds) > 0 { - for iNdEx := len(m.WatchIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.WatchIds[iNdEx]) - copy(dAtA[i:], m.WatchIds[iNdEx]) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.WatchIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *LogWatchEvent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogWatchEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogWatchEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.LogId) > 0 { - i -= len(m.LogId) - copy(dAtA[i:], m.LogId) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LogId) > 0 { - i -= len(m.LogId) - copy(dAtA[i:], m.LogId) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.LogId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Err) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Err) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Err) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != 0 { - i = encodeVarintConsensus(dAtA, i, uint64(m.Error)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LogSyncContentValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogSyncContentValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *LogSyncContentValue_HeadUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSyncContentValue_HeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.HeadUpdate != nil { - { - size, err := m.HeadUpdate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *LogSyncContentValue_FullSyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSyncContentValue_FullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FullSyncRequest != nil { - { - size, err := m.FullSyncRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *LogSyncContentValue_FullSyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSyncContentValue_FullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FullSyncResponse != nil { - { - size, err := m.FullSyncResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *LogSyncMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogSyncMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Content != nil { - { - size, err := m.Content.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogHeadUpdate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogHeadUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Head) > 0 { - i -= len(m.Head) - copy(dAtA[i:], m.Head) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Head))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogFullSyncRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogFullSyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Head) > 0 { - i -= len(m.Head) - copy(dAtA[i:], m.Head) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Head))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogFullSyncResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogFullSyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Head) > 0 { - i -= len(m.Head) - copy(dAtA[i:], m.Head) - i = encodeVarintConsensus(dAtA, i, uint64(len(m.Head))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { - offset -= sovConsensus(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Log) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - } - return n -} - -func (m *RawRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.AcceptorIdentity) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.AcceptorSignature) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if m.AcceptorTimestamp != 0 { - n += 1 + sovConsensus(uint64(m.AcceptorTimestamp)) - } - return n -} - -func (m *RawRecordWithId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *Record) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PrevId) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovConsensus(uint64(m.Timestamp)) - } - return n -} - -func (m *Ok) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *LogAddRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LogId) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Record != nil { - l = m.Record.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *RecordAddRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LogId) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Record != nil { - l = m.Record.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *LogWatchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.WatchIds) > 0 { - for _, s := range m.WatchIds { - l = len(s) - n += 1 + l + sovConsensus(uint64(l)) - } - } - if len(m.UnwatchIds) > 0 { - for _, s := range m.UnwatchIds { - l = len(s) - n += 1 + l + sovConsensus(uint64(l)) - } - } - return n -} - -func (m *LogWatchEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LogId) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - } - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *LogDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LogId) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *Err) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != 0 { - n += 1 + sovConsensus(uint64(m.Error)) - } - return n -} - -func (m *LogSyncContentValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *LogSyncContentValue_HeadUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HeadUpdate != nil { - l = m.HeadUpdate.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} -func (m *LogSyncContentValue_FullSyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FullSyncRequest != nil { - l = m.FullSyncRequest.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} -func (m *LogSyncContentValue_FullSyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FullSyncResponse != nil { - l = m.FullSyncResponse.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} -func (m *LogSyncMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Content != nil { - l = m.Content.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *LogHeadUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Head) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - } - return n -} - -func (m *LogFullSyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Head) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - } - return n -} - -func (m *LogFullSyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Head) - if l > 0 { - n += 1 + l + sovConsensus(uint64(l)) - } - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - } - return n -} - -func sovConsensus(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozConsensus(x uint64) (n int) { - return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Log) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Log: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &RawRecordWithId{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RawRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptorIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AcceptorIdentity = append(m.AcceptorIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.AcceptorIdentity == nil { - m.AcceptorIdentity = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptorSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AcceptorSignature = append(m.AcceptorSignature[:0], dAtA[iNdEx:postIndex]...) - if m.AcceptorSignature == nil { - m.AcceptorSignature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptorTimestamp", wireType) - } - m.AcceptorTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AcceptorTimestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RawRecordWithId) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawRecordWithId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawRecordWithId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Record) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Record: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrevId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Ok) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Ok: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogAddRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogAddRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Record == nil { - m.Record = &RawRecordWithId{} - } - if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RecordAddRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RecordAddRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RecordAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Record == nil { - m.Record = &RawRecord{} - } - if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogWatchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogWatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogWatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WatchIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WatchIds = append(m.WatchIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnwatchIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnwatchIds = append(m.UnwatchIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogWatchEvent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogWatchEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogWatchEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &RawRecordWithId{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &Err{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Err) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Err: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Err: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - m.Error = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Error |= ErrCodes(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogSyncContentValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogSyncContentValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogSyncContentValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadUpdate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &LogHeadUpdate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &LogSyncContentValue_HeadUpdate{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullSyncRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &LogFullSyncRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &LogSyncContentValue_FullSyncRequest{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullSyncResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &LogFullSyncResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &LogSyncContentValue_FullSyncResponse{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_consensus_consensusproto_protos_consensus_proto_rawDesc), len(file_consensus_consensusproto_protos_consensus_proto_rawDesc)), + NumEnums: 1, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_consensus_consensusproto_protos_consensus_proto_goTypes, + DependencyIndexes: file_consensus_consensusproto_protos_consensus_proto_depIdxs, + EnumInfos: file_consensus_consensusproto_protos_consensus_proto_enumTypes, + MessageInfos: file_consensus_consensusproto_protos_consensus_proto_msgTypes, + }.Build() + File_consensus_consensusproto_protos_consensus_proto = out.File + file_consensus_consensusproto_protos_consensus_proto_goTypes = nil + file_consensus_consensusproto_protos_consensus_proto_depIdxs = nil } -func (m *LogSyncMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogSyncMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Content == nil { - m.Content = &LogSyncContentValue{} - } - if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogHeadUpdate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogHeadUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogHeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Head = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &RawRecordWithId{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogFullSyncRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogFullSyncRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogFullSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Head = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &RawRecordWithId{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogFullSyncResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogFullSyncResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogFullSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Head = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &RawRecordWithId{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipConsensus(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConsensus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConsensus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConsensus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthConsensus - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupConsensus - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthConsensus - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthConsensus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConsensus = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupConsensus = fmt.Errorf("proto: unexpected end of group") -) diff --git a/consensus/consensusproto/consensus_drpc.pb.go b/consensus/consensusproto/consensus_drpc.pb.go index 6619e724e..dca38edfd 100644 --- a/consensus/consensusproto/consensus_drpc.pb.go +++ b/consensus/consensusproto/consensus_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: consensus/consensusproto/protos/consensus.proto package consensusproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_consensus_consensusproto_protos_consensus_proto struct{} func (drpcEncoding_File_consensus_consensusproto_protos_consensus_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_consensus_consensusproto_protos_consensus_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_consensus_consensusproto_protos_consensus_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_consensus_consensusproto_protos_consensus_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCConsensusClient interface { diff --git a/consensus/consensusproto/consensus_vtproto.pb.go b/consensus/consensusproto/consensus_vtproto.pb.go new file mode 100644 index 000000000..10e1fcb93 --- /dev/null +++ b/consensus/consensusproto/consensus_vtproto.pb.go @@ -0,0 +1,3238 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: consensus/consensusproto/protos/consensus.proto + +package consensusproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Log) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Log) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Log) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RawRecord) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawRecord) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RawRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AcceptorTimestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AcceptorTimestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.AcceptorSignature) > 0 { + i -= len(m.AcceptorSignature) + copy(dAtA[i:], m.AcceptorSignature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AcceptorSignature))) + i-- + dAtA[i] = 0x22 + } + if len(m.AcceptorIdentity) > 0 { + i -= len(m.AcceptorIdentity) + copy(dAtA[i:], m.AcceptorIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AcceptorIdentity))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RawRecordWithId) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawRecordWithId) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RawRecordWithId) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Record) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Record) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Record) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x20 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.PrevId) > 0 { + i -= len(m.PrevId) + copy(dAtA[i:], m.PrevId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PrevId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Ok) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Ok) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Ok) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *LogAddRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogAddRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogAddRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Record != nil { + size, err := m.Record.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.LogId) > 0 { + i -= len(m.LogId) + copy(dAtA[i:], m.LogId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LogId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RecordAddRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RecordAddRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RecordAddRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Record != nil { + size, err := m.Record.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.LogId) > 0 { + i -= len(m.LogId) + copy(dAtA[i:], m.LogId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LogId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LogWatchRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogWatchRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogWatchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.UnwatchIds) > 0 { + for iNdEx := len(m.UnwatchIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UnwatchIds[iNdEx]) + copy(dAtA[i:], m.UnwatchIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UnwatchIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.WatchIds) > 0 { + for iNdEx := len(m.WatchIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WatchIds[iNdEx]) + copy(dAtA[i:], m.WatchIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.WatchIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *LogWatchEvent) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogWatchEvent) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogWatchEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.LogId) > 0 { + i -= len(m.LogId) + copy(dAtA[i:], m.LogId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LogId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LogDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.LogId) > 0 { + i -= len(m.LogId) + copy(dAtA[i:], m.LogId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LogId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Err) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Err) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Err) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Error)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *LogSyncContentValue) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogSyncContentValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogSyncContentValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Value.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *LogSyncContentValue_HeadUpdate) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogSyncContentValue_HeadUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.HeadUpdate != nil { + size, err := m.HeadUpdate.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *LogSyncContentValue_FullSyncRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogSyncContentValue_FullSyncRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FullSyncRequest != nil { + size, err := m.FullSyncRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *LogSyncContentValue_FullSyncResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogSyncContentValue_FullSyncResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FullSyncResponse != nil { + size, err := m.FullSyncResponse.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *LogSyncMessage) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogSyncMessage) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogSyncMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Content != nil { + size, err := m.Content.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LogHeadUpdate) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogHeadUpdate) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogHeadUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Head) > 0 { + i -= len(m.Head) + copy(dAtA[i:], m.Head) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Head))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LogFullSyncRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogFullSyncRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogFullSyncRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Head) > 0 { + i -= len(m.Head) + copy(dAtA[i:], m.Head) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Head))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LogFullSyncResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogFullSyncResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LogFullSyncResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Head) > 0 { + i -= len(m.Head) + copy(dAtA[i:], m.Head) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Head))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Log) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *RawRecord) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AcceptorIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AcceptorSignature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.AcceptorTimestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AcceptorTimestamp)) + } + n += len(m.unknownFields) + return n +} + +func (m *RawRecordWithId) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Record) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PrevId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + n += len(m.unknownFields) + return n +} + +func (m *Ok) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *LogAddRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LogId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Record != nil { + l = m.Record.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RecordAddRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LogId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Record != nil { + l = m.Record.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *LogWatchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.WatchIds) > 0 { + for _, s := range m.WatchIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.UnwatchIds) > 0 { + for _, s := range m.UnwatchIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *LogWatchEvent) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LogId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *LogDeleteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LogId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Err) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Error)) + } + n += len(m.unknownFields) + return n +} + +func (m *LogSyncContentValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *LogSyncContentValue_HeadUpdate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HeadUpdate != nil { + l = m.HeadUpdate.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *LogSyncContentValue_FullSyncRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FullSyncRequest != nil { + l = m.FullSyncRequest.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *LogSyncContentValue_FullSyncResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FullSyncResponse != nil { + l = m.FullSyncResponse.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 2 + } + return n +} +func (m *LogSyncMessage) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Content != nil { + l = m.Content.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *LogHeadUpdate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Head) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *LogFullSyncRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Head) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *LogFullSyncResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Head) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Log) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Log: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &RawRecordWithId{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RawRecord) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcceptorIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AcceptorIdentity = append(m.AcceptorIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.AcceptorIdentity == nil { + m.AcceptorIdentity = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcceptorSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AcceptorSignature = append(m.AcceptorSignature[:0], dAtA[iNdEx:postIndex]...) + if m.AcceptorSignature == nil { + m.AcceptorSignature = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AcceptorTimestamp", wireType) + } + m.AcceptorTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AcceptorTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RawRecordWithId) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawRecordWithId: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawRecordWithId: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Record) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Record: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrevId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PrevId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Ok) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ok: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogAddRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogAddRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Record == nil { + m.Record = &RawRecordWithId{} + } + if err := m.Record.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RecordAddRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RecordAddRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RecordAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Record == nil { + m.Record = &RawRecord{} + } + if err := m.Record.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogWatchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogWatchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogWatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WatchIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WatchIds = append(m.WatchIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnwatchIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnwatchIds = append(m.UnwatchIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogWatchEvent) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogWatchEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogWatchEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &RawRecordWithId{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Err{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogDeleteRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogDeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Err) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Err: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Err: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + m.Error = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Error |= ErrCodes(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogSyncContentValue) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogSyncContentValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogSyncContentValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HeadUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*LogSyncContentValue_HeadUpdate); ok { + if err := oneof.HeadUpdate.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &LogHeadUpdate{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &LogSyncContentValue_HeadUpdate{HeadUpdate: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullSyncRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*LogSyncContentValue_FullSyncRequest); ok { + if err := oneof.FullSyncRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &LogFullSyncRequest{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &LogSyncContentValue_FullSyncRequest{FullSyncRequest: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullSyncResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*LogSyncContentValue_FullSyncResponse); ok { + if err := oneof.FullSyncResponse.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &LogFullSyncResponse{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &LogSyncContentValue_FullSyncResponse{FullSyncResponse: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogSyncMessage) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogSyncMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Content == nil { + m.Content = &LogSyncContentValue{} + } + if err := m.Content.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogHeadUpdate) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogHeadUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogHeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Head = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &RawRecordWithId{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogFullSyncRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogFullSyncRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogFullSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Head = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &RawRecordWithId{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogFullSyncResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogFullSyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogFullSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Head", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Head = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &RawRecordWithId{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index 82dfd4b21..4eba284a3 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -81,7 +81,7 @@ func (c *coordinatorClient) Name() (name string) { } func (c *coordinatorClient) SpaceDelete(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (err error) { - confMarshalled, err := conf.Marshal() + confMarshalled, err := conf.MarshalVT() if err != nil { return err } @@ -104,7 +104,7 @@ func (c *coordinatorClient) SpaceDelete(ctx context.Context, spaceId string, con } func (c *coordinatorClient) AccountDelete(ctx context.Context, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (timestamp int64, err error) { - confMarshalled, err := conf.Marshal() + confMarshalled, err := conf.MarshalVT() if err != nil { return } @@ -262,7 +262,7 @@ func (c *coordinatorClient) IdentityRepoGet(ctx context.Context, identities, kin } func (c *coordinatorClient) AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (res *consensusproto.RawRecordWithId, err error) { - recordData, err := rec.Marshal() + recordData, err := rec.MarshalVT() if err != nil { return } @@ -295,7 +295,7 @@ func (c *coordinatorClient) AclGetRecords(ctx context.Context, spaceId, aclHead res = make([]*consensusproto.RawRecordWithId, len(resp.Records)) for i, rec := range resp.Records { res[i] = &consensusproto.RawRecordWithId{} - if err = res[i].Unmarshal(rec); err != nil { + if err = res[i].UnmarshalVT(rec); err != nil { return err } } diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index 921667212..2391e119e 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_coordinatorclient/mock_coordinatorclient.go github.com/anyproto/any-sync/coordinator/coordinatorclient CoordinatorClient // + // Package mock_coordinatorclient is a generated GoMock package. package mock_coordinatorclient @@ -24,6 +25,7 @@ import ( type MockCoordinatorClient struct { ctrl *gomock.Controller recorder *MockCoordinatorClientMockRecorder + isgomock struct{} } // MockCoordinatorClientMockRecorder is the mock recorder for MockCoordinatorClient. @@ -44,164 +46,164 @@ func (m *MockCoordinatorClient) EXPECT() *MockCoordinatorClientMockRecorder { } // AccountDelete mocks base method. -func (m *MockCoordinatorClient) AccountDelete(arg0 context.Context, arg1 *coordinatorproto.DeletionConfirmPayloadWithSignature) (int64, error) { +func (m *MockCoordinatorClient) AccountDelete(ctx context.Context, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (int64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AccountDelete", arg0, arg1) + ret := m.ctrl.Call(m, "AccountDelete", ctx, conf) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(error) return ret0, ret1 } // AccountDelete indicates an expected call of AccountDelete. -func (mr *MockCoordinatorClientMockRecorder) AccountDelete(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) AccountDelete(ctx, conf any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDelete", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountDelete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDelete", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountDelete), ctx, conf) } // AccountLimitsSet mocks base method. -func (m *MockCoordinatorClient) AccountLimitsSet(arg0 context.Context, arg1 *coordinatorproto.AccountLimitsSetRequest) error { +func (m *MockCoordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinatorproto.AccountLimitsSetRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AccountLimitsSet", arg0, arg1) + ret := m.ctrl.Call(m, "AccountLimitsSet", ctx, req) ret0, _ := ret[0].(error) return ret0 } // AccountLimitsSet indicates an expected call of AccountLimitsSet. -func (mr *MockCoordinatorClientMockRecorder) AccountLimitsSet(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) AccountLimitsSet(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountLimitsSet", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountLimitsSet), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountLimitsSet", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountLimitsSet), ctx, req) } // AccountRevertDeletion mocks base method. -func (m *MockCoordinatorClient) AccountRevertDeletion(arg0 context.Context) error { +func (m *MockCoordinatorClient) AccountRevertDeletion(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AccountRevertDeletion", arg0) + ret := m.ctrl.Call(m, "AccountRevertDeletion", ctx) ret0, _ := ret[0].(error) return ret0 } // AccountRevertDeletion indicates an expected call of AccountRevertDeletion. -func (mr *MockCoordinatorClientMockRecorder) AccountRevertDeletion(arg0 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) AccountRevertDeletion(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountRevertDeletion", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountRevertDeletion), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountRevertDeletion", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountRevertDeletion), ctx) } // AclAddRecord mocks base method. -func (m *MockCoordinatorClient) AclAddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { +func (m *MockCoordinatorClient) AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclAddRecord", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AclAddRecord", ctx, spaceId, rec) ret0, _ := ret[0].(*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AclAddRecord indicates an expected call of AclAddRecord. -func (mr *MockCoordinatorClientMockRecorder) AclAddRecord(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) AclAddRecord(ctx, spaceId, rec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockCoordinatorClient)(nil).AclAddRecord), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockCoordinatorClient)(nil).AclAddRecord), ctx, spaceId, rec) } // AclEventLog mocks base method. -func (m *MockCoordinatorClient) AclEventLog(arg0 context.Context, arg1, arg2 string, arg3 int) ([]*coordinatorproto.AclEventLogRecord, error) { +func (m *MockCoordinatorClient) AclEventLog(ctx context.Context, accountId, lastRecordId string, limit int) ([]*coordinatorproto.AclEventLogRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclEventLog", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AclEventLog", ctx, accountId, lastRecordId, limit) ret0, _ := ret[0].([]*coordinatorproto.AclEventLogRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // AclEventLog indicates an expected call of AclEventLog. -func (mr *MockCoordinatorClientMockRecorder) AclEventLog(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) AclEventLog(ctx, accountId, lastRecordId, limit any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclEventLog", reflect.TypeOf((*MockCoordinatorClient)(nil).AclEventLog), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclEventLog", reflect.TypeOf((*MockCoordinatorClient)(nil).AclEventLog), ctx, accountId, lastRecordId, limit) } // AclGetRecords mocks base method. -func (m *MockCoordinatorClient) AclGetRecords(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockCoordinatorClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclGetRecords", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AclGetRecords", ctx, spaceId, aclHead) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AclGetRecords indicates an expected call of AclGetRecords. -func (mr *MockCoordinatorClientMockRecorder) AclGetRecords(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) AclGetRecords(ctx, spaceId, aclHead any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockCoordinatorClient)(nil).AclGetRecords), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockCoordinatorClient)(nil).AclGetRecords), ctx, spaceId, aclHead) } // DeletionLog mocks base method. -func (m *MockCoordinatorClient) DeletionLog(arg0 context.Context, arg1 string, arg2 int) ([]*coordinatorproto.DeletionLogRecord, error) { +func (m *MockCoordinatorClient) DeletionLog(ctx context.Context, lastRecordId string, limit int) ([]*coordinatorproto.DeletionLogRecord, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeletionLog", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeletionLog", ctx, lastRecordId, limit) ret0, _ := ret[0].([]*coordinatorproto.DeletionLogRecord) ret1, _ := ret[1].(error) return ret0, ret1 } // DeletionLog indicates an expected call of DeletionLog. -func (mr *MockCoordinatorClientMockRecorder) DeletionLog(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) DeletionLog(ctx, lastRecordId, limit any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletionLog", reflect.TypeOf((*MockCoordinatorClient)(nil).DeletionLog), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletionLog", reflect.TypeOf((*MockCoordinatorClient)(nil).DeletionLog), ctx, lastRecordId, limit) } // IdentityRepoGet mocks base method. -func (m *MockCoordinatorClient) IdentityRepoGet(arg0 context.Context, arg1, arg2 []string) ([]*identityrepoproto.DataWithIdentity, error) { +func (m *MockCoordinatorClient) IdentityRepoGet(ctx context.Context, identities, kinds []string) ([]*identityrepoproto.DataWithIdentity, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IdentityRepoGet", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "IdentityRepoGet", ctx, identities, kinds) ret0, _ := ret[0].([]*identityrepoproto.DataWithIdentity) ret1, _ := ret[1].(error) return ret0, ret1 } // IdentityRepoGet indicates an expected call of IdentityRepoGet. -func (mr *MockCoordinatorClientMockRecorder) IdentityRepoGet(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) IdentityRepoGet(ctx, identities, kinds any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityRepoGet", reflect.TypeOf((*MockCoordinatorClient)(nil).IdentityRepoGet), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityRepoGet", reflect.TypeOf((*MockCoordinatorClient)(nil).IdentityRepoGet), ctx, identities, kinds) } // IdentityRepoPut mocks base method. -func (m *MockCoordinatorClient) IdentityRepoPut(arg0 context.Context, arg1 string, arg2 []*identityrepoproto.Data) error { +func (m *MockCoordinatorClient) IdentityRepoPut(ctx context.Context, identity string, data []*identityrepoproto.Data) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IdentityRepoPut", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "IdentityRepoPut", ctx, identity, data) ret0, _ := ret[0].(error) return ret0 } // IdentityRepoPut indicates an expected call of IdentityRepoPut. -func (mr *MockCoordinatorClientMockRecorder) IdentityRepoPut(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) IdentityRepoPut(ctx, identity, data any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityRepoPut", reflect.TypeOf((*MockCoordinatorClient)(nil).IdentityRepoPut), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityRepoPut", reflect.TypeOf((*MockCoordinatorClient)(nil).IdentityRepoPut), ctx, identity, data) } // Init mocks base method. -func (m *MockCoordinatorClient) Init(arg0 *app.App) error { +func (m *MockCoordinatorClient) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockCoordinatorClientMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockCoordinatorClient)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockCoordinatorClient)(nil).Init), a) } // IsNetworkNeedsUpdate mocks base method. -func (m *MockCoordinatorClient) IsNetworkNeedsUpdate(arg0 context.Context) (bool, error) { +func (m *MockCoordinatorClient) IsNetworkNeedsUpdate(ctx context.Context) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsNetworkNeedsUpdate", arg0) + ret := m.ctrl.Call(m, "IsNetworkNeedsUpdate", ctx) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // IsNetworkNeedsUpdate indicates an expected call of IsNetworkNeedsUpdate. -func (mr *MockCoordinatorClientMockRecorder) IsNetworkNeedsUpdate(arg0 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) IsNetworkNeedsUpdate(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNetworkNeedsUpdate", reflect.TypeOf((*MockCoordinatorClient)(nil).IsNetworkNeedsUpdate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNetworkNeedsUpdate", reflect.TypeOf((*MockCoordinatorClient)(nil).IsNetworkNeedsUpdate), ctx) } // Name mocks base method. @@ -219,96 +221,96 @@ func (mr *MockCoordinatorClientMockRecorder) Name() *gomock.Call { } // NetworkConfiguration mocks base method. -func (m *MockCoordinatorClient) NetworkConfiguration(arg0 context.Context, arg1 string) (*coordinatorproto.NetworkConfigurationResponse, error) { +func (m *MockCoordinatorClient) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetworkConfiguration", arg0, arg1) + ret := m.ctrl.Call(m, "NetworkConfiguration", ctx, currentId) ret0, _ := ret[0].(*coordinatorproto.NetworkConfigurationResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // NetworkConfiguration indicates an expected call of NetworkConfiguration. -func (mr *MockCoordinatorClientMockRecorder) NetworkConfiguration(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) NetworkConfiguration(ctx, currentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkConfiguration", reflect.TypeOf((*MockCoordinatorClient)(nil).NetworkConfiguration), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkConfiguration", reflect.TypeOf((*MockCoordinatorClient)(nil).NetworkConfiguration), ctx, currentId) } // SpaceDelete mocks base method. -func (m *MockCoordinatorClient) SpaceDelete(arg0 context.Context, arg1 string, arg2 *coordinatorproto.DeletionConfirmPayloadWithSignature) error { +func (m *MockCoordinatorClient) SpaceDelete(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpaceDelete", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SpaceDelete", ctx, spaceId, conf) ret0, _ := ret[0].(error) return ret0 } // SpaceDelete indicates an expected call of SpaceDelete. -func (mr *MockCoordinatorClientMockRecorder) SpaceDelete(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) SpaceDelete(ctx, spaceId, conf any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceDelete", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceDelete), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceDelete", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceDelete), ctx, spaceId, conf) } // SpaceMakeShareable mocks base method. -func (m *MockCoordinatorClient) SpaceMakeShareable(arg0 context.Context, arg1 string) error { +func (m *MockCoordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpaceMakeShareable", arg0, arg1) + ret := m.ctrl.Call(m, "SpaceMakeShareable", ctx, spaceId) ret0, _ := ret[0].(error) return ret0 } // SpaceMakeShareable indicates an expected call of SpaceMakeShareable. -func (mr *MockCoordinatorClientMockRecorder) SpaceMakeShareable(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) SpaceMakeShareable(ctx, spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeShareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeShareable), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeShareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeShareable), ctx, spaceId) } // SpaceMakeUnshareable mocks base method. -func (m *MockCoordinatorClient) SpaceMakeUnshareable(arg0 context.Context, arg1, arg2 string) error { +func (m *MockCoordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId, aclId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpaceMakeUnshareable", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SpaceMakeUnshareable", ctx, spaceId, aclId) ret0, _ := ret[0].(error) return ret0 } // SpaceMakeUnshareable indicates an expected call of SpaceMakeUnshareable. -func (mr *MockCoordinatorClientMockRecorder) SpaceMakeUnshareable(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) SpaceMakeUnshareable(ctx, spaceId, aclId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeUnshareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeUnshareable), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeUnshareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeUnshareable), ctx, spaceId, aclId) } // SpaceSign mocks base method. -func (m *MockCoordinatorClient) SpaceSign(arg0 context.Context, arg1 coordinatorclient.SpaceSignPayload) (*coordinatorproto.SpaceReceiptWithSignature, error) { +func (m *MockCoordinatorClient) SpaceSign(ctx context.Context, payload coordinatorclient.SpaceSignPayload) (*coordinatorproto.SpaceReceiptWithSignature, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpaceSign", arg0, arg1) + ret := m.ctrl.Call(m, "SpaceSign", ctx, payload) ret0, _ := ret[0].(*coordinatorproto.SpaceReceiptWithSignature) ret1, _ := ret[1].(error) return ret0, ret1 } // SpaceSign indicates an expected call of SpaceSign. -func (mr *MockCoordinatorClientMockRecorder) SpaceSign(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) SpaceSign(ctx, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceSign", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceSign), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceSign", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceSign), ctx, payload) } // StatusCheck mocks base method. -func (m *MockCoordinatorClient) StatusCheck(arg0 context.Context, arg1 string) (*coordinatorproto.SpaceStatusPayload, error) { +func (m *MockCoordinatorClient) StatusCheck(ctx context.Context, spaceId string) (*coordinatorproto.SpaceStatusPayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StatusCheck", arg0, arg1) + ret := m.ctrl.Call(m, "StatusCheck", ctx, spaceId) ret0, _ := ret[0].(*coordinatorproto.SpaceStatusPayload) ret1, _ := ret[1].(error) return ret0, ret1 } // StatusCheck indicates an expected call of StatusCheck. -func (mr *MockCoordinatorClientMockRecorder) StatusCheck(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) StatusCheck(ctx, spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusCheck", reflect.TypeOf((*MockCoordinatorClient)(nil).StatusCheck), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusCheck", reflect.TypeOf((*MockCoordinatorClient)(nil).StatusCheck), ctx, spaceId) } // StatusCheckMany mocks base method. -func (m *MockCoordinatorClient) StatusCheckMany(arg0 context.Context, arg1 []string) ([]*coordinatorproto.SpaceStatusPayload, *coordinatorproto.AccountLimits, error) { +func (m *MockCoordinatorClient) StatusCheckMany(ctx context.Context, spaceIds []string) ([]*coordinatorproto.SpaceStatusPayload, *coordinatorproto.AccountLimits, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StatusCheckMany", arg0, arg1) + ret := m.ctrl.Call(m, "StatusCheckMany", ctx, spaceIds) ret0, _ := ret[0].([]*coordinatorproto.SpaceStatusPayload) ret1, _ := ret[1].(*coordinatorproto.AccountLimits) ret2, _ := ret[2].(error) @@ -316,7 +318,7 @@ func (m *MockCoordinatorClient) StatusCheckMany(arg0 context.Context, arg1 []str } // StatusCheckMany indicates an expected call of StatusCheckMany. -func (mr *MockCoordinatorClientMockRecorder) StatusCheckMany(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) StatusCheckMany(ctx, spaceIds any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusCheckMany", reflect.TypeOf((*MockCoordinatorClient)(nil).StatusCheckMany), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusCheckMany", reflect.TypeOf((*MockCoordinatorClient)(nil).StatusCheckMany), ctx, spaceIds) } diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 681110e28..4f4107b29 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: coordinator/coordinatorproto/protos/coordinator.proto package coordinatorproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ErrorCodes int32 @@ -39,42 +38,63 @@ const ( ErrorCodes_ErrorOffset ErrorCodes = 300 ) -var ErrorCodes_name = map[int32]string{ - 0: "Unexpected", - 1: "SpaceDeleted", - 2: "SpaceDeletionPending", - 3: "SpaceCreated", - 4: "SpaceNotExists", - 5: "SpaceLimitReached", - 6: "AccountDeleted", - 7: "Forbidden", - 8: "AclHeadIsMissing", - 9: "AclNonEmpty", - 10: "SpaceNotShareable", - 300: "ErrorOffset", -} - -var ErrorCodes_value = map[string]int32{ - "Unexpected": 0, - "SpaceDeleted": 1, - "SpaceDeletionPending": 2, - "SpaceCreated": 3, - "SpaceNotExists": 4, - "SpaceLimitReached": 5, - "AccountDeleted": 6, - "Forbidden": 7, - "AclHeadIsMissing": 8, - "AclNonEmpty": 9, - "SpaceNotShareable": 10, - "ErrorOffset": 300, +// Enum value maps for ErrorCodes. +var ( + ErrorCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "SpaceDeleted", + 2: "SpaceDeletionPending", + 3: "SpaceCreated", + 4: "SpaceNotExists", + 5: "SpaceLimitReached", + 6: "AccountDeleted", + 7: "Forbidden", + 8: "AclHeadIsMissing", + 9: "AclNonEmpty", + 10: "SpaceNotShareable", + 300: "ErrorOffset", + } + ErrorCodes_value = map[string]int32{ + "Unexpected": 0, + "SpaceDeleted": 1, + "SpaceDeletionPending": 2, + "SpaceCreated": 3, + "SpaceNotExists": 4, + "SpaceLimitReached": 5, + "AccountDeleted": 6, + "Forbidden": 7, + "AclHeadIsMissing": 8, + "AclNonEmpty": 9, + "SpaceNotShareable": 10, + "ErrorOffset": 300, + } +) + +func (x ErrorCodes) Enum() *ErrorCodes { + p := new(ErrorCodes) + *p = x + return p } func (x ErrorCodes) String() string { - return proto.EnumName(ErrorCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCodes) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[0].Descriptor() +} + +func (ErrorCodes) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[0] +} + +func (x ErrorCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ErrorCodes.Descriptor instead. func (ErrorCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{0} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{0} } type SpaceStatus int32 @@ -87,28 +107,49 @@ const ( SpaceStatus_SpaceStatusNotExists SpaceStatus = 4 ) -var SpaceStatus_name = map[int32]string{ - 0: "SpaceStatusCreated", - 1: "SpaceStatusPendingDeletion", - 2: "SpaceStatusDeletionStarted", - 3: "SpaceStatusDeleted", - 4: "SpaceStatusNotExists", -} +// Enum value maps for SpaceStatus. +var ( + SpaceStatus_name = map[int32]string{ + 0: "SpaceStatusCreated", + 1: "SpaceStatusPendingDeletion", + 2: "SpaceStatusDeletionStarted", + 3: "SpaceStatusDeleted", + 4: "SpaceStatusNotExists", + } + SpaceStatus_value = map[string]int32{ + "SpaceStatusCreated": 0, + "SpaceStatusPendingDeletion": 1, + "SpaceStatusDeletionStarted": 2, + "SpaceStatusDeleted": 3, + "SpaceStatusNotExists": 4, + } +) -var SpaceStatus_value = map[string]int32{ - "SpaceStatusCreated": 0, - "SpaceStatusPendingDeletion": 1, - "SpaceStatusDeletionStarted": 2, - "SpaceStatusDeleted": 3, - "SpaceStatusNotExists": 4, +func (x SpaceStatus) Enum() *SpaceStatus { + p := new(SpaceStatus) + *p = x + return p } func (x SpaceStatus) String() string { - return proto.EnumName(SpaceStatus_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SpaceStatus) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[1].Descriptor() +} + +func (SpaceStatus) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[1] +} + +func (x SpaceStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use SpaceStatus.Descriptor instead. func (SpaceStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{1} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{1} } type SpacePermissions int32 @@ -118,22 +159,43 @@ const ( SpacePermissions_SpacePermissionsOwner SpacePermissions = 1 ) -var SpacePermissions_name = map[int32]string{ - 0: "SpacePermissionsUnknown", - 1: "SpacePermissionsOwner", -} +// Enum value maps for SpacePermissions. +var ( + SpacePermissions_name = map[int32]string{ + 0: "SpacePermissionsUnknown", + 1: "SpacePermissionsOwner", + } + SpacePermissions_value = map[string]int32{ + "SpacePermissionsUnknown": 0, + "SpacePermissionsOwner": 1, + } +) -var SpacePermissions_value = map[string]int32{ - "SpacePermissionsUnknown": 0, - "SpacePermissionsOwner": 1, +func (x SpacePermissions) Enum() *SpacePermissions { + p := new(SpacePermissions) + *p = x + return p } func (x SpacePermissions) String() string { - return proto.EnumName(SpacePermissions_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SpacePermissions) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[2].Descriptor() +} + +func (SpacePermissions) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[2] } +func (x SpacePermissions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SpacePermissions.Descriptor instead. func (SpacePermissions) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{2} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{2} } // NodeType determines the type of API that a node supports @@ -156,30 +218,51 @@ const ( NodeType_PaymentProcessingAPI NodeType = 5 ) -var NodeType_name = map[int32]string{ - 0: "TreeAPI", - 1: "FileAPI", - 2: "CoordinatorAPI", - 3: "ConsensusAPI", - 4: "NamingNodeAPI", - 5: "PaymentProcessingAPI", -} +// Enum value maps for NodeType. +var ( + NodeType_name = map[int32]string{ + 0: "TreeAPI", + 1: "FileAPI", + 2: "CoordinatorAPI", + 3: "ConsensusAPI", + 4: "NamingNodeAPI", + 5: "PaymentProcessingAPI", + } + NodeType_value = map[string]int32{ + "TreeAPI": 0, + "FileAPI": 1, + "CoordinatorAPI": 2, + "ConsensusAPI": 3, + "NamingNodeAPI": 4, + "PaymentProcessingAPI": 5, + } +) -var NodeType_value = map[string]int32{ - "TreeAPI": 0, - "FileAPI": 1, - "CoordinatorAPI": 2, - "ConsensusAPI": 3, - "NamingNodeAPI": 4, - "PaymentProcessingAPI": 5, +func (x NodeType) Enum() *NodeType { + p := new(NodeType) + *p = x + return p } func (x NodeType) String() string { - return proto.EnumName(NodeType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeType) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[3].Descriptor() } +func (NodeType) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[3] +} + +func (x NodeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeType.Descriptor instead. func (NodeType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{3} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{3} } // DeletionChangeType determines the type of deletion payload @@ -191,24 +274,45 @@ const ( DeletionPayloadType_Account DeletionPayloadType = 2 ) -var DeletionPayloadType_name = map[int32]string{ - 0: "Tree", - 1: "Confirm", - 2: "Account", -} +// Enum value maps for DeletionPayloadType. +var ( + DeletionPayloadType_name = map[int32]string{ + 0: "Tree", + 1: "Confirm", + 2: "Account", + } + DeletionPayloadType_value = map[string]int32{ + "Tree": 0, + "Confirm": 1, + "Account": 2, + } +) -var DeletionPayloadType_value = map[string]int32{ - "Tree": 0, - "Confirm": 1, - "Account": 2, +func (x DeletionPayloadType) Enum() *DeletionPayloadType { + p := new(DeletionPayloadType) + *p = x + return p } func (x DeletionPayloadType) String() string { - return proto.EnumName(DeletionPayloadType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeletionPayloadType) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[4].Descriptor() +} + +func (DeletionPayloadType) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[4] +} + +func (x DeletionPayloadType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use DeletionPayloadType.Descriptor instead. func (DeletionPayloadType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{4} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{4} } type DeletionLogRecordStatus int32 @@ -222,24 +326,45 @@ const ( DeletionLogRecordStatus_Remove DeletionLogRecordStatus = 2 ) -var DeletionLogRecordStatus_name = map[int32]string{ - 0: "Ok", - 1: "RemovePrepare", - 2: "Remove", -} +// Enum value maps for DeletionLogRecordStatus. +var ( + DeletionLogRecordStatus_name = map[int32]string{ + 0: "Ok", + 1: "RemovePrepare", + 2: "Remove", + } + DeletionLogRecordStatus_value = map[string]int32{ + "Ok": 0, + "RemovePrepare": 1, + "Remove": 2, + } +) -var DeletionLogRecordStatus_value = map[string]int32{ - "Ok": 0, - "RemovePrepare": 1, - "Remove": 2, +func (x DeletionLogRecordStatus) Enum() *DeletionLogRecordStatus { + p := new(DeletionLogRecordStatus) + *p = x + return p } func (x DeletionLogRecordStatus) String() string { - return proto.EnumName(DeletionLogRecordStatus_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeletionLogRecordStatus) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[5].Descriptor() +} + +func (DeletionLogRecordStatus) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[5] } +func (x DeletionLogRecordStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeletionLogRecordStatus.Descriptor instead. func (DeletionLogRecordStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{5} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{5} } type AclEventLogRecordType int32 @@ -251,29 +376,51 @@ const ( AclEventLogRecordType_RecordTypeSpaceAclAddRecord AclEventLogRecordType = 3 ) -var AclEventLogRecordType_name = map[int32]string{ - 0: "RecordTypeSpaceReceipt", - 1: "RecordTypeSpaceShared", - 2: "RecordTypeSpaceUnshared", - 3: "RecordTypeSpaceAclAddRecord", -} +// Enum value maps for AclEventLogRecordType. +var ( + AclEventLogRecordType_name = map[int32]string{ + 0: "RecordTypeSpaceReceipt", + 1: "RecordTypeSpaceShared", + 2: "RecordTypeSpaceUnshared", + 3: "RecordTypeSpaceAclAddRecord", + } + AclEventLogRecordType_value = map[string]int32{ + "RecordTypeSpaceReceipt": 0, + "RecordTypeSpaceShared": 1, + "RecordTypeSpaceUnshared": 2, + "RecordTypeSpaceAclAddRecord": 3, + } +) -var AclEventLogRecordType_value = map[string]int32{ - "RecordTypeSpaceReceipt": 0, - "RecordTypeSpaceShared": 1, - "RecordTypeSpaceUnshared": 2, - "RecordTypeSpaceAclAddRecord": 3, +func (x AclEventLogRecordType) Enum() *AclEventLogRecordType { + p := new(AclEventLogRecordType) + *p = x + return p } func (x AclEventLogRecordType) String() string { - return proto.EnumName(AclEventLogRecordType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AclEventLogRecordType) Descriptor() protoreflect.EnumDescriptor { + return file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[6].Descriptor() } +func (AclEventLogRecordType) Type() protoreflect.EnumType { + return &file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes[6] +} + +func (x AclEventLogRecordType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AclEventLogRecordType.Descriptor instead. func (AclEventLogRecordType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{6} + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{6} } type SpaceSignRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // SpaceId is the id of the signed space SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` // Header is the header of the signed space @@ -283,344 +430,304 @@ type SpaceSignRequest struct { // NewIdentitySignature is the new identity signed by the old one NewIdentitySignature []byte `protobuf:"bytes,4,opt,name=newIdentitySignature,proto3" json:"newIdentitySignature,omitempty"` // ForceRequest if true, forces the creating space receipt even if the space is deleted before - ForceRequest bool `protobuf:"varint,5,opt,name=forceRequest,proto3" json:"forceRequest,omitempty"` + ForceRequest bool `protobuf:"varint,5,opt,name=forceRequest,proto3" json:"forceRequest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceSignRequest) Reset() { *m = SpaceSignRequest{} } -func (m *SpaceSignRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceSignRequest) ProtoMessage() {} -func (*SpaceSignRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{0} -} -func (m *SpaceSignRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceSignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceSignRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceSignRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceSignRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceSignRequest.Merge(m, src) +func (x *SpaceSignRequest) Reset() { + *x = SpaceSignRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceSignRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceSignRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceSignRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceSignRequest.DiscardUnknown(m) + +func (*SpaceSignRequest) ProtoMessage() {} + +func (x *SpaceSignRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceSignRequest proto.InternalMessageInfo +// Deprecated: Use SpaceSignRequest.ProtoReflect.Descriptor instead. +func (*SpaceSignRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{0} +} -func (m *SpaceSignRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceSignRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *SpaceSignRequest) GetHeader() []byte { - if m != nil { - return m.Header +func (x *SpaceSignRequest) GetHeader() []byte { + if x != nil { + return x.Header } return nil } -func (m *SpaceSignRequest) GetOldIdentity() []byte { - if m != nil { - return m.OldIdentity +func (x *SpaceSignRequest) GetOldIdentity() []byte { + if x != nil { + return x.OldIdentity } return nil } -func (m *SpaceSignRequest) GetNewIdentitySignature() []byte { - if m != nil { - return m.NewIdentitySignature +func (x *SpaceSignRequest) GetNewIdentitySignature() []byte { + if x != nil { + return x.NewIdentitySignature } return nil } -func (m *SpaceSignRequest) GetForceRequest() bool { - if m != nil { - return m.ForceRequest +func (x *SpaceSignRequest) GetForceRequest() bool { + if x != nil { + return x.ForceRequest } return false } type SpaceLimits struct { - ReadMembers uint32 `protobuf:"varint,1,opt,name=readMembers,proto3" json:"readMembers,omitempty"` - WriteMembers uint32 `protobuf:"varint,2,opt,name=writeMembers,proto3" json:"writeMembers,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ReadMembers uint32 `protobuf:"varint,1,opt,name=readMembers,proto3" json:"readMembers,omitempty"` + WriteMembers uint32 `protobuf:"varint,2,opt,name=writeMembers,proto3" json:"writeMembers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceLimits) Reset() { *m = SpaceLimits{} } -func (m *SpaceLimits) String() string { return proto.CompactTextString(m) } -func (*SpaceLimits) ProtoMessage() {} -func (*SpaceLimits) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{1} -} -func (m *SpaceLimits) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceLimits.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpaceLimits) Reset() { + *x = SpaceLimits{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceLimits) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceLimits) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceLimits.Merge(m, src) -} -func (m *SpaceLimits) XXX_Size() int { - return m.Size() + +func (x *SpaceLimits) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceLimits) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceLimits.DiscardUnknown(m) + +func (*SpaceLimits) ProtoMessage() {} + +func (x *SpaceLimits) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceLimits proto.InternalMessageInfo +// Deprecated: Use SpaceLimits.ProtoReflect.Descriptor instead. +func (*SpaceLimits) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{1} +} -func (m *SpaceLimits) GetReadMembers() uint32 { - if m != nil { - return m.ReadMembers +func (x *SpaceLimits) GetReadMembers() uint32 { + if x != nil { + return x.ReadMembers } return 0 } -func (m *SpaceLimits) GetWriteMembers() uint32 { - if m != nil { - return m.WriteMembers +func (x *SpaceLimits) GetWriteMembers() uint32 { + if x != nil { + return x.WriteMembers } return 0 } type SpaceStatusPayload struct { - Status SpaceStatus `protobuf:"varint,1,opt,name=status,proto3,enum=coordinator.SpaceStatus" json:"status,omitempty"` - DeletionTimestamp int64 `protobuf:"varint,2,opt,name=deletionTimestamp,proto3" json:"deletionTimestamp,omitempty"` - Permissions SpacePermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=coordinator.SpacePermissions" json:"permissions,omitempty"` - Limits *SpaceLimits `protobuf:"bytes,4,opt,name=limits,proto3" json:"limits,omitempty"` - IsShared bool `protobuf:"varint,5,opt,name=isShared,proto3" json:"isShared,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Status SpaceStatus `protobuf:"varint,1,opt,name=status,proto3,enum=coordinator.SpaceStatus" json:"status,omitempty"` + DeletionTimestamp int64 `protobuf:"varint,2,opt,name=deletionTimestamp,proto3" json:"deletionTimestamp,omitempty"` + Permissions SpacePermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=coordinator.SpacePermissions" json:"permissions,omitempty"` + Limits *SpaceLimits `protobuf:"bytes,4,opt,name=limits,proto3" json:"limits,omitempty"` + IsShared bool `protobuf:"varint,5,opt,name=isShared,proto3" json:"isShared,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusPayload) Reset() { *m = SpaceStatusPayload{} } -func (m *SpaceStatusPayload) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusPayload) ProtoMessage() {} -func (*SpaceStatusPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{2} -} -func (m *SpaceStatusPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusPayload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceStatusPayload) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceStatusPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusPayload.Merge(m, src) +func (x *SpaceStatusPayload) Reset() { + *x = SpaceStatusPayload{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusPayload) XXX_Size() int { - return m.Size() + +func (x *SpaceStatusPayload) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusPayload) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusPayload.DiscardUnknown(m) + +func (*SpaceStatusPayload) ProtoMessage() {} + +func (x *SpaceStatusPayload) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceStatusPayload proto.InternalMessageInfo +// Deprecated: Use SpaceStatusPayload.ProtoReflect.Descriptor instead. +func (*SpaceStatusPayload) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{2} +} -func (m *SpaceStatusPayload) GetStatus() SpaceStatus { - if m != nil { - return m.Status +func (x *SpaceStatusPayload) GetStatus() SpaceStatus { + if x != nil { + return x.Status } return SpaceStatus_SpaceStatusCreated } -func (m *SpaceStatusPayload) GetDeletionTimestamp() int64 { - if m != nil { - return m.DeletionTimestamp +func (x *SpaceStatusPayload) GetDeletionTimestamp() int64 { + if x != nil { + return x.DeletionTimestamp } return 0 } -func (m *SpaceStatusPayload) GetPermissions() SpacePermissions { - if m != nil { - return m.Permissions +func (x *SpaceStatusPayload) GetPermissions() SpacePermissions { + if x != nil { + return x.Permissions } return SpacePermissions_SpacePermissionsUnknown } -func (m *SpaceStatusPayload) GetLimits() *SpaceLimits { - if m != nil { - return m.Limits +func (x *SpaceStatusPayload) GetLimits() *SpaceLimits { + if x != nil { + return x.Limits } return nil } -func (m *SpaceStatusPayload) GetIsShared() bool { - if m != nil { - return m.IsShared +func (x *SpaceStatusPayload) GetIsShared() bool { + if x != nil { + return x.IsShared } return false } type SpaceSignResponse struct { - Receipt *SpaceReceiptWithSignature `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Receipt *SpaceReceiptWithSignature `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceSignResponse) Reset() { *m = SpaceSignResponse{} } -func (m *SpaceSignResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceSignResponse) ProtoMessage() {} -func (*SpaceSignResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{3} -} -func (m *SpaceSignResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceSignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceSignResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceSignResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *SpaceSignResponse) Reset() { + *x = SpaceSignResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceSignResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceSignResponse.Merge(m, src) -} -func (m *SpaceSignResponse) XXX_Size() int { - return m.Size() + +func (x *SpaceSignResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceSignResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceSignResponse.DiscardUnknown(m) + +func (*SpaceSignResponse) ProtoMessage() {} + +func (x *SpaceSignResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceSignResponse proto.InternalMessageInfo +// Deprecated: Use SpaceSignResponse.ProtoReflect.Descriptor instead. +func (*SpaceSignResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{3} +} -func (m *SpaceSignResponse) GetReceipt() *SpaceReceiptWithSignature { - if m != nil { - return m.Receipt +func (x *SpaceSignResponse) GetReceipt() *SpaceReceiptWithSignature { + if x != nil { + return x.Receipt } return nil } // SpaceReceiptWithSignature contains protobuf encoded receipt and its signature type SpaceReceiptWithSignature struct { - SpaceReceiptPayload []byte `protobuf:"bytes,1,opt,name=spaceReceiptPayload,proto3" json:"spaceReceiptPayload,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceReceiptPayload []byte `protobuf:"bytes,1,opt,name=spaceReceiptPayload,proto3" json:"spaceReceiptPayload,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceReceiptWithSignature) Reset() { *m = SpaceReceiptWithSignature{} } -func (m *SpaceReceiptWithSignature) String() string { return proto.CompactTextString(m) } -func (*SpaceReceiptWithSignature) ProtoMessage() {} -func (*SpaceReceiptWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{4} -} -func (m *SpaceReceiptWithSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceReceiptWithSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceReceiptWithSignature.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceReceiptWithSignature) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceReceiptWithSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceReceiptWithSignature.Merge(m, src) +func (x *SpaceReceiptWithSignature) Reset() { + *x = SpaceReceiptWithSignature{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceReceiptWithSignature) XXX_Size() int { - return m.Size() + +func (x *SpaceReceiptWithSignature) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceReceiptWithSignature) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceReceiptWithSignature.DiscardUnknown(m) + +func (*SpaceReceiptWithSignature) ProtoMessage() {} + +func (x *SpaceReceiptWithSignature) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceReceiptWithSignature proto.InternalMessageInfo +// Deprecated: Use SpaceReceiptWithSignature.ProtoReflect.Descriptor instead. +func (*SpaceReceiptWithSignature) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{4} +} -func (m *SpaceReceiptWithSignature) GetSpaceReceiptPayload() []byte { - if m != nil { - return m.SpaceReceiptPayload +func (x *SpaceReceiptWithSignature) GetSpaceReceiptPayload() []byte { + if x != nil { + return x.SpaceReceiptPayload } return nil } -func (m *SpaceReceiptWithSignature) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *SpaceReceiptWithSignature) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } // SpaceReceipt contains permission to SpacePush operation type SpaceReceipt struct { + state protoimpl.MessageState `protogen:"open.v1"` // SpaceId is the identifier of space SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` // PeerId of receipt requester @@ -630,745 +737,641 @@ type SpaceReceipt struct { // NetworkId is the id of a network where the receipt is issued NetworkId string `protobuf:"bytes,4,opt,name=networkId,proto3" json:"networkId,omitempty"` // ValidUntil is a unix-timestamp with a deadline time of receipt validity - ValidUntil uint64 `protobuf:"varint,5,opt,name=validUntil,proto3" json:"validUntil,omitempty"` + ValidUntil uint64 `protobuf:"varint,5,opt,name=validUntil,proto3" json:"validUntil,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceReceipt) Reset() { *m = SpaceReceipt{} } -func (m *SpaceReceipt) String() string { return proto.CompactTextString(m) } -func (*SpaceReceipt) ProtoMessage() {} -func (*SpaceReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{5} -} -func (m *SpaceReceipt) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceReceipt.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpaceReceipt) Reset() { + *x = SpaceReceipt{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceReceipt) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceReceipt) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceReceipt.Merge(m, src) -} -func (m *SpaceReceipt) XXX_Size() int { - return m.Size() + +func (x *SpaceReceipt) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceReceipt) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceReceipt.DiscardUnknown(m) + +func (*SpaceReceipt) ProtoMessage() {} + +func (x *SpaceReceipt) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceReceipt proto.InternalMessageInfo +// Deprecated: Use SpaceReceipt.ProtoReflect.Descriptor instead. +func (*SpaceReceipt) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{5} +} -func (m *SpaceReceipt) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceReceipt) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *SpaceReceipt) GetPeerId() string { - if m != nil { - return m.PeerId +func (x *SpaceReceipt) GetPeerId() string { + if x != nil { + return x.PeerId } return "" } -func (m *SpaceReceipt) GetAccountIdentity() []byte { - if m != nil { - return m.AccountIdentity +func (x *SpaceReceipt) GetAccountIdentity() []byte { + if x != nil { + return x.AccountIdentity } return nil } -func (m *SpaceReceipt) GetNetworkId() string { - if m != nil { - return m.NetworkId +func (x *SpaceReceipt) GetNetworkId() string { + if x != nil { + return x.NetworkId } return "" } -func (m *SpaceReceipt) GetValidUntil() uint64 { - if m != nil { - return m.ValidUntil +func (x *SpaceReceipt) GetValidUntil() uint64 { + if x != nil { + return x.ValidUntil } return 0 } // SpaceStatusCheckRequest contains the spaceId of requested space type SpaceStatusCheckRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusCheckRequest) Reset() { *m = SpaceStatusCheckRequest{} } -func (m *SpaceStatusCheckRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusCheckRequest) ProtoMessage() {} -func (*SpaceStatusCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{6} -} -func (m *SpaceStatusCheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusCheckRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceStatusCheckRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *SpaceStatusCheckRequest) Reset() { + *x = SpaceStatusCheckRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusCheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusCheckRequest.Merge(m, src) -} -func (m *SpaceStatusCheckRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceStatusCheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusCheckRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusCheckRequest.DiscardUnknown(m) + +func (*SpaceStatusCheckRequest) ProtoMessage() {} + +func (x *SpaceStatusCheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_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) } -var xxx_messageInfo_SpaceStatusCheckRequest proto.InternalMessageInfo +// Deprecated: Use SpaceStatusCheckRequest.ProtoReflect.Descriptor instead. +func (*SpaceStatusCheckRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{6} +} -func (m *SpaceStatusCheckRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceStatusCheckRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } // SpaceStatusCheckResponse contains the current status of space type SpaceStatusCheckResponse struct { - Payload *SpaceStatusPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payload *SpaceStatusPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusCheckResponse) Reset() { *m = SpaceStatusCheckResponse{} } -func (m *SpaceStatusCheckResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusCheckResponse) ProtoMessage() {} -func (*SpaceStatusCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{7} -} -func (m *SpaceStatusCheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusCheckResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceStatusCheckResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceStatusCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusCheckResponse.Merge(m, src) +func (x *SpaceStatusCheckResponse) Reset() { + *x = SpaceStatusCheckResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusCheckResponse) XXX_Size() int { - return m.Size() + +func (x *SpaceStatusCheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusCheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusCheckResponse.DiscardUnknown(m) + +func (*SpaceStatusCheckResponse) ProtoMessage() {} + +func (x *SpaceStatusCheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceStatusCheckResponse proto.InternalMessageInfo +// Deprecated: Use SpaceStatusCheckResponse.ProtoReflect.Descriptor instead. +func (*SpaceStatusCheckResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{7} +} -func (m *SpaceStatusCheckResponse) GetPayload() *SpaceStatusPayload { - if m != nil { - return m.Payload +func (x *SpaceStatusCheckResponse) GetPayload() *SpaceStatusPayload { + if x != nil { + return x.Payload } return nil } // SpaceStatusCheckManyRequest contains the spaceIds of requested spaces type SpaceStatusCheckManyRequest struct { - SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusCheckManyRequest) Reset() { *m = SpaceStatusCheckManyRequest{} } -func (m *SpaceStatusCheckManyRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusCheckManyRequest) ProtoMessage() {} -func (*SpaceStatusCheckManyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{8} -} -func (m *SpaceStatusCheckManyRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusCheckManyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusCheckManyRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpaceStatusCheckManyRequest) Reset() { + *x = SpaceStatusCheckManyRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusCheckManyRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceStatusCheckManyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusCheckManyRequest.Merge(m, src) -} -func (m *SpaceStatusCheckManyRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceStatusCheckManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusCheckManyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusCheckManyRequest.DiscardUnknown(m) + +func (*SpaceStatusCheckManyRequest) ProtoMessage() {} + +func (x *SpaceStatusCheckManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceStatusCheckManyRequest proto.InternalMessageInfo +// Deprecated: Use SpaceStatusCheckManyRequest.ProtoReflect.Descriptor instead. +func (*SpaceStatusCheckManyRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{8} +} -func (m *SpaceStatusCheckManyRequest) GetSpaceIds() []string { - if m != nil { - return m.SpaceIds +func (x *SpaceStatusCheckManyRequest) GetSpaceIds() []string { + if x != nil { + return x.SpaceIds } return nil } // SpaceStatusCheckManyResponse contains the current statuses of spaces type SpaceStatusCheckManyResponse struct { - Payloads []*SpaceStatusPayload `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"` - AccountLimits *AccountLimits `protobuf:"bytes,2,opt,name=accountLimits,proto3" json:"accountLimits,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payloads []*SpaceStatusPayload `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"` + AccountLimits *AccountLimits `protobuf:"bytes,2,opt,name=accountLimits,proto3" json:"accountLimits,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusCheckManyResponse) Reset() { *m = SpaceStatusCheckManyResponse{} } -func (m *SpaceStatusCheckManyResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusCheckManyResponse) ProtoMessage() {} -func (*SpaceStatusCheckManyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{9} -} -func (m *SpaceStatusCheckManyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusCheckManyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusCheckManyResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceStatusCheckManyResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceStatusCheckManyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusCheckManyResponse.Merge(m, src) +func (x *SpaceStatusCheckManyResponse) Reset() { + *x = SpaceStatusCheckManyResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusCheckManyResponse) XXX_Size() int { - return m.Size() + +func (x *SpaceStatusCheckManyResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusCheckManyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusCheckManyResponse.DiscardUnknown(m) + +func (*SpaceStatusCheckManyResponse) ProtoMessage() {} + +func (x *SpaceStatusCheckManyResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceStatusCheckManyResponse proto.InternalMessageInfo +// Deprecated: Use SpaceStatusCheckManyResponse.ProtoReflect.Descriptor instead. +func (*SpaceStatusCheckManyResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{9} +} -func (m *SpaceStatusCheckManyResponse) GetPayloads() []*SpaceStatusPayload { - if m != nil { - return m.Payloads +func (x *SpaceStatusCheckManyResponse) GetPayloads() []*SpaceStatusPayload { + if x != nil { + return x.Payloads } return nil } -func (m *SpaceStatusCheckManyResponse) GetAccountLimits() *AccountLimits { - if m != nil { - return m.AccountLimits +func (x *SpaceStatusCheckManyResponse) GetAccountLimits() *AccountLimits { + if x != nil { + return x.AccountLimits } return nil } // AccountLimits describes account level limit type AccountLimits struct { - SharedSpacesLimit uint32 `protobuf:"varint,1,opt,name=sharedSpacesLimit,proto3" json:"sharedSpacesLimit,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SharedSpacesLimit uint32 `protobuf:"varint,1,opt,name=sharedSpacesLimit,proto3" json:"sharedSpacesLimit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountLimits) Reset() { *m = AccountLimits{} } -func (m *AccountLimits) String() string { return proto.CompactTextString(m) } -func (*AccountLimits) ProtoMessage() {} -func (*AccountLimits) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{10} -} -func (m *AccountLimits) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountLimits.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountLimits) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AccountLimits) Reset() { + *x = AccountLimits{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountLimits) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountLimits.Merge(m, src) -} -func (m *AccountLimits) XXX_Size() int { - return m.Size() + +func (x *AccountLimits) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountLimits) XXX_DiscardUnknown() { - xxx_messageInfo_AccountLimits.DiscardUnknown(m) + +func (*AccountLimits) ProtoMessage() {} + +func (x *AccountLimits) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountLimits proto.InternalMessageInfo +// Deprecated: Use AccountLimits.ProtoReflect.Descriptor instead. +func (*AccountLimits) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{10} +} -func (m *AccountLimits) GetSharedSpacesLimit() uint32 { - if m != nil { - return m.SharedSpacesLimit +func (x *AccountLimits) GetSharedSpacesLimit() uint32 { + if x != nil { + return x.SharedSpacesLimit } return 0 } // SpaceStatusChangeRequest contains the deletionChange if we want to delete space, or it is empty otherwise type SpaceStatusChangeRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - DeletionPayloadId string `protobuf:"bytes,2,opt,name=deletionPayloadId,proto3" json:"deletionPayloadId,omitempty"` - DeletionPayload []byte `protobuf:"bytes,3,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` - DeletionPayloadType DeletionPayloadType `protobuf:"varint,4,opt,name=deletionPayloadType,proto3,enum=coordinator.DeletionPayloadType" json:"deletionPayloadType,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + DeletionPayloadId string `protobuf:"bytes,2,opt,name=deletionPayloadId,proto3" json:"deletionPayloadId,omitempty"` + DeletionPayload []byte `protobuf:"bytes,3,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` + DeletionPayloadType DeletionPayloadType `protobuf:"varint,4,opt,name=deletionPayloadType,proto3,enum=coordinator.DeletionPayloadType" json:"deletionPayloadType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusChangeRequest) Reset() { *m = SpaceStatusChangeRequest{} } -func (m *SpaceStatusChangeRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusChangeRequest) ProtoMessage() {} -func (*SpaceStatusChangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{11} -} -func (m *SpaceStatusChangeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusChangeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceStatusChangeRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceStatusChangeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusChangeRequest.Merge(m, src) +func (x *SpaceStatusChangeRequest) Reset() { + *x = SpaceStatusChangeRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusChangeRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceStatusChangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusChangeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusChangeRequest.DiscardUnknown(m) + +func (*SpaceStatusChangeRequest) ProtoMessage() {} + +func (x *SpaceStatusChangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceStatusChangeRequest proto.InternalMessageInfo +// Deprecated: Use SpaceStatusChangeRequest.ProtoReflect.Descriptor instead. +func (*SpaceStatusChangeRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{11} +} -func (m *SpaceStatusChangeRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceStatusChangeRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *SpaceStatusChangeRequest) GetDeletionPayloadId() string { - if m != nil { - return m.DeletionPayloadId +func (x *SpaceStatusChangeRequest) GetDeletionPayloadId() string { + if x != nil { + return x.DeletionPayloadId } return "" } -func (m *SpaceStatusChangeRequest) GetDeletionPayload() []byte { - if m != nil { - return m.DeletionPayload +func (x *SpaceStatusChangeRequest) GetDeletionPayload() []byte { + if x != nil { + return x.DeletionPayload } return nil } -func (m *SpaceStatusChangeRequest) GetDeletionPayloadType() DeletionPayloadType { - if m != nil { - return m.DeletionPayloadType +func (x *SpaceStatusChangeRequest) GetDeletionPayloadType() DeletionPayloadType { + if x != nil { + return x.DeletionPayloadType } return DeletionPayloadType_Tree } // SpaceStatusChangeResponse contains changed status of space type SpaceStatusChangeResponse struct { - Payload *SpaceStatusPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Payload *SpaceStatusPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceStatusChangeResponse) Reset() { *m = SpaceStatusChangeResponse{} } -func (m *SpaceStatusChangeResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceStatusChangeResponse) ProtoMessage() {} -func (*SpaceStatusChangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{12} -} -func (m *SpaceStatusChangeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceStatusChangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceStatusChangeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceStatusChangeResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceStatusChangeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceStatusChangeResponse.Merge(m, src) -} -func (m *SpaceStatusChangeResponse) XXX_Size() int { - return m.Size() +func (x *SpaceStatusChangeResponse) Reset() { + *x = SpaceStatusChangeResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusChangeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceStatusChangeResponse.DiscardUnknown(m) + +func (x *SpaceStatusChangeResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_SpaceStatusChangeResponse proto.InternalMessageInfo +func (*SpaceStatusChangeResponse) ProtoMessage() {} -func (m *SpaceStatusChangeResponse) GetPayload() *SpaceStatusPayload { - if m != nil { - return m.Payload +func (x *SpaceStatusChangeResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type SpaceMakeShareableRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` +// Deprecated: Use SpaceStatusChangeResponse.ProtoReflect.Descriptor instead. +func (*SpaceStatusChangeResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{12} } -func (m *SpaceMakeShareableRequest) Reset() { *m = SpaceMakeShareableRequest{} } -func (m *SpaceMakeShareableRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceMakeShareableRequest) ProtoMessage() {} -func (*SpaceMakeShareableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{13} -} -func (m *SpaceMakeShareableRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceMakeShareableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceMakeShareableRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *SpaceStatusChangeResponse) GetPayload() *SpaceStatusPayload { + if x != nil { + return x.Payload } + return nil } -func (m *SpaceMakeShareableRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceMakeShareableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceMakeShareableRequest.Merge(m, src) + +type SpaceMakeShareableRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceMakeShareableRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceMakeShareableRequest) Reset() { + *x = SpaceMakeShareableRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceMakeShareableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceMakeShareableRequest.DiscardUnknown(m) + +func (x *SpaceMakeShareableRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_SpaceMakeShareableRequest proto.InternalMessageInfo +func (*SpaceMakeShareableRequest) ProtoMessage() {} -func (m *SpaceMakeShareableRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceMakeShareableRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type SpaceMakeShareableResponse struct { +// Deprecated: Use SpaceMakeShareableRequest.ProtoReflect.Descriptor instead. +func (*SpaceMakeShareableRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{13} } -func (m *SpaceMakeShareableResponse) Reset() { *m = SpaceMakeShareableResponse{} } -func (m *SpaceMakeShareableResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceMakeShareableResponse) ProtoMessage() {} -func (*SpaceMakeShareableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{14} -} -func (m *SpaceMakeShareableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceMakeShareableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceMakeShareableResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceMakeShareableResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *SpaceMakeShareableRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } - return b, nil -} -func (m *SpaceMakeShareableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceMakeShareableResponse.Merge(m, src) -} -func (m *SpaceMakeShareableResponse) XXX_Size() int { - return m.Size() + return "" } -func (m *SpaceMakeShareableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceMakeShareableResponse.DiscardUnknown(m) + +type SpaceMakeShareableResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -var xxx_messageInfo_SpaceMakeShareableResponse proto.InternalMessageInfo +func (x *SpaceMakeShareableResponse) Reset() { + *x = SpaceMakeShareableResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} -type SpaceMakeUnshareableRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` +func (x *SpaceMakeShareableResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceMakeUnshareableRequest) Reset() { *m = SpaceMakeUnshareableRequest{} } -func (m *SpaceMakeUnshareableRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceMakeUnshareableRequest) ProtoMessage() {} -func (*SpaceMakeUnshareableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{15} -} -func (m *SpaceMakeUnshareableRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceMakeUnshareableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceMakeUnshareableRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (*SpaceMakeShareableResponse) ProtoMessage() {} + +func (x *SpaceMakeShareableResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *SpaceMakeUnshareableRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +// Deprecated: Use SpaceMakeShareableResponse.ProtoReflect.Descriptor instead. +func (*SpaceMakeShareableResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{14} } -func (m *SpaceMakeUnshareableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceMakeUnshareableRequest.Merge(m, src) + +type SpaceMakeUnshareableRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpaceMakeUnshareableRequest) Reset() { + *x = SpaceMakeUnshareableRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceMakeUnshareableRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceMakeUnshareableRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceMakeUnshareableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceMakeUnshareableRequest.DiscardUnknown(m) + +func (*SpaceMakeUnshareableRequest) ProtoMessage() {} + +func (x *SpaceMakeUnshareableRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceMakeUnshareableRequest proto.InternalMessageInfo +// Deprecated: Use SpaceMakeUnshareableRequest.ProtoReflect.Descriptor instead. +func (*SpaceMakeUnshareableRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{15} +} -func (m *SpaceMakeUnshareableRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceMakeUnshareableRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *SpaceMakeUnshareableRequest) GetAclHead() string { - if m != nil { - return m.AclHead +func (x *SpaceMakeUnshareableRequest) GetAclHead() string { + if x != nil { + return x.AclHead } return "" } type SpaceMakeUnshareableResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceMakeUnshareableResponse) Reset() { *m = SpaceMakeUnshareableResponse{} } -func (m *SpaceMakeUnshareableResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceMakeUnshareableResponse) ProtoMessage() {} -func (*SpaceMakeUnshareableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{16} -} -func (m *SpaceMakeUnshareableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceMakeUnshareableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceMakeUnshareableResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceMakeUnshareableResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *SpaceMakeUnshareableResponse) Reset() { + *x = SpaceMakeUnshareableResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceMakeUnshareableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceMakeUnshareableResponse.Merge(m, src) -} -func (m *SpaceMakeUnshareableResponse) XXX_Size() int { - return m.Size() + +func (x *SpaceMakeUnshareableResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceMakeUnshareableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceMakeUnshareableResponse.DiscardUnknown(m) + +func (*SpaceMakeUnshareableResponse) ProtoMessage() {} + +func (x *SpaceMakeUnshareableResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceMakeUnshareableResponse proto.InternalMessageInfo +// Deprecated: Use SpaceMakeUnshareableResponse.ProtoReflect.Descriptor instead. +func (*SpaceMakeUnshareableResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{16} +} // NetworkConfigurationRequest contains currenId of the client configuration, it can be empty type NetworkConfigurationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // currenId of the client configuration // if the currentId is equal to the latest configuration id then the response will not contain a nodes list - CurrentId string `protobuf:"bytes,1,opt,name=currentId,proto3" json:"currentId,omitempty"` + CurrentId string `protobuf:"bytes,1,opt,name=currentId,proto3" json:"currentId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NetworkConfigurationRequest) Reset() { *m = NetworkConfigurationRequest{} } -func (m *NetworkConfigurationRequest) String() string { return proto.CompactTextString(m) } -func (*NetworkConfigurationRequest) ProtoMessage() {} -func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{17} -} -func (m *NetworkConfigurationRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NetworkConfigurationRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NetworkConfigurationRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NetworkConfigurationRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkConfigurationRequest.Merge(m, src) +func (x *NetworkConfigurationRequest) Reset() { + *x = NetworkConfigurationRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NetworkConfigurationRequest) XXX_Size() int { - return m.Size() + +func (x *NetworkConfigurationRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NetworkConfigurationRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkConfigurationRequest.DiscardUnknown(m) + +func (*NetworkConfigurationRequest) ProtoMessage() {} + +func (x *NetworkConfigurationRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NetworkConfigurationRequest proto.InternalMessageInfo +// Deprecated: Use NetworkConfigurationRequest.ProtoReflect.Descriptor instead. +func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{17} +} -func (m *NetworkConfigurationRequest) GetCurrentId() string { - if m != nil { - return m.CurrentId +func (x *NetworkConfigurationRequest) GetCurrentId() string { + if x != nil { + return x.CurrentId } return "" } // NetworkConfigurationResponse contains list of nodes type NetworkConfigurationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` // id of current configuration ConfigurationId string `protobuf:"bytes,1,opt,name=configurationId,proto3" json:"configurationId,omitempty"` // network id @@ -1377,212 +1380,188 @@ type NetworkConfigurationResponse struct { Nodes []*Node `protobuf:"bytes,3,rep,name=nodes,proto3" json:"nodes,omitempty"` // unix timestamp of the creation time of configuration CreationTimeUnix uint64 `protobuf:"varint,4,opt,name=creationTimeUnix,proto3" json:"creationTimeUnix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NetworkConfigurationResponse) Reset() { *m = NetworkConfigurationResponse{} } -func (m *NetworkConfigurationResponse) String() string { return proto.CompactTextString(m) } -func (*NetworkConfigurationResponse) ProtoMessage() {} -func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{18} -} -func (m *NetworkConfigurationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NetworkConfigurationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *NetworkConfigurationResponse) Reset() { + *x = NetworkConfigurationResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NetworkConfigurationResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NetworkConfigurationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkConfigurationResponse.Merge(m, src) -} -func (m *NetworkConfigurationResponse) XXX_Size() int { - return m.Size() + +func (x *NetworkConfigurationResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NetworkConfigurationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkConfigurationResponse.DiscardUnknown(m) + +func (*NetworkConfigurationResponse) ProtoMessage() {} + +func (x *NetworkConfigurationResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NetworkConfigurationResponse proto.InternalMessageInfo +// Deprecated: Use NetworkConfigurationResponse.ProtoReflect.Descriptor instead. +func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{18} +} -func (m *NetworkConfigurationResponse) GetConfigurationId() string { - if m != nil { - return m.ConfigurationId +func (x *NetworkConfigurationResponse) GetConfigurationId() string { + if x != nil { + return x.ConfigurationId } return "" } -func (m *NetworkConfigurationResponse) GetNetworkId() string { - if m != nil { - return m.NetworkId +func (x *NetworkConfigurationResponse) GetNetworkId() string { + if x != nil { + return x.NetworkId } return "" } -func (m *NetworkConfigurationResponse) GetNodes() []*Node { - if m != nil { - return m.Nodes +func (x *NetworkConfigurationResponse) GetNodes() []*Node { + if x != nil { + return x.Nodes } return nil } -func (m *NetworkConfigurationResponse) GetCreationTimeUnix() uint64 { - if m != nil { - return m.CreationTimeUnix +func (x *NetworkConfigurationResponse) GetCreationTimeUnix() uint64 { + if x != nil { + return x.CreationTimeUnix } return 0 } // Node describes one node in the network type Node struct { + state protoimpl.MessageState `protogen:"open.v1"` // peerId - it's a peer identifier (libp2p format string) so it's an encoded publicKey PeerId string `protobuf:"bytes,1,opt,name=peerId,proto3" json:"peerId,omitempty"` // list of node addresses Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` // list of supported APIs - Types []NodeType `protobuf:"varint,3,rep,packed,name=types,proto3,enum=coordinator.NodeType" json:"types,omitempty"` + Types []NodeType `protobuf:"varint,3,rep,packed,name=types,proto3,enum=coordinator.NodeType" json:"types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{19} -} -func (m *Node) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Node.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Node) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(m, src) +func (x *Node) Reset() { + *x = Node{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Node) XXX_Size() int { - return m.Size() + +func (x *Node) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Node) XXX_DiscardUnknown() { - xxx_messageInfo_Node.DiscardUnknown(m) + +func (*Node) ProtoMessage() {} + +func (x *Node) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Node proto.InternalMessageInfo +// Deprecated: Use Node.ProtoReflect.Descriptor instead. +func (*Node) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{19} +} -func (m *Node) GetPeerId() string { - if m != nil { - return m.PeerId +func (x *Node) GetPeerId() string { + if x != nil { + return x.PeerId } return "" } -func (m *Node) GetAddresses() []string { - if m != nil { - return m.Addresses +func (x *Node) GetAddresses() []string { + if x != nil { + return x.Addresses } return nil } -func (m *Node) GetTypes() []NodeType { - if m != nil { - return m.Types +func (x *Node) GetTypes() []NodeType { + if x != nil { + return x.Types } return nil } // DeletionConfirmPayloadWithSignature contains protobuf encoded deletion payload and its signature type DeletionConfirmPayloadWithSignature struct { - DeletionPayload []byte `protobuf:"bytes,1,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DeletionPayload []byte `protobuf:"bytes,1,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DeletionConfirmPayloadWithSignature) Reset() { *m = DeletionConfirmPayloadWithSignature{} } -func (m *DeletionConfirmPayloadWithSignature) String() string { return proto.CompactTextString(m) } -func (*DeletionConfirmPayloadWithSignature) ProtoMessage() {} -func (*DeletionConfirmPayloadWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{20} -} -func (m *DeletionConfirmPayloadWithSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeletionConfirmPayloadWithSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeletionConfirmPayloadWithSignature.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeletionConfirmPayloadWithSignature) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *DeletionConfirmPayloadWithSignature) Reset() { + *x = DeletionConfirmPayloadWithSignature{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DeletionConfirmPayloadWithSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeletionConfirmPayloadWithSignature.Merge(m, src) -} -func (m *DeletionConfirmPayloadWithSignature) XXX_Size() int { - return m.Size() + +func (x *DeletionConfirmPayloadWithSignature) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeletionConfirmPayloadWithSignature) XXX_DiscardUnknown() { - xxx_messageInfo_DeletionConfirmPayloadWithSignature.DiscardUnknown(m) + +func (*DeletionConfirmPayloadWithSignature) ProtoMessage() {} + +func (x *DeletionConfirmPayloadWithSignature) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeletionConfirmPayloadWithSignature proto.InternalMessageInfo +// Deprecated: Use DeletionConfirmPayloadWithSignature.ProtoReflect.Descriptor instead. +func (*DeletionConfirmPayloadWithSignature) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{20} +} -func (m *DeletionConfirmPayloadWithSignature) GetDeletionPayload() []byte { - if m != nil { - return m.DeletionPayload +func (x *DeletionConfirmPayloadWithSignature) GetDeletionPayload() []byte { + if x != nil { + return x.DeletionPayload } return nil } -func (m *DeletionConfirmPayloadWithSignature) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *DeletionConfirmPayloadWithSignature) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } // DeletionConfirmPayload contains payload for deletion confirmation type DeletionConfirmPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` // SpaceId is the identifier of space SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` // PeerId of receipt requester @@ -1592,210 +1571,186 @@ type DeletionConfirmPayload struct { // NetworkId is the id of a network where the deletion was requested NetworkId string `protobuf:"bytes,4,opt,name=networkId,proto3" json:"networkId,omitempty"` // Timestamp is a timestamp when the deletion was requested - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DeletionConfirmPayload) Reset() { *m = DeletionConfirmPayload{} } -func (m *DeletionConfirmPayload) String() string { return proto.CompactTextString(m) } -func (*DeletionConfirmPayload) ProtoMessage() {} -func (*DeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{21} -} -func (m *DeletionConfirmPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeletionConfirmPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeletionConfirmPayload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeletionConfirmPayload) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *DeletionConfirmPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeletionConfirmPayload.Merge(m, src) +func (x *DeletionConfirmPayload) Reset() { + *x = DeletionConfirmPayload{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DeletionConfirmPayload) XXX_Size() int { - return m.Size() + +func (x *DeletionConfirmPayload) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeletionConfirmPayload) XXX_DiscardUnknown() { - xxx_messageInfo_DeletionConfirmPayload.DiscardUnknown(m) + +func (*DeletionConfirmPayload) ProtoMessage() {} + +func (x *DeletionConfirmPayload) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeletionConfirmPayload proto.InternalMessageInfo +// Deprecated: Use DeletionConfirmPayload.ProtoReflect.Descriptor instead. +func (*DeletionConfirmPayload) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{21} +} -func (m *DeletionConfirmPayload) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *DeletionConfirmPayload) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *DeletionConfirmPayload) GetPeerId() string { - if m != nil { - return m.PeerId +func (x *DeletionConfirmPayload) GetPeerId() string { + if x != nil { + return x.PeerId } return "" } -func (m *DeletionConfirmPayload) GetAccountIdentity() []byte { - if m != nil { - return m.AccountIdentity +func (x *DeletionConfirmPayload) GetAccountIdentity() []byte { + if x != nil { + return x.AccountIdentity } return nil } -func (m *DeletionConfirmPayload) GetNetworkId() string { - if m != nil { - return m.NetworkId +func (x *DeletionConfirmPayload) GetNetworkId() string { + if x != nil { + return x.NetworkId } return "" } -func (m *DeletionConfirmPayload) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *DeletionConfirmPayload) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } type DeletionLogRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // AfterId is the last known logId to request records after this id. If it is empty will be returned a list from the beginning. AfterId string `protobuf:"bytes,1,opt,name=afterId,proto3" json:"afterId,omitempty"` // Limit is a desired record count in response - Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DeletionLogRequest) Reset() { *m = DeletionLogRequest{} } -func (m *DeletionLogRequest) String() string { return proto.CompactTextString(m) } -func (*DeletionLogRequest) ProtoMessage() {} -func (*DeletionLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{22} -} -func (m *DeletionLogRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeletionLogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeletionLogRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *DeletionLogRequest) Reset() { + *x = DeletionLogRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DeletionLogRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *DeletionLogRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeletionLogRequest.Merge(m, src) -} -func (m *DeletionLogRequest) XXX_Size() int { - return m.Size() + +func (x *DeletionLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeletionLogRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeletionLogRequest.DiscardUnknown(m) + +func (*DeletionLogRequest) ProtoMessage() {} + +func (x *DeletionLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_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) } -var xxx_messageInfo_DeletionLogRequest proto.InternalMessageInfo +// Deprecated: Use DeletionLogRequest.ProtoReflect.Descriptor instead. +func (*DeletionLogRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{22} +} -func (m *DeletionLogRequest) GetAfterId() string { - if m != nil { - return m.AfterId +func (x *DeletionLogRequest) GetAfterId() string { + if x != nil { + return x.AfterId } return "" } -func (m *DeletionLogRequest) GetLimit() uint32 { - if m != nil { - return m.Limit +func (x *DeletionLogRequest) GetLimit() uint32 { + if x != nil { + return x.Limit } return 0 } type DeletionLogResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` // DeletionLogRecord list of records, if there are no new records will be empty Records []*DeletionLogRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` // HasMore indicates if there are records left - HasMore bool `protobuf:"varint,2,opt,name=hasMore,proto3" json:"hasMore,omitempty"` + HasMore bool `protobuf:"varint,2,opt,name=hasMore,proto3" json:"hasMore,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DeletionLogResponse) Reset() { *m = DeletionLogResponse{} } -func (m *DeletionLogResponse) String() string { return proto.CompactTextString(m) } -func (*DeletionLogResponse) ProtoMessage() {} -func (*DeletionLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{23} -} -func (m *DeletionLogResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeletionLogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeletionLogResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeletionLogResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *DeletionLogResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeletionLogResponse.Merge(m, src) +func (x *DeletionLogResponse) Reset() { + *x = DeletionLogResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DeletionLogResponse) XXX_Size() int { - return m.Size() + +func (x *DeletionLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeletionLogResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeletionLogResponse.DiscardUnknown(m) + +func (*DeletionLogResponse) ProtoMessage() {} + +func (x *DeletionLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_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) } -var xxx_messageInfo_DeletionLogResponse proto.InternalMessageInfo +// Deprecated: Use DeletionLogResponse.ProtoReflect.Descriptor instead. +func (*DeletionLogResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{23} +} -func (m *DeletionLogResponse) GetRecords() []*DeletionLogRecord { - if m != nil { - return m.Records +func (x *DeletionLogResponse) GetRecords() []*DeletionLogRecord { + if x != nil { + return x.Records } return nil } -func (m *DeletionLogResponse) GetHasMore() bool { - if m != nil { - return m.HasMore +func (x *DeletionLogResponse) GetHasMore() bool { + if x != nil { + return x.HasMore } return false } type DeletionLogRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` // Id is a record id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // SpaceId is a space identifier @@ -1805,278 +1760,246 @@ type DeletionLogRecord struct { // Timestamp is a unixtimestamp of record creation Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // FileGroup is a key of group for file nodes - FileGroup string `protobuf:"bytes,5,opt,name=fileGroup,proto3" json:"fileGroup,omitempty"` + FileGroup string `protobuf:"bytes,5,opt,name=fileGroup,proto3" json:"fileGroup,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DeletionLogRecord) Reset() { *m = DeletionLogRecord{} } -func (m *DeletionLogRecord) String() string { return proto.CompactTextString(m) } -func (*DeletionLogRecord) ProtoMessage() {} -func (*DeletionLogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{24} -} -func (m *DeletionLogRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeletionLogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeletionLogRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeletionLogRecord) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *DeletionLogRecord) Reset() { + *x = DeletionLogRecord{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DeletionLogRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeletionLogRecord.Merge(m, src) -} -func (m *DeletionLogRecord) XXX_Size() int { - return m.Size() + +func (x *DeletionLogRecord) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeletionLogRecord) XXX_DiscardUnknown() { - xxx_messageInfo_DeletionLogRecord.DiscardUnknown(m) + +func (*DeletionLogRecord) ProtoMessage() {} + +func (x *DeletionLogRecord) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DeletionLogRecord proto.InternalMessageInfo +// Deprecated: Use DeletionLogRecord.ProtoReflect.Descriptor instead. +func (*DeletionLogRecord) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{24} +} -func (m *DeletionLogRecord) GetId() string { - if m != nil { - return m.Id +func (x *DeletionLogRecord) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *DeletionLogRecord) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *DeletionLogRecord) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *DeletionLogRecord) GetStatus() DeletionLogRecordStatus { - if m != nil { - return m.Status +func (x *DeletionLogRecord) GetStatus() DeletionLogRecordStatus { + if x != nil { + return x.Status } return DeletionLogRecordStatus_Ok } -func (m *DeletionLogRecord) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *DeletionLogRecord) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *DeletionLogRecord) GetFileGroup() string { - if m != nil { - return m.FileGroup +func (x *DeletionLogRecord) GetFileGroup() string { + if x != nil { + return x.FileGroup } return "" } // SpaceDeleteRequest contains the deletion confirmation for the space to be deleted type SpaceDeleteRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - DeletionPayloadId string `protobuf:"bytes,2,opt,name=deletionPayloadId,proto3" json:"deletionPayloadId,omitempty"` - DeletionPayload []byte `protobuf:"bytes,3,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` - DeletionDuration int64 `protobuf:"varint,4,opt,name=deletionDuration,proto3" json:"deletionDuration,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + DeletionPayloadId string `protobuf:"bytes,2,opt,name=deletionPayloadId,proto3" json:"deletionPayloadId,omitempty"` + DeletionPayload []byte `protobuf:"bytes,3,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` + DeletionDuration int64 `protobuf:"varint,4,opt,name=deletionDuration,proto3" json:"deletionDuration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceDeleteRequest) Reset() { *m = SpaceDeleteRequest{} } -func (m *SpaceDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*SpaceDeleteRequest) ProtoMessage() {} -func (*SpaceDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{25} -} -func (m *SpaceDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SpaceDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceDeleteRequest.Merge(m, src) +func (x *SpaceDeleteRequest) Reset() { + *x = SpaceDeleteRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceDeleteRequest) XXX_Size() int { - return m.Size() + +func (x *SpaceDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceDeleteRequest.DiscardUnknown(m) + +func (*SpaceDeleteRequest) ProtoMessage() {} + +func (x *SpaceDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceDeleteRequest proto.InternalMessageInfo +// Deprecated: Use SpaceDeleteRequest.ProtoReflect.Descriptor instead. +func (*SpaceDeleteRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{25} +} -func (m *SpaceDeleteRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *SpaceDeleteRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *SpaceDeleteRequest) GetDeletionPayloadId() string { - if m != nil { - return m.DeletionPayloadId +func (x *SpaceDeleteRequest) GetDeletionPayloadId() string { + if x != nil { + return x.DeletionPayloadId } return "" } -func (m *SpaceDeleteRequest) GetDeletionPayload() []byte { - if m != nil { - return m.DeletionPayload +func (x *SpaceDeleteRequest) GetDeletionPayload() []byte { + if x != nil { + return x.DeletionPayload } return nil } -func (m *SpaceDeleteRequest) GetDeletionDuration() int64 { - if m != nil { - return m.DeletionDuration +func (x *SpaceDeleteRequest) GetDeletionDuration() int64 { + if x != nil { + return x.DeletionDuration } return 0 } // SpaceDeleteResponse contains timestamp when the space is finally deleted type SpaceDeleteResponse struct { - ToBeDeletedTimestamp int64 `protobuf:"varint,1,opt,name=toBeDeletedTimestamp,proto3" json:"toBeDeletedTimestamp,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ToBeDeletedTimestamp int64 `protobuf:"varint,1,opt,name=toBeDeletedTimestamp,proto3" json:"toBeDeletedTimestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceDeleteResponse) Reset() { *m = SpaceDeleteResponse{} } -func (m *SpaceDeleteResponse) String() string { return proto.CompactTextString(m) } -func (*SpaceDeleteResponse) ProtoMessage() {} -func (*SpaceDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{26} -} -func (m *SpaceDeleteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpaceDeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpaceDeleteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *SpaceDeleteResponse) Reset() { + *x = SpaceDeleteResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceDeleteResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *SpaceDeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceDeleteResponse.Merge(m, src) -} -func (m *SpaceDeleteResponse) XXX_Size() int { - return m.Size() + +func (x *SpaceDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceDeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceDeleteResponse.DiscardUnknown(m) + +func (*SpaceDeleteResponse) ProtoMessage() {} + +func (x *SpaceDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpaceDeleteResponse proto.InternalMessageInfo +// Deprecated: Use SpaceDeleteResponse.ProtoReflect.Descriptor instead. +func (*SpaceDeleteResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{26} +} -func (m *SpaceDeleteResponse) GetToBeDeletedTimestamp() int64 { - if m != nil { - return m.ToBeDeletedTimestamp +func (x *SpaceDeleteResponse) GetToBeDeletedTimestamp() int64 { + if x != nil { + return x.ToBeDeletedTimestamp } return 0 } // AccountDeleteRequest contains payload for account deletion type AccountDeleteRequest struct { - DeletionPayloadId string `protobuf:"bytes,1,opt,name=deletionPayloadId,proto3" json:"deletionPayloadId,omitempty"` - DeletionPayload []byte `protobuf:"bytes,2,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DeletionPayloadId string `protobuf:"bytes,1,opt,name=deletionPayloadId,proto3" json:"deletionPayloadId,omitempty"` + DeletionPayload []byte `protobuf:"bytes,2,opt,name=deletionPayload,proto3" json:"deletionPayload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountDeleteRequest) Reset() { *m = AccountDeleteRequest{} } -func (m *AccountDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*AccountDeleteRequest) ProtoMessage() {} -func (*AccountDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{27} -} -func (m *AccountDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AccountDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountDeleteRequest.Merge(m, src) +func (x *AccountDeleteRequest) Reset() { + *x = AccountDeleteRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountDeleteRequest) XXX_Size() int { - return m.Size() + +func (x *AccountDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountDeleteRequest.DiscardUnknown(m) + +func (*AccountDeleteRequest) ProtoMessage() {} + +func (x *AccountDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountDeleteRequest proto.InternalMessageInfo +// Deprecated: Use AccountDeleteRequest.ProtoReflect.Descriptor instead. +func (*AccountDeleteRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{27} +} -func (m *AccountDeleteRequest) GetDeletionPayloadId() string { - if m != nil { - return m.DeletionPayloadId +func (x *AccountDeleteRequest) GetDeletionPayloadId() string { + if x != nil { + return x.DeletionPayloadId } return "" } -func (m *AccountDeleteRequest) GetDeletionPayload() []byte { - if m != nil { - return m.DeletionPayload +func (x *AccountDeleteRequest) GetDeletionPayload() []byte { + if x != nil { + return x.DeletionPayload } return nil } // AccountDeletionConfirmPayload contains payload for deletion confirmation type AccountDeletionConfirmPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` // PeerId of receipt requester PeerId string `protobuf:"bytes,1,opt,name=peerId,proto3" json:"peerId,omitempty"` // AccountIdentity is an identity of a space owner @@ -2084,8218 +2007,1286 @@ type AccountDeletionConfirmPayload struct { // NetworkId is the id of a network where the deletion was requested NetworkId string `protobuf:"bytes,3,opt,name=networkId,proto3" json:"networkId,omitempty"` // Timestamp is a timestamp when the deletion was requested - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountDeletionConfirmPayload) Reset() { *m = AccountDeletionConfirmPayload{} } -func (m *AccountDeletionConfirmPayload) String() string { return proto.CompactTextString(m) } -func (*AccountDeletionConfirmPayload) ProtoMessage() {} -func (*AccountDeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{28} -} -func (m *AccountDeletionConfirmPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountDeletionConfirmPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountDeletionConfirmPayload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountDeletionConfirmPayload) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AccountDeletionConfirmPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountDeletionConfirmPayload.Merge(m, src) +func (x *AccountDeletionConfirmPayload) Reset() { + *x = AccountDeletionConfirmPayload{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountDeletionConfirmPayload) XXX_Size() int { - return m.Size() + +func (x *AccountDeletionConfirmPayload) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountDeletionConfirmPayload) XXX_DiscardUnknown() { - xxx_messageInfo_AccountDeletionConfirmPayload.DiscardUnknown(m) + +func (*AccountDeletionConfirmPayload) ProtoMessage() {} + +func (x *AccountDeletionConfirmPayload) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountDeletionConfirmPayload proto.InternalMessageInfo +// Deprecated: Use AccountDeletionConfirmPayload.ProtoReflect.Descriptor instead. +func (*AccountDeletionConfirmPayload) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{28} +} -func (m *AccountDeletionConfirmPayload) GetPeerId() string { - if m != nil { - return m.PeerId +func (x *AccountDeletionConfirmPayload) GetPeerId() string { + if x != nil { + return x.PeerId } return "" } -func (m *AccountDeletionConfirmPayload) GetAccountIdentity() []byte { - if m != nil { - return m.AccountIdentity +func (x *AccountDeletionConfirmPayload) GetAccountIdentity() []byte { + if x != nil { + return x.AccountIdentity } return nil } -func (m *AccountDeletionConfirmPayload) GetNetworkId() string { - if m != nil { - return m.NetworkId +func (x *AccountDeletionConfirmPayload) GetNetworkId() string { + if x != nil { + return x.NetworkId } return "" } -func (m *AccountDeletionConfirmPayload) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *AccountDeletionConfirmPayload) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } // AccountDeleteResponse contains timestamp when the account is finally deleted type AccountDeleteResponse struct { - ToBeDeletedTimestamp int64 `protobuf:"varint,1,opt,name=toBeDeletedTimestamp,proto3" json:"toBeDeletedTimestamp,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ToBeDeletedTimestamp int64 `protobuf:"varint,1,opt,name=toBeDeletedTimestamp,proto3" json:"toBeDeletedTimestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountDeleteResponse) Reset() { *m = AccountDeleteResponse{} } -func (m *AccountDeleteResponse) String() string { return proto.CompactTextString(m) } -func (*AccountDeleteResponse) ProtoMessage() {} -func (*AccountDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{29} -} -func (m *AccountDeleteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountDeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountDeleteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AccountDeleteResponse) Reset() { + *x = AccountDeleteResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountDeleteResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AccountDeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountDeleteResponse.Merge(m, src) -} -func (m *AccountDeleteResponse) XXX_Size() int { - return m.Size() + +func (x *AccountDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountDeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountDeleteResponse.DiscardUnknown(m) + +func (*AccountDeleteResponse) ProtoMessage() {} + +func (x *AccountDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountDeleteResponse proto.InternalMessageInfo +// Deprecated: Use AccountDeleteResponse.ProtoReflect.Descriptor instead. +func (*AccountDeleteResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{29} +} -func (m *AccountDeleteResponse) GetToBeDeletedTimestamp() int64 { - if m != nil { - return m.ToBeDeletedTimestamp +func (x *AccountDeleteResponse) GetToBeDeletedTimestamp() int64 { + if x != nil { + return x.ToBeDeletedTimestamp } return 0 } // AccountRevertDeletionRequest is a request to revert an account deletion type AccountRevertDeletionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountRevertDeletionRequest) Reset() { *m = AccountRevertDeletionRequest{} } -func (m *AccountRevertDeletionRequest) String() string { return proto.CompactTextString(m) } -func (*AccountRevertDeletionRequest) ProtoMessage() {} -func (*AccountRevertDeletionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{30} -} -func (m *AccountRevertDeletionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountRevertDeletionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountRevertDeletionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountRevertDeletionRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AccountRevertDeletionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountRevertDeletionRequest.Merge(m, src) +func (x *AccountRevertDeletionRequest) Reset() { + *x = AccountRevertDeletionRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountRevertDeletionRequest) XXX_Size() int { - return m.Size() + +func (x *AccountRevertDeletionRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountRevertDeletionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountRevertDeletionRequest.DiscardUnknown(m) + +func (*AccountRevertDeletionRequest) ProtoMessage() {} + +func (x *AccountRevertDeletionRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountRevertDeletionRequest proto.InternalMessageInfo +// Deprecated: Use AccountRevertDeletionRequest.ProtoReflect.Descriptor instead. +func (*AccountRevertDeletionRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{30} +} // AccountRevertDeletionResponse is an empty response confirming that the deletion is reverted type AccountRevertDeletionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountRevertDeletionResponse) Reset() { *m = AccountRevertDeletionResponse{} } -func (m *AccountRevertDeletionResponse) String() string { return proto.CompactTextString(m) } -func (*AccountRevertDeletionResponse) ProtoMessage() {} -func (*AccountRevertDeletionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{31} -} -func (m *AccountRevertDeletionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountRevertDeletionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountRevertDeletionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccountRevertDeletionResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AccountRevertDeletionResponse) Reset() { + *x = AccountRevertDeletionResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountRevertDeletionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountRevertDeletionResponse.Merge(m, src) -} -func (m *AccountRevertDeletionResponse) XXX_Size() int { - return m.Size() + +func (x *AccountRevertDeletionResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountRevertDeletionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountRevertDeletionResponse.DiscardUnknown(m) + +func (*AccountRevertDeletionResponse) ProtoMessage() {} + +func (x *AccountRevertDeletionResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountRevertDeletionResponse proto.InternalMessageInfo +// Deprecated: Use AccountRevertDeletionResponse.ProtoReflect.Descriptor instead. +func (*AccountRevertDeletionResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{31} +} // AclAddRecordRequest contains marshaled consensusproto.RawRecord type AclAddRecordRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAddRecordRequest) Reset() { *m = AclAddRecordRequest{} } -func (m *AclAddRecordRequest) String() string { return proto.CompactTextString(m) } -func (*AclAddRecordRequest) ProtoMessage() {} -func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{32} -} -func (m *AclAddRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAddRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAddRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AclAddRecordRequest) Reset() { + *x = AclAddRecordRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAddRecordRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAddRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAddRecordRequest.Merge(m, src) -} -func (m *AclAddRecordRequest) XXX_Size() int { - return m.Size() + +func (x *AclAddRecordRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclAddRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AclAddRecordRequest.DiscardUnknown(m) + +func (*AclAddRecordRequest) ProtoMessage() {} + +func (x *AclAddRecordRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AclAddRecordRequest proto.InternalMessageInfo +// Deprecated: Use AclAddRecordRequest.ProtoReflect.Descriptor instead. +func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{32} +} -func (m *AclAddRecordRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *AclAddRecordRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *AclAddRecordRequest) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *AclAddRecordRequest) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } // AclAddRecordResponse contains created record id and marshaled consensusproto.RawRecord type AclAddRecordResponse struct { - RecordId string `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RecordId string `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclAddRecordResponse) Reset() { *m = AclAddRecordResponse{} } -func (m *AclAddRecordResponse) String() string { return proto.CompactTextString(m) } -func (*AclAddRecordResponse) ProtoMessage() {} -func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{33} -} -func (m *AclAddRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclAddRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclAddRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclAddRecordResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclAddRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclAddRecordResponse.Merge(m, src) -} -func (m *AclAddRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *AclAddRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AclAddRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AclAddRecordResponse proto.InternalMessageInfo - -func (m *AclAddRecordResponse) GetRecordId() string { - if m != nil { - return m.RecordId - } - return "" +func (x *AclAddRecordResponse) Reset() { + *x = AclAddRecordResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclAddRecordResponse) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil +func (x *AclAddRecordResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -// AclGetRecordsRequest can optionally contain the last known aclHead, the server will return only new records or an empty list if there are no new records. -// If aclHead is not provided the whole list will be returned. -type AclGetRecordsRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` -} +func (*AclAddRecordResponse) ProtoMessage() {} -func (m *AclGetRecordsRequest) Reset() { *m = AclGetRecordsRequest{} } -func (m *AclGetRecordsRequest) String() string { return proto.CompactTextString(m) } -func (*AclGetRecordsRequest) ProtoMessage() {} -func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{34} -} -func (m *AclGetRecordsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclGetRecordsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclGetRecordsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *AclAddRecordResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *AclGetRecordsRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *AclGetRecordsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclGetRecordsRequest.Merge(m, src) -} -func (m *AclGetRecordsRequest) XXX_Size() int { - return m.Size() -} -func (m *AclGetRecordsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AclGetRecordsRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_AclGetRecordsRequest proto.InternalMessageInfo +// Deprecated: Use AclAddRecordResponse.ProtoReflect.Descriptor instead. +func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{33} +} -func (m *AclGetRecordsRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *AclAddRecordResponse) GetRecordId() string { + if x != nil { + return x.RecordId } return "" } -func (m *AclGetRecordsRequest) GetAclHead() string { - if m != nil { - return m.AclHead +func (x *AclAddRecordResponse) GetPayload() []byte { + if x != nil { + return x.Payload } - return "" + return nil } -// AclGetRecordsResponse contains list of marshaled consensusproto.RawRecordWithId -type AclGetRecordsResponse struct { - Records [][]byte `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` +// AclGetRecordsRequest can optionally contain the last known aclHead, the server will return only new records or an empty list if there are no new records. +// If aclHead is not provided the whole list will be returned. +type AclGetRecordsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclGetRecordsResponse) Reset() { *m = AclGetRecordsResponse{} } -func (m *AclGetRecordsResponse) String() string { return proto.CompactTextString(m) } -func (*AclGetRecordsResponse) ProtoMessage() {} -func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{35} -} -func (m *AclGetRecordsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclGetRecordsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclGetRecordsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclGetRecordsResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclGetRecordsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclGetRecordsResponse.Merge(m, src) -} -func (m *AclGetRecordsResponse) XXX_Size() int { - return m.Size() +func (x *AclGetRecordsRequest) Reset() { + *x = AclGetRecordsRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclGetRecordsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AclGetRecordsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AclGetRecordsResponse proto.InternalMessageInfo -func (m *AclGetRecordsResponse) GetRecords() [][]byte { - if m != nil { - return m.Records - } - return nil +func (x *AclGetRecordsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -type AccountLimitsSetRequest struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` - FileStorageLimitBytes uint64 `protobuf:"varint,3,opt,name=fileStorageLimitBytes,proto3" json:"fileStorageLimitBytes,omitempty"` - SpaceMembersRead uint32 `protobuf:"varint,4,opt,name=spaceMembersRead,proto3" json:"spaceMembersRead,omitempty"` - SpaceMembersWrite uint32 `protobuf:"varint,5,opt,name=spaceMembersWrite,proto3" json:"spaceMembersWrite,omitempty"` - SharedSpacesLimit uint32 `protobuf:"varint,6,opt,name=sharedSpacesLimit,proto3" json:"sharedSpacesLimit,omitempty"` -} +func (*AclGetRecordsRequest) ProtoMessage() {} -func (m *AccountLimitsSetRequest) Reset() { *m = AccountLimitsSetRequest{} } -func (m *AccountLimitsSetRequest) String() string { return proto.CompactTextString(m) } -func (*AccountLimitsSetRequest) ProtoMessage() {} -func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{36} -} -func (m *AccountLimitsSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountLimitsSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountLimitsSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *AclGetRecordsRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *AccountLimitsSetRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *AccountLimitsSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountLimitsSetRequest.Merge(m, src) -} -func (m *AccountLimitsSetRequest) XXX_Size() int { - return m.Size() -} -func (m *AccountLimitsSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AccountLimitsSetRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_AccountLimitsSetRequest proto.InternalMessageInfo - -func (m *AccountLimitsSetRequest) GetIdentity() string { - if m != nil { - return m.Identity - } - return "" +// Deprecated: Use AclGetRecordsRequest.ProtoReflect.Descriptor instead. +func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{34} } -func (m *AccountLimitsSetRequest) GetReason() string { - if m != nil { - return m.Reason +func (x *AclGetRecordsRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *AccountLimitsSetRequest) GetFileStorageLimitBytes() uint64 { - if m != nil { - return m.FileStorageLimitBytes +func (x *AclGetRecordsRequest) GetAclHead() string { + if x != nil { + return x.AclHead } - return 0 + return "" } -func (m *AccountLimitsSetRequest) GetSpaceMembersRead() uint32 { - if m != nil { - return m.SpaceMembersRead - } - return 0 +// AclGetRecordsResponse contains list of marshaled consensusproto.RawRecordWithId +type AclGetRecordsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Records [][]byte `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountLimitsSetRequest) GetSpaceMembersWrite() uint32 { - if m != nil { - return m.SpaceMembersWrite - } - return 0 +func (x *AclGetRecordsResponse) Reset() { + *x = AclGetRecordsResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountLimitsSetRequest) GetSharedSpacesLimit() uint32 { - if m != nil { - return m.SharedSpacesLimit - } - return 0 +func (x *AclGetRecordsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -type AccountLimitsSetResponse struct { -} +func (*AclGetRecordsResponse) ProtoMessage() {} -func (m *AccountLimitsSetResponse) Reset() { *m = AccountLimitsSetResponse{} } -func (m *AccountLimitsSetResponse) String() string { return proto.CompactTextString(m) } -func (*AccountLimitsSetResponse) ProtoMessage() {} -func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{37} -} -func (m *AccountLimitsSetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountLimitsSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountLimitsSetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *AclGetRecordsResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *AccountLimitsSetResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *AccountLimitsSetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountLimitsSetResponse.Merge(m, src) -} -func (m *AccountLimitsSetResponse) XXX_Size() int { - return m.Size() -} -func (m *AccountLimitsSetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AccountLimitsSetResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_AccountLimitsSetResponse proto.InternalMessageInfo - -type AclEventLogRequest struct { - AccountIdentity string `protobuf:"bytes,1,opt,name=accountIdentity,proto3" json:"accountIdentity,omitempty"` - // AfterId is the last known logId to request records after this id. If it is empty will be returned a list from the beginning. - AfterId string `protobuf:"bytes,2,opt,name=afterId,proto3" json:"afterId,omitempty"` - // Limit is a desired record count in response - Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` +// Deprecated: Use AclGetRecordsResponse.ProtoReflect.Descriptor instead. +func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{35} } -func (m *AclEventLogRequest) Reset() { *m = AclEventLogRequest{} } -func (m *AclEventLogRequest) String() string { return proto.CompactTextString(m) } -func (*AclEventLogRequest) ProtoMessage() {} -func (*AclEventLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{38} -} -func (m *AclEventLogRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclEventLogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclEventLogRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclEventLogRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *AclGetRecordsResponse) GetRecords() [][]byte { + if x != nil { + return x.Records } - return b, nil -} -func (m *AclEventLogRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclEventLogRequest.Merge(m, src) -} -func (m *AclEventLogRequest) XXX_Size() int { - return m.Size() -} -func (m *AclEventLogRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AclEventLogRequest.DiscardUnknown(m) + return nil } -var xxx_messageInfo_AclEventLogRequest proto.InternalMessageInfo - -func (m *AclEventLogRequest) GetAccountIdentity() string { - if m != nil { - return m.AccountIdentity - } - return "" +type AccountLimitsSetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + FileStorageLimitBytes uint64 `protobuf:"varint,3,opt,name=fileStorageLimitBytes,proto3" json:"fileStorageLimitBytes,omitempty"` + SpaceMembersRead uint32 `protobuf:"varint,4,opt,name=spaceMembersRead,proto3" json:"spaceMembersRead,omitempty"` + SpaceMembersWrite uint32 `protobuf:"varint,5,opt,name=spaceMembersWrite,proto3" json:"spaceMembersWrite,omitempty"` + SharedSpacesLimit uint32 `protobuf:"varint,6,opt,name=sharedSpacesLimit,proto3" json:"sharedSpacesLimit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AclEventLogRequest) GetAfterId() string { - if m != nil { - return m.AfterId - } - return "" +func (x *AccountLimitsSetRequest) Reset() { + *x = AccountLimitsSetRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AclEventLogRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 +func (x *AccountLimitsSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -type AclEventLogResponse struct { - // AclEventLogRecord list of records, if there are no new records will be empty - Records []*AclEventLogRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` - // HasMore indicates if there are records left - HasMore bool `protobuf:"varint,2,opt,name=hasMore,proto3" json:"hasMore,omitempty"` -} +func (*AccountLimitsSetRequest) ProtoMessage() {} -func (m *AclEventLogResponse) Reset() { *m = AclEventLogResponse{} } -func (m *AclEventLogResponse) String() string { return proto.CompactTextString(m) } -func (*AclEventLogResponse) ProtoMessage() {} -func (*AclEventLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{39} -} -func (m *AclEventLogResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclEventLogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclEventLogResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *AccountLimitsSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *AclEventLogResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclEventLogResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclEventLogResponse.Merge(m, src) -} -func (m *AclEventLogResponse) XXX_Size() int { - return m.Size() -} -func (m *AclEventLogResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AclEventLogResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AclEventLogResponse proto.InternalMessageInfo - -func (m *AclEventLogResponse) GetRecords() []*AclEventLogRecord { - if m != nil { - return m.Records - } - return nil -} - -func (m *AclEventLogResponse) GetHasMore() bool { - if m != nil { - return m.HasMore + return ms } - return false -} - -type AclEventLogRecord struct { - // Id is a record id - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // SpaceId is a space identifier - SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - // Timestamp is a unixtimestamp of record creation - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Type of current event - Type AclEventLogRecordType `protobuf:"varint,4,opt,name=type,proto3,enum=coordinator.AclEventLogRecordType" json:"type,omitempty"` - // only for RecordTypeSpaceAclAddRecord - AclChangeId string `protobuf:"bytes,5,opt,name=aclChangeId,proto3" json:"aclChangeId,omitempty"` + return mi.MessageOf(x) } -func (m *AclEventLogRecord) Reset() { *m = AclEventLogRecord{} } -func (m *AclEventLogRecord) String() string { return proto.CompactTextString(m) } -func (*AclEventLogRecord) ProtoMessage() {} -func (*AclEventLogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{40} -} -func (m *AclEventLogRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AclEventLogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AclEventLogRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AclEventLogRecord) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AclEventLogRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_AclEventLogRecord.Merge(m, src) -} -func (m *AclEventLogRecord) XXX_Size() int { - return m.Size() -} -func (m *AclEventLogRecord) XXX_DiscardUnknown() { - xxx_messageInfo_AclEventLogRecord.DiscardUnknown(m) +// Deprecated: Use AccountLimitsSetRequest.ProtoReflect.Descriptor instead. +func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{36} } -var xxx_messageInfo_AclEventLogRecord proto.InternalMessageInfo - -func (m *AclEventLogRecord) GetId() string { - if m != nil { - return m.Id +func (x *AccountLimitsSetRequest) GetIdentity() string { + if x != nil { + return x.Identity } return "" } -func (m *AclEventLogRecord) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *AccountLimitsSetRequest) GetReason() string { + if x != nil { + return x.Reason } return "" } -func (m *AclEventLogRecord) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *AccountLimitsSetRequest) GetFileStorageLimitBytes() uint64 { + if x != nil { + return x.FileStorageLimitBytes } return 0 } -func (m *AclEventLogRecord) GetType() AclEventLogRecordType { - if m != nil { - return m.Type +func (x *AccountLimitsSetRequest) GetSpaceMembersRead() uint32 { + if x != nil { + return x.SpaceMembersRead } - return AclEventLogRecordType_RecordTypeSpaceReceipt + return 0 } -func (m *AclEventLogRecord) GetAclChangeId() string { - if m != nil { - return m.AclChangeId +func (x *AccountLimitsSetRequest) GetSpaceMembersWrite() uint32 { + if x != nil { + return x.SpaceMembersWrite } - return "" + return 0 } -func init() { - proto.RegisterEnum("coordinator.ErrorCodes", ErrorCodes_name, ErrorCodes_value) - proto.RegisterEnum("coordinator.SpaceStatus", SpaceStatus_name, SpaceStatus_value) - proto.RegisterEnum("coordinator.SpacePermissions", SpacePermissions_name, SpacePermissions_value) - proto.RegisterEnum("coordinator.NodeType", NodeType_name, NodeType_value) - proto.RegisterEnum("coordinator.DeletionPayloadType", DeletionPayloadType_name, DeletionPayloadType_value) - proto.RegisterEnum("coordinator.DeletionLogRecordStatus", DeletionLogRecordStatus_name, DeletionLogRecordStatus_value) - proto.RegisterEnum("coordinator.AclEventLogRecordType", AclEventLogRecordType_name, AclEventLogRecordType_value) - proto.RegisterType((*SpaceSignRequest)(nil), "coordinator.SpaceSignRequest") - proto.RegisterType((*SpaceLimits)(nil), "coordinator.SpaceLimits") - proto.RegisterType((*SpaceStatusPayload)(nil), "coordinator.SpaceStatusPayload") - proto.RegisterType((*SpaceSignResponse)(nil), "coordinator.SpaceSignResponse") - proto.RegisterType((*SpaceReceiptWithSignature)(nil), "coordinator.SpaceReceiptWithSignature") - proto.RegisterType((*SpaceReceipt)(nil), "coordinator.SpaceReceipt") - proto.RegisterType((*SpaceStatusCheckRequest)(nil), "coordinator.SpaceStatusCheckRequest") - proto.RegisterType((*SpaceStatusCheckResponse)(nil), "coordinator.SpaceStatusCheckResponse") - proto.RegisterType((*SpaceStatusCheckManyRequest)(nil), "coordinator.SpaceStatusCheckManyRequest") - proto.RegisterType((*SpaceStatusCheckManyResponse)(nil), "coordinator.SpaceStatusCheckManyResponse") - proto.RegisterType((*AccountLimits)(nil), "coordinator.AccountLimits") - proto.RegisterType((*SpaceStatusChangeRequest)(nil), "coordinator.SpaceStatusChangeRequest") - proto.RegisterType((*SpaceStatusChangeResponse)(nil), "coordinator.SpaceStatusChangeResponse") - proto.RegisterType((*SpaceMakeShareableRequest)(nil), "coordinator.SpaceMakeShareableRequest") - proto.RegisterType((*SpaceMakeShareableResponse)(nil), "coordinator.SpaceMakeShareableResponse") - proto.RegisterType((*SpaceMakeUnshareableRequest)(nil), "coordinator.SpaceMakeUnshareableRequest") - proto.RegisterType((*SpaceMakeUnshareableResponse)(nil), "coordinator.SpaceMakeUnshareableResponse") - proto.RegisterType((*NetworkConfigurationRequest)(nil), "coordinator.NetworkConfigurationRequest") - proto.RegisterType((*NetworkConfigurationResponse)(nil), "coordinator.NetworkConfigurationResponse") - proto.RegisterType((*Node)(nil), "coordinator.Node") - proto.RegisterType((*DeletionConfirmPayloadWithSignature)(nil), "coordinator.DeletionConfirmPayloadWithSignature") - proto.RegisterType((*DeletionConfirmPayload)(nil), "coordinator.DeletionConfirmPayload") - proto.RegisterType((*DeletionLogRequest)(nil), "coordinator.DeletionLogRequest") - proto.RegisterType((*DeletionLogResponse)(nil), "coordinator.DeletionLogResponse") - proto.RegisterType((*DeletionLogRecord)(nil), "coordinator.DeletionLogRecord") - proto.RegisterType((*SpaceDeleteRequest)(nil), "coordinator.SpaceDeleteRequest") - proto.RegisterType((*SpaceDeleteResponse)(nil), "coordinator.SpaceDeleteResponse") - proto.RegisterType((*AccountDeleteRequest)(nil), "coordinator.AccountDeleteRequest") - proto.RegisterType((*AccountDeletionConfirmPayload)(nil), "coordinator.AccountDeletionConfirmPayload") - proto.RegisterType((*AccountDeleteResponse)(nil), "coordinator.AccountDeleteResponse") - proto.RegisterType((*AccountRevertDeletionRequest)(nil), "coordinator.AccountRevertDeletionRequest") - proto.RegisterType((*AccountRevertDeletionResponse)(nil), "coordinator.AccountRevertDeletionResponse") - proto.RegisterType((*AclAddRecordRequest)(nil), "coordinator.AclAddRecordRequest") - proto.RegisterType((*AclAddRecordResponse)(nil), "coordinator.AclAddRecordResponse") - proto.RegisterType((*AclGetRecordsRequest)(nil), "coordinator.AclGetRecordsRequest") - proto.RegisterType((*AclGetRecordsResponse)(nil), "coordinator.AclGetRecordsResponse") - proto.RegisterType((*AccountLimitsSetRequest)(nil), "coordinator.AccountLimitsSetRequest") - proto.RegisterType((*AccountLimitsSetResponse)(nil), "coordinator.AccountLimitsSetResponse") - proto.RegisterType((*AclEventLogRequest)(nil), "coordinator.AclEventLogRequest") - proto.RegisterType((*AclEventLogResponse)(nil), "coordinator.AclEventLogResponse") - proto.RegisterType((*AclEventLogRecord)(nil), "coordinator.AclEventLogRecord") -} - -func init() { - proto.RegisterFile("coordinator/coordinatorproto/protos/coordinator.proto", fileDescriptor_d94f6f99586adae2) -} - -var fileDescriptor_d94f6f99586adae2 = []byte{ - // 2031 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0x3d, 0x73, 0x1b, 0xc7, - 0x95, 0x77, 0x00, 0x49, 0xe0, 0x81, 0xa4, 0x8e, 0x4b, 0x52, 0x82, 0x21, 0x18, 0x82, 0x2f, 0x8e, - 0x4d, 0x23, 0x19, 0xdb, 0x81, 0x63, 0x4f, 0x34, 0x4e, 0x26, 0xa2, 0x28, 0xd9, 0x81, 0x22, 0x52, - 0xcc, 0x51, 0xb4, 0x67, 0xd2, 0x78, 0x8e, 0x77, 0x4b, 0xf2, 0x86, 0xc0, 0x1e, 0xb2, 0xb7, 0x24, - 0xc5, 0x3a, 0x65, 0x52, 0xa4, 0x4b, 0x9a, 0xf4, 0x29, 0x52, 0x64, 0x32, 0x93, 0x49, 0x91, 0x99, - 0xd4, 0x29, 0x5d, 0xa6, 0xf4, 0x48, 0x7f, 0x22, 0x65, 0x66, 0xf7, 0xf6, 0x0e, 0xbb, 0x7b, 0x07, - 0x10, 0x1e, 0x15, 0x6e, 0x48, 0xee, 0xfb, 0xde, 0x77, 0xef, 0x6b, 0x1f, 0xe1, 0xe3, 0x20, 0x8e, - 0x69, 0x18, 0x11, 0x9f, 0xc5, 0xf4, 0x03, 0xe5, 0xef, 0x31, 0x8d, 0x59, 0xfc, 0x81, 0xf8, 0x99, - 0xa8, 0xf0, 0xf7, 0x05, 0x08, 0x35, 0x14, 0x90, 0xfb, 0x6f, 0x0b, 0x9c, 0xc3, 0xb1, 0x1f, 0xe0, - 0xc3, 0xe8, 0x94, 0x78, 0xf8, 0x37, 0x17, 0x38, 0x61, 0xa8, 0x09, 0xcb, 0x09, 0x87, 0x0d, 0xc2, - 0xa6, 0xd5, 0xb5, 0xb6, 0xeb, 0x5e, 0x76, 0x44, 0xb7, 0x61, 0xe9, 0x0c, 0xfb, 0x21, 0xa6, 0x4d, - 0xbb, 0x6b, 0x6d, 0xaf, 0x78, 0xf2, 0x84, 0xba, 0xd0, 0x88, 0x87, 0xe1, 0x20, 0xc4, 0x84, 0x45, - 0xec, 0xba, 0x59, 0x11, 0x48, 0x15, 0x84, 0xfa, 0xb0, 0x49, 0xf0, 0x55, 0x76, 0xe4, 0xda, 0x7c, - 0x76, 0x41, 0x71, 0xb3, 0x2a, 0x48, 0x4b, 0x71, 0xc8, 0x85, 0x95, 0x93, 0x98, 0x06, 0x58, 0xda, - 0xd5, 0x5c, 0xec, 0x5a, 0xdb, 0x35, 0x4f, 0x83, 0xb9, 0x87, 0xd0, 0x10, 0xf6, 0x3f, 0x8d, 0x46, - 0x11, 0x4b, 0xb8, 0x21, 0x14, 0xfb, 0xe1, 0x1e, 0x1e, 0x1d, 0x63, 0x9a, 0x08, 0xf3, 0x57, 0x3d, - 0x15, 0xc4, 0x85, 0x5e, 0xd1, 0x88, 0xe1, 0x8c, 0xc4, 0x16, 0x24, 0x1a, 0xcc, 0xfd, 0xad, 0x0d, - 0x28, 0xf5, 0x0a, 0xf3, 0xd9, 0x45, 0x72, 0xe0, 0x5f, 0x0f, 0x63, 0x3f, 0x44, 0x1f, 0xc2, 0x52, - 0x22, 0x00, 0x42, 0xee, 0x5a, 0xbf, 0xf9, 0xbe, 0xea, 0x5d, 0x85, 0xc1, 0x93, 0x74, 0xe8, 0x87, - 0xb0, 0x1e, 0xe2, 0x21, 0x66, 0x51, 0x4c, 0x9e, 0x47, 0x23, 0x9c, 0x30, 0x7f, 0x34, 0x16, 0x1a, - 0x2b, 0x5e, 0x11, 0x81, 0x7e, 0x0e, 0x8d, 0x31, 0xa6, 0xa3, 0x28, 0x49, 0xa2, 0x98, 0x24, 0xc2, - 0x8b, 0x6b, 0xfd, 0x37, 0x8b, 0x4a, 0x0e, 0x26, 0x44, 0x9e, 0xca, 0xc1, 0x0d, 0x1c, 0x0a, 0x3f, - 0x08, 0xb7, 0x36, 0xca, 0x0c, 0x4c, 0xfd, 0xe4, 0x49, 0x3a, 0xd4, 0x82, 0x5a, 0x94, 0x1c, 0x9e, - 0xf9, 0x14, 0x87, 0xd2, 0xbd, 0xf9, 0xd9, 0x3d, 0x82, 0x75, 0x25, 0x34, 0x92, 0x71, 0x4c, 0x12, - 0x8c, 0x1e, 0xc0, 0x32, 0xc5, 0x01, 0x8e, 0xc6, 0x4c, 0x38, 0xa1, 0xd1, 0x7f, 0xa7, 0xa8, 0xc3, - 0x4b, 0x09, 0xbe, 0x8c, 0xd8, 0x59, 0xfe, 0x31, 0xbd, 0x8c, 0xcd, 0x3d, 0x87, 0x37, 0xa6, 0x52, - 0xa1, 0x0f, 0x61, 0x23, 0x51, 0x90, 0xd2, 0xf3, 0x42, 0xd5, 0x8a, 0x57, 0x86, 0x42, 0x6d, 0xa8, - 0x27, 0x79, 0x34, 0xa5, 0x51, 0x39, 0x01, 0xb8, 0x7f, 0xb1, 0x60, 0x45, 0xd5, 0x36, 0x3b, 0xb6, - 0xc7, 0x18, 0xd3, 0x41, 0x28, 0xa4, 0xd4, 0x3d, 0x79, 0x42, 0xdb, 0x70, 0xcb, 0x0f, 0x82, 0xf8, - 0x82, 0x30, 0x23, 0xbe, 0x4d, 0x30, 0x37, 0x85, 0x60, 0x76, 0x15, 0xd3, 0xf3, 0x41, 0x28, 0xbe, - 0x40, 0xdd, 0x9b, 0x00, 0x50, 0x07, 0xe0, 0xd2, 0x1f, 0x46, 0xe1, 0x11, 0x61, 0xd1, 0x50, 0x38, - 0xbb, 0xea, 0x29, 0x10, 0xf7, 0x23, 0xb8, 0xa3, 0x84, 0xd0, 0xee, 0x19, 0x0e, 0xce, 0x6f, 0x4c, - 0x48, 0xf7, 0x08, 0x9a, 0x45, 0x26, 0xf9, 0xa9, 0xee, 0xc3, 0xf2, 0x58, 0xf1, 0x5f, 0xa3, 0x7f, - 0x6f, 0x5a, 0xbc, 0x4a, 0x5f, 0x7a, 0x19, 0xbd, 0x7b, 0x1f, 0xee, 0x9a, 0x62, 0xf7, 0x7c, 0x72, - 0x9d, 0xd9, 0xd3, 0x82, 0x9a, 0x34, 0x80, 0xa7, 0x42, 0x65, 0xbb, 0xee, 0xe5, 0x67, 0xf7, 0xcf, - 0x16, 0xb4, 0xcb, 0x79, 0xa5, 0x59, 0x9f, 0x42, 0x4d, 0xaa, 0x49, 0x99, 0xe7, 0xb0, 0x2b, 0x67, - 0x40, 0x0f, 0x60, 0x55, 0x7a, 0x3d, 0x0d, 0x64, 0xf1, 0xad, 0x1a, 0xfd, 0x96, 0x26, 0x61, 0x47, - 0xa5, 0xf0, 0x74, 0x06, 0xf7, 0x67, 0xb0, 0xaa, 0xe1, 0x79, 0x8e, 0x26, 0x22, 0xe0, 0x85, 0xe2, - 0x44, 0x40, 0x65, 0xe1, 0x28, 0x22, 0xdc, 0x6f, 0x2c, 0xc3, 0xe3, 0x3e, 0x39, 0xc5, 0x37, 0x17, - 0x4e, 0xa5, 0x10, 0xc8, 0x4b, 0xe5, 0x71, 0x56, 0x44, 0xf0, 0x90, 0x33, 0x80, 0x59, 0xc8, 0x19, - 0x60, 0xe4, 0xc1, 0x86, 0x01, 0x7a, 0x7e, 0x3d, 0x4e, 0xab, 0xea, 0x5a, 0xbf, 0xab, 0x79, 0xe5, - 0x51, 0x91, 0xce, 0x2b, 0x63, 0x76, 0xbf, 0x90, 0x09, 0xaa, 0xdf, 0xf0, 0xf5, 0x83, 0xea, 0x63, - 0x29, 0x77, 0xcf, 0x3f, 0xc7, 0xa2, 0xc4, 0xf8, 0xc7, 0xc3, 0x9b, 0x5d, 0xe7, 0xb6, 0xa1, 0x55, - 0xc6, 0x96, 0xda, 0xe3, 0xfe, 0x4a, 0x46, 0x2a, 0xc7, 0x1e, 0x91, 0x64, 0x6e, 0xb1, 0x1c, 0xe3, - 0x07, 0xc3, 0x5f, 0x60, 0x3f, 0xfb, 0x0e, 0xd9, 0xd1, 0xed, 0xc8, 0x00, 0x2e, 0x88, 0x94, 0x2a, - 0x3f, 0x85, 0xbb, 0xfb, 0x69, 0x56, 0xef, 0xc6, 0xe4, 0x24, 0x3a, 0xbd, 0xa0, 0x3e, 0x77, 0x61, - 0xa6, 0xb2, 0x0d, 0xf5, 0xe0, 0x82, 0x52, 0xcc, 0x0b, 0x83, 0x54, 0x3a, 0x01, 0xb8, 0xff, 0xb2, - 0xa0, 0x5d, 0xce, 0x2d, 0x1d, 0xbc, 0x0d, 0xb7, 0x02, 0x15, 0x91, 0x0b, 0x31, 0xc1, 0x7a, 0xb9, - 0xb1, 0xcd, 0x72, 0xf3, 0x2e, 0x2c, 0x92, 0x38, 0xc4, 0xbc, 0x8d, 0xf0, 0x1c, 0x5b, 0xd7, 0x3e, - 0xd3, 0x7e, 0x1c, 0x62, 0x2f, 0xc5, 0xa3, 0x1e, 0x38, 0x01, 0xc5, 0x7e, 0xd6, 0x8a, 0x8e, 0x48, - 0xf4, 0x42, 0xc4, 0x4f, 0xd5, 0x2b, 0xc0, 0xdd, 0x08, 0xaa, 0x9c, 0x55, 0xa9, 0x95, 0x96, 0x56, - 0x2b, 0xdb, 0x50, 0xf7, 0xc3, 0x90, 0xe2, 0x24, 0xc1, 0x3c, 0x35, 0x79, 0x65, 0x98, 0x00, 0xd0, - 0x0f, 0x60, 0x91, 0x5d, 0x8f, 0xa5, 0x49, 0x6b, 0xfd, 0xad, 0x82, 0x49, 0x22, 0x26, 0x53, 0x1a, - 0x77, 0x04, 0xdf, 0xcb, 0x22, 0x56, 0x38, 0x8a, 0x8e, 0x64, 0x40, 0xe9, 0x0d, 0xa3, 0x24, 0x55, - 0xac, 0xf2, 0x54, 0x99, 0xdd, 0x28, 0xfe, 0x66, 0xc1, 0xed, 0x72, 0x7d, 0xdf, 0x61, 0xcb, 0x68, - 0x43, 0x9d, 0xe5, 0x63, 0xc3, 0xa2, 0x18, 0x1b, 0x26, 0x00, 0xf7, 0x11, 0xa0, 0xcc, 0xe2, 0xa7, - 0xf1, 0xa9, 0x12, 0xf1, 0xfe, 0x09, 0x53, 0xbe, 0x4d, 0x76, 0x44, 0x9b, 0xb0, 0x28, 0xba, 0xbe, - 0x1c, 0x79, 0xd2, 0x83, 0x1b, 0xc1, 0x86, 0x26, 0x45, 0x86, 0xe1, 0x4f, 0x44, 0x9f, 0x8f, 0x69, - 0x5e, 0xa4, 0x3b, 0xa5, 0xc5, 0x44, 0xb0, 0x70, 0x32, 0x2f, 0x23, 0xe7, 0x06, 0x9c, 0xf9, 0xc9, - 0x5e, 0x2c, 0xbd, 0x5c, 0xf3, 0xb2, 0xa3, 0xfb, 0x4f, 0x0b, 0xd6, 0x0b, 0x8c, 0x68, 0x0d, 0xec, - 0x28, 0xb3, 0xd5, 0x8e, 0x34, 0x77, 0xdb, 0xba, 0xbb, 0x7f, 0x9a, 0xcf, 0x5f, 0xe9, 0x68, 0xf4, - 0xf6, 0x6c, 0x93, 0x8c, 0x59, 0x4c, 0x73, 0x66, 0xd5, 0x70, 0x26, 0xc7, 0x9e, 0x44, 0x43, 0xfc, - 0x39, 0x8d, 0x2f, 0x52, 0x57, 0xd7, 0xbd, 0x09, 0xc0, 0xfd, 0xbb, 0x25, 0x07, 0x42, 0xa1, 0xe4, - 0x3b, 0xac, 0xf7, 0x3d, 0x70, 0x32, 0xd0, 0x23, 0x59, 0x09, 0xe4, 0x5d, 0x0a, 0x70, 0x77, 0x00, - 0x1b, 0x9a, 0xcd, 0xf2, 0xcb, 0xf6, 0x61, 0x93, 0xc5, 0x0f, 0x25, 0x34, 0x9c, 0x8c, 0xa5, 0x96, - 0x10, 0x53, 0x8a, 0x73, 0x09, 0x6c, 0xca, 0xa6, 0xa9, 0x3b, 0xa0, 0xf4, 0x9a, 0xd6, 0xb7, 0xb8, - 0xa6, 0x5d, 0x7a, 0x4d, 0x3e, 0x44, 0xbc, 0xa9, 0x2a, 0x2c, 0x26, 0xe5, 0xb4, 0x0a, 0x54, 0x92, - 0x7a, 0xf6, 0x1c, 0xa9, 0x57, 0x99, 0x99, 0x7a, 0x66, 0xb4, 0xb8, 0xbf, 0x84, 0x2d, 0xc3, 0x1f, - 0xaf, 0xe1, 0xdc, 0x0e, 0xb4, 0xa5, 0x30, 0x0f, 0x5f, 0x62, 0x9a, 0xdf, 0x38, 0x7b, 0xe2, 0xdc, - 0xcb, 0x7d, 0x61, 0xe2, 0x65, 0x43, 0x1a, 0xc0, 0xc6, 0x4e, 0x30, 0xdc, 0x09, 0x43, 0x99, 0x8a, - 0xf3, 0xf4, 0xbe, 0xb1, 0xf6, 0x01, 0xf2, 0x1e, 0xfd, 0x94, 0x7f, 0x68, 0x55, 0x94, 0xbc, 0x57, - 0x0b, 0x6a, 0x69, 0x7e, 0xe7, 0xc2, 0xf2, 0xf3, 0x0c, 0x69, 0x4f, 0x84, 0xb4, 0xcf, 0x31, 0x4b, - 0xa5, 0x25, 0xaf, 0xd3, 0x95, 0x7f, 0xc4, 0x5d, 0xae, 0xc9, 0x92, 0xa6, 0x35, 0xf5, 0x4a, 0xb5, - 0x92, 0x57, 0x22, 0xf7, 0x77, 0x36, 0xdc, 0xd1, 0x66, 0xbd, 0x43, 0xce, 0x9d, 0x8f, 0xb0, 0x51, - 0x16, 0x20, 0xf2, 0x42, 0xd9, 0x99, 0xc7, 0x16, 0xc5, 0x7e, 0x12, 0x93, 0xac, 0xac, 0xa7, 0x27, - 0xf4, 0x63, 0xd8, 0xe2, 0x25, 0xe1, 0x90, 0xc5, 0xd4, 0x3f, 0x4d, 0x5f, 0x52, 0x0f, 0xaf, 0x19, - 0x4e, 0xcb, 0x51, 0xd5, 0x2b, 0x47, 0xf2, 0x94, 0x15, 0xb7, 0x93, 0x8f, 0x4b, 0x8f, 0xdf, 0xad, - 0x2a, 0x2a, 0x70, 0x01, 0x2e, 0x66, 0x51, 0x05, 0xf6, 0x25, 0x7f, 0x94, 0x8a, 0x6a, 0xc4, 0x67, - 0x51, 0x13, 0x51, 0x3e, 0xb9, 0x2e, 0x4d, 0x9b, 0x5c, 0x5b, 0xd0, 0x2c, 0x3a, 0x43, 0x46, 0x10, - 0x01, 0xb4, 0x13, 0x0c, 0x1f, 0x5f, 0x62, 0xc2, 0x94, 0x56, 0x52, 0x92, 0x4b, 0x72, 0x14, 0x31, - 0x73, 0x49, 0x69, 0x3a, 0xf6, 0x94, 0xa6, 0x53, 0x31, 0x9a, 0x8e, 0xa6, 0x6f, 0xbe, 0xa6, 0xa3, - 0xb1, 0xcc, 0xdb, 0x74, 0xfe, 0x61, 0xc1, 0x7a, 0x81, 0xf1, 0x5b, 0x34, 0x1d, 0xad, 0x10, 0x54, - 0xcc, 0xb6, 0xf1, 0x09, 0x54, 0xd9, 0x64, 0xe0, 0x76, 0x67, 0x9b, 0x2b, 0xc6, 0x1b, 0x41, 0x8f, - 0xba, 0xd0, 0xf0, 0x83, 0x61, 0x3a, 0x5b, 0x0f, 0x42, 0xd9, 0x70, 0x54, 0x50, 0xef, 0x7f, 0x16, - 0xc0, 0x63, 0x4a, 0x63, 0xba, 0x2b, 0xa6, 0xb4, 0x35, 0x80, 0x23, 0x82, 0x5f, 0x8c, 0x71, 0xc0, - 0x70, 0xe8, 0x2c, 0x20, 0x47, 0xbe, 0x6b, 0x65, 0x35, 0x71, 0x2c, 0xd4, 0x84, 0xcd, 0x09, 0x84, - 0xd7, 0x52, 0x4c, 0xc2, 0x88, 0x9c, 0x3a, 0x76, 0x4e, 0xbb, 0xcb, 0xc7, 0x39, 0x1c, 0x3a, 0x15, - 0x84, 0x60, 0x4d, 0x40, 0xf6, 0x63, 0xf6, 0xf8, 0x45, 0x94, 0xb0, 0xc4, 0xa9, 0xa2, 0x2d, 0xf9, - 0xdc, 0x17, 0xd1, 0xe1, 0x61, 0x3f, 0x38, 0xc3, 0xa1, 0xb3, 0xc8, 0x49, 0xb5, 0x52, 0x17, 0x3a, - 0x4b, 0x68, 0x15, 0xea, 0x9f, 0xc5, 0xf4, 0x38, 0x0a, 0x43, 0x4c, 0x9c, 0x65, 0xb4, 0x09, 0xce, - 0x4e, 0x9a, 0xa5, 0x83, 0x64, 0x2f, 0x4a, 0x12, 0xae, 0xb5, 0x86, 0x6e, 0x41, 0x63, 0x27, 0x18, - 0xee, 0xc7, 0xe4, 0xf1, 0x68, 0xcc, 0xae, 0x9d, 0x7a, 0xae, 0x60, 0x3f, 0x66, 0xf9, 0x1c, 0xef, - 0x00, 0x72, 0xa0, 0x21, 0xee, 0xf9, 0xec, 0xe4, 0x24, 0xc1, 0xcc, 0xf9, 0xab, 0xdd, 0xfb, 0xa3, - 0x25, 0x97, 0x3a, 0x69, 0x07, 0x47, 0xb7, 0xb5, 0x6d, 0x4c, 0x76, 0x8b, 0x05, 0xd4, 0x91, 0x2f, - 0x03, 0xf9, 0xde, 0x48, 0xef, 0x9b, 0x5d, 0xdf, 0xb1, 0x0c, 0x7c, 0x86, 0x38, 0x64, 0x3e, 0xe5, - 0xfc, 0xb6, 0x21, 0x37, 0xbb, 0x5e, 0x25, 0xf7, 0x64, 0x0a, 0x57, 0x7c, 0xd4, 0x7b, 0x22, 0xb7, - 0x65, 0xca, 0x06, 0x06, 0xdd, 0x95, 0xef, 0x76, 0x05, 0x76, 0x44, 0xce, 0x49, 0x7c, 0x45, 0x9c, - 0x05, 0xf4, 0x06, 0x6c, 0x99, 0xc8, 0x67, 0x57, 0x04, 0x53, 0xc7, 0xea, 0x5d, 0x41, 0x2d, 0x9b, - 0x79, 0x51, 0x03, 0x96, 0x9f, 0x53, 0x8c, 0x77, 0x0e, 0x06, 0xce, 0x02, 0x3f, 0x7c, 0x16, 0x0d, - 0xc5, 0xc1, 0xe2, 0xee, 0xdf, 0x9d, 0xc4, 0x14, 0x87, 0x89, 0xef, 0xb9, 0xcb, 0xf3, 0x85, 0x24, - 0x17, 0x09, 0x87, 0x54, 0xd0, 0x3a, 0xac, 0xee, 0xfb, 0xa3, 0x88, 0x9c, 0x72, 0x89, 0x1c, 0x54, - 0xe5, 0x97, 0x38, 0xf0, 0xaf, 0x47, 0x98, 0xb0, 0x03, 0x1a, 0x07, 0x58, 0x7c, 0x15, 0x8e, 0x59, - 0xec, 0xdd, 0x9f, 0x4c, 0x7c, 0xca, 0xb3, 0x0f, 0xd5, 0xa0, 0xca, 0x6d, 0x48, 0x0d, 0x90, 0xdd, - 0xd6, 0xb1, 0xf8, 0x41, 0x7e, 0x7f, 0xc7, 0xee, 0x3d, 0x80, 0x3b, 0x53, 0xc6, 0x2c, 0xb4, 0x04, - 0xf6, 0xb3, 0x73, 0x67, 0x81, 0x9b, 0xe2, 0xe1, 0x51, 0x7c, 0x89, 0x0f, 0x28, 0x1e, 0xfb, 0x14, - 0x3b, 0x16, 0x02, 0x58, 0x4a, 0x41, 0x8e, 0xdd, 0xfb, 0xbd, 0x25, 0xea, 0x78, 0x31, 0x31, 0x50, - 0x0b, 0x6e, 0x4f, 0x4e, 0xea, 0xce, 0x26, 0x75, 0xa3, 0x81, 0x4b, 0x77, 0x54, 0x8e, 0xc5, 0xdd, - 0x6f, 0xa0, 0xe4, 0x9b, 0x8d, 0x7f, 0xe1, 0x7b, 0x70, 0xd7, 0x40, 0xaa, 0xdd, 0xcd, 0xa9, 0xf4, - 0xff, 0xd4, 0x80, 0x86, 0xe2, 0x5f, 0xf4, 0x04, 0xea, 0xf9, 0xce, 0x0b, 0x95, 0xac, 0xde, 0x94, - 0x35, 0x69, 0xab, 0x33, 0x0d, 0x2d, 0xab, 0xd9, 0x57, 0xd9, 0x6a, 0x75, 0xb2, 0x08, 0x41, 0x6f, - 0x4f, 0x7b, 0x2d, 0xab, 0xfb, 0x9e, 0xd6, 0xf7, 0x6f, 0xa0, 0x92, 0x0a, 0xce, 0xb5, 0x38, 0xcd, - 0x37, 0x2d, 0x68, 0x7b, 0x26, 0xbb, 0xb2, 0xc8, 0x69, 0xbd, 0x37, 0x07, 0xa5, 0x54, 0x76, 0x9c, - 0x6d, 0x03, 0x95, 0xad, 0x00, 0x9a, 0x61, 0xa8, 0xb2, 0x17, 0x69, 0xbd, 0x73, 0x13, 0x99, 0xd4, - 0x81, 0x65, 0x42, 0x6a, 0x4f, 0x7d, 0x54, 0xc2, 0x5d, 0xb6, 0x42, 0x68, 0xbd, 0x7b, 0x23, 0x9d, - 0xe1, 0x37, 0xe3, 0x81, 0x5f, 0xe6, 0xb7, 0xf2, 0xb5, 0x42, 0x99, 0xdf, 0xa6, 0x6c, 0x0b, 0xb8, - 0xb2, 0xb2, 0xf7, 0xbe, 0xa1, 0x6c, 0xc6, 0x42, 0xc1, 0x50, 0x36, 0x73, 0x79, 0x70, 0x00, 0x0d, - 0x25, 0x3f, 0xd1, 0xbd, 0xe9, 0x0f, 0xa4, 0x54, 0x74, 0x77, 0x3a, 0xc1, 0x44, 0xa2, 0xd2, 0x67, - 0x50, 0xc9, 0xb6, 0x47, 0x7b, 0x11, 0x18, 0x12, 0xcb, 0xde, 0x1f, 0x5f, 0xe4, 0x0b, 0x38, 0x29, - 0xf3, 0xad, 0xb2, 0xe5, 0x9d, 0x2e, 0xd5, 0x9d, 0x45, 0x22, 0xe5, 0x92, 0x7c, 0x26, 0xd7, 0xc7, - 0x64, 0xf4, 0x5e, 0x19, 0x73, 0xe9, 0xa8, 0xdd, 0xea, 0xcd, 0x43, 0x2a, 0xf5, 0x1d, 0xc2, 0x8a, - 0x5a, 0x4c, 0x50, 0xd7, 0x6c, 0xfe, 0xe6, 0x40, 0xde, 0x7a, 0x6b, 0x06, 0x85, 0xea, 0x1c, 0x65, - 0xca, 0x2d, 0x38, 0xa7, 0x38, 0x4d, 0x17, 0x9c, 0x53, 0x36, 0x24, 0x7f, 0xc5, 0x5b, 0xb4, 0x3e, - 0xfc, 0x19, 0xb5, 0x68, 0xca, 0xa0, 0x6c, 0xd4, 0xa2, 0x69, 0x13, 0x24, 0x8f, 0x13, 0xa5, 0xac, - 0x1b, 0x71, 0x52, 0x9c, 0x2d, 0x5b, 0xdd, 0xe9, 0x04, 0xa9, 0xc4, 0x87, 0x9f, 0xfc, 0xe7, 0x65, - 0xc7, 0xfa, 0xfa, 0x65, 0xc7, 0xfa, 0xe6, 0x65, 0xc7, 0xfa, 0xc3, 0xab, 0xce, 0xc2, 0xd7, 0xaf, - 0x3a, 0x0b, 0xff, 0x7d, 0xd5, 0x59, 0xf8, 0x75, 0x7b, 0xd6, 0x3f, 0xbe, 0x8e, 0x97, 0xc4, 0xaf, - 0x8f, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xd7, 0x91, 0xfa, 0x1f, 0x1b, 0x00, 0x00, -} - -func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceSignRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ForceRequest { - i-- - if m.ForceRequest { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.NewIdentitySignature) > 0 { - i -= len(m.NewIdentitySignature) - copy(dAtA[i:], m.NewIdentitySignature) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.NewIdentitySignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.OldIdentity) > 0 { - i -= len(m.OldIdentity) - copy(dAtA[i:], m.OldIdentity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.OldIdentity))) - i-- - dAtA[i] = 0x1a - } - if len(m.Header) > 0 { - i -= len(m.Header) - copy(dAtA[i:], m.Header) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Header))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceLimits) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceLimits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.WriteMembers != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.WriteMembers)) - i-- - dAtA[i] = 0x10 - } - if m.ReadMembers != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.ReadMembers)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SpaceStatusPayload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceStatusPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceStatusPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsShared { - i-- - if m.IsShared { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Limits != nil { - { - size, err := m.Limits.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Permissions != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Permissions)) - i-- - dAtA[i] = 0x18 - } - if m.DeletionTimestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.DeletionTimestamp)) - i-- - dAtA[i] = 0x10 - } - if m.Status != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SpaceSignResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceSignResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceSignResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Receipt != nil { - { - size, err := m.Receipt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceReceiptWithSignature) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AccountLimitsSetRequest) GetSharedSpacesLimit() uint32 { + if x != nil { + return x.SharedSpacesLimit } - return dAtA[:n], nil + return 0 } -func (m *SpaceReceiptWithSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceReceiptWithSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceReceiptPayload) > 0 { - i -= len(m.SpaceReceiptPayload) - copy(dAtA[i:], m.SpaceReceiptPayload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceReceiptPayload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type AccountLimitsSetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceReceipt) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceReceipt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidUntil != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.ValidUntil)) - i-- - dAtA[i] = 0x28 - } - if len(m.NetworkId) > 0 { - i -= len(m.NetworkId) - copy(dAtA[i:], m.NetworkId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.NetworkId))) - i-- - dAtA[i] = 0x22 - } - if len(m.AccountIdentity) > 0 { - i -= len(m.AccountIdentity) - copy(dAtA[i:], m.AccountIdentity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AccountIdentity))) - i-- - dAtA[i] = 0x1a - } - if len(m.PeerId) > 0 { - i -= len(m.PeerId) - copy(dAtA[i:], m.PeerId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.PeerId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceStatusCheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceStatusCheckRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceStatusCheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceStatusCheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceStatusCheckResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceStatusCheckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func (x *AccountLimitsSetResponse) Reset() { + *x = AccountLimitsSetResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceStatusCheckManyRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *AccountLimitsSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceStatusCheckManyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*AccountLimitsSetResponse) ProtoMessage() {} -func (m *SpaceStatusCheckManyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceIds) > 0 { - for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SpaceIds[iNdEx]) - copy(dAtA[i:], m.SpaceIds[iNdEx]) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) - i-- - dAtA[i] = 0xa +func (x *AccountLimitsSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil -} - -func (m *SpaceStatusCheckManyResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *SpaceStatusCheckManyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use AccountLimitsSetResponse.ProtoReflect.Descriptor instead. +func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{37} } -func (m *SpaceStatusCheckManyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AccountLimits != nil { - { - size, err := m.AccountLimits.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Payloads) > 0 { - for iNdEx := len(m.Payloads) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Payloads[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +type AclEventLogRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountIdentity string `protobuf:"bytes,1,opt,name=accountIdentity,proto3" json:"accountIdentity,omitempty"` + // AfterId is the last known logId to request records after this id. If it is empty will be returned a list from the beginning. + AfterId string `protobuf:"bytes,2,opt,name=afterId,proto3" json:"afterId,omitempty"` + // Limit is a desired record count in response + Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AccountLimits) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *AclEventLogRequest) Reset() { + *x = AclEventLogRequest{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AccountLimits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *AclEventLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SharedSpacesLimit != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.SharedSpacesLimit)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} +func (*AclEventLogRequest) ProtoMessage() {} -func (m *SpaceStatusChangeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil -} - -func (m *SpaceStatusChangeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *SpaceStatusChangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DeletionPayloadType != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.DeletionPayloadType)) - i-- - dAtA[i] = 0x20 - } - if len(m.DeletionPayload) > 0 { - i -= len(m.DeletionPayload) - copy(dAtA[i:], m.DeletionPayload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayload))) - i-- - dAtA[i] = 0x1a - } - if len(m.DeletionPayloadId) > 0 { - i -= len(m.DeletionPayloadId) - copy(dAtA[i:], m.DeletionPayloadId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayloadId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use AclEventLogRequest.ProtoReflect.Descriptor instead. +func (*AclEventLogRequest) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{38} } -func (m *SpaceStatusChangeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogRequest) GetAccountIdentity() string { + if x != nil { + return x.AccountIdentity } - return dAtA[:n], nil -} - -func (m *SpaceStatusChangeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *SpaceStatusChangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *AclEventLogRequest) GetAfterId() string { + if x != nil { + return x.AfterId } - return len(dAtA) - i, nil + return "" } -func (m *SpaceMakeShareableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogRequest) GetLimit() uint32 { + if x != nil { + return x.Limit } - return dAtA[:n], nil -} - -func (m *SpaceMakeShareableRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return 0 } -func (m *SpaceMakeShareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type AclEventLogResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // AclEventLogRecord list of records, if there are no new records will be empty + Records []*AclEventLogRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + // HasMore indicates if there are records left + HasMore bool `protobuf:"varint,2,opt,name=hasMore,proto3" json:"hasMore,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *SpaceMakeShareableResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *AclEventLogResponse) Reset() { + *x = AclEventLogResponse{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *SpaceMakeShareableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *AclEventLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpaceMakeShareableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} +func (*AclEventLogResponse) ProtoMessage() {} -func (m *SpaceMakeUnshareableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *SpaceMakeUnshareableRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceMakeUnshareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AclHead) > 0 { - i -= len(m.AclHead) - copy(dAtA[i:], m.AclHead) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AclHead))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use AclEventLogResponse.ProtoReflect.Descriptor instead. +func (*AclEventLogResponse) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{39} } -func (m *SpaceMakeUnshareableResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogResponse) GetRecords() []*AclEventLogRecord { + if x != nil { + return x.Records } - return dAtA[:n], nil -} - -func (m *SpaceMakeUnshareableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceMakeUnshareableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil + return nil } -func (m *NetworkConfigurationRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogResponse) GetHasMore() bool { + if x != nil { + return x.HasMore } - return dAtA[:n], nil -} - -func (m *NetworkConfigurationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return false } -func (m *NetworkConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CurrentId) > 0 { - i -= len(m.CurrentId) - copy(dAtA[i:], m.CurrentId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.CurrentId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type AclEventLogRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Id is a record id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // SpaceId is a space identifier + SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + // Timestamp is a unixtimestamp of record creation + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Type of current event + Type AclEventLogRecordType `protobuf:"varint,4,opt,name=type,proto3,enum=coordinator.AclEventLogRecordType" json:"type,omitempty"` + // only for RecordTypeSpaceAclAddRecord + AclChangeId string `protobuf:"bytes,5,opt,name=aclChangeId,proto3" json:"aclChangeId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NetworkConfigurationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkConfigurationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *AclEventLogRecord) Reset() { + *x = AclEventLogRecord{} + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NetworkConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CreationTimeUnix != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.CreationTimeUnix)) - i-- - dAtA[i] = 0x20 - } - if len(m.Nodes) > 0 { - for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.NetworkId) > 0 { - i -= len(m.NetworkId) - copy(dAtA[i:], m.NetworkId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.NetworkId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ConfigurationId) > 0 { - i -= len(m.ConfigurationId) - copy(dAtA[i:], m.ConfigurationId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.ConfigurationId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Node) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Types) > 0 { - dAtA7 := make([]byte, len(m.Types)*10) - var j6 int - for _, num := range m.Types { - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintCoordinator(dAtA, i, uint64(j6)) - i-- - dAtA[i] = 0x1a - } - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.PeerId) > 0 { - i -= len(m.PeerId) - copy(dAtA[i:], m.PeerId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.PeerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeletionConfirmPayloadWithSignature) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *AclEventLogRecord) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeletionConfirmPayloadWithSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeletionConfirmPayloadWithSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.DeletionPayload) > 0 { - i -= len(m.DeletionPayload) - copy(dAtA[i:], m.DeletionPayload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeletionConfirmPayload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +func (*AclEventLogRecord) ProtoMessage() {} -func (m *DeletionConfirmPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeletionConfirmPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x28 - } - if len(m.NetworkId) > 0 { - i -= len(m.NetworkId) - copy(dAtA[i:], m.NetworkId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.NetworkId))) - i-- - dAtA[i] = 0x22 - } - if len(m.AccountIdentity) > 0 { - i -= len(m.AccountIdentity) - copy(dAtA[i:], m.AccountIdentity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AccountIdentity))) - i-- - dAtA[i] = 0x1a - } - if len(m.PeerId) > 0 { - i -= len(m.PeerId) - copy(dAtA[i:], m.PeerId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.PeerId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeletionLogRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeletionLogRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeletionLogRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Limit != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x10 - } - if len(m.AfterId) > 0 { - i -= len(m.AfterId) - copy(dAtA[i:], m.AfterId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AfterId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeletionLogResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeletionLogResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeletionLogResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HasMore { - i-- - if m.HasMore { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *AclEventLogRecord) ProtoReflect() protoreflect.Message { + mi := &file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil -} - -func (m *DeletionLogRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeletionLogRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeletionLogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FileGroup) > 0 { - i -= len(m.FileGroup) - copy(dAtA[i:], m.FileGroup) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.FileGroup))) - i-- - dAtA[i] = 0x2a - } - if m.Timestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x20 - } - if m.Status != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x18 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *SpaceDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DeletionDuration != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.DeletionDuration)) - i-- - dAtA[i] = 0x20 - } - if len(m.DeletionPayload) > 0 { - i -= len(m.DeletionPayload) - copy(dAtA[i:], m.DeletionPayload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayload))) - i-- - dAtA[i] = 0x1a - } - if len(m.DeletionPayloadId) > 0 { - i -= len(m.DeletionPayloadId) - copy(dAtA[i:], m.DeletionPayloadId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayloadId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpaceDeleteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpaceDeleteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpaceDeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ToBeDeletedTimestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.ToBeDeletedTimestamp)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccountDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use AclEventLogRecord.ProtoReflect.Descriptor instead. +func (*AclEventLogRecord) Descriptor() ([]byte, []int) { + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP(), []int{40} } -func (m *AccountDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeletionPayload) > 0 { - i -= len(m.DeletionPayload) - copy(dAtA[i:], m.DeletionPayload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayload))) - i-- - dAtA[i] = 0x12 +func (x *AclEventLogRecord) GetId() string { + if x != nil { + return x.Id } - if len(m.DeletionPayloadId) > 0 { - i -= len(m.DeletionPayloadId) - copy(dAtA[i:], m.DeletionPayloadId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.DeletionPayloadId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return "" } -func (m *AccountDeletionConfirmPayload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogRecord) GetSpaceId() string { + if x != nil { + return x.SpaceId } - return dAtA[:n], nil -} - -func (m *AccountDeletionConfirmPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *AccountDeletionConfirmPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x20 - } - if len(m.NetworkId) > 0 { - i -= len(m.NetworkId) - copy(dAtA[i:], m.NetworkId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.NetworkId))) - i-- - dAtA[i] = 0x1a - } - if len(m.AccountIdentity) > 0 { - i -= len(m.AccountIdentity) - copy(dAtA[i:], m.AccountIdentity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AccountIdentity))) - i-- - dAtA[i] = 0x12 - } - if len(m.PeerId) > 0 { - i -= len(m.PeerId) - copy(dAtA[i:], m.PeerId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.PeerId))) - i-- - dAtA[i] = 0xa +func (x *AclEventLogRecord) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } - return len(dAtA) - i, nil + return 0 } -func (m *AccountDeleteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *AclEventLogRecord) GetType() AclEventLogRecordType { + if x != nil { + return x.Type } - return dAtA[:n], nil -} - -func (m *AccountDeleteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return AclEventLogRecordType_RecordTypeSpaceReceipt } -func (m *AccountDeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ToBeDeletedTimestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.ToBeDeletedTimestamp)) - i-- - dAtA[i] = 0x8 +func (x *AclEventLogRecord) GetAclChangeId() string { + if x != nil { + return x.AclChangeId } - return len(dAtA) - i, nil + return "" } -func (m *AccountRevertDeletionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +var File_coordinator_coordinatorproto_protos_coordinator_proto protoreflect.FileDescriptor + +var file_coordinator_coordinatorproto_protos_coordinator_proto_rawDesc = string([]byte{ + 0x0a, 0x35, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x22, 0xbe, 0x01, 0x0a, 0x10, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6f, + 0x6c, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x6f, 0x6c, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, + 0x14, 0x6e, 0x65, 0x77, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6e, 0x65, 0x77, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x0b, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x12, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x3f, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, + 0x22, 0x55, 0x0a, 0x11, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x07, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x22, 0x6b, 0x0a, 0x19, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x13, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, + 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x22, + 0x33, 0x0a, 0x17, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x39, 0x0a, 0x1b, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, + 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x1c, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x61, 0x6e, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xe0, 0x01, 0x0a, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x52, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x56, 0x0a, 0x19, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x35, 0x0a, 0x19, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x4d, 0x61, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x1b, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, + 0x6b, 0x65, 0x55, 0x6e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x55, 0x6e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x0a, 0x1b, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x1c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x27, + 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x55, + 0x6e, 0x69, 0x78, 0x22, 0x69, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x6d, + 0x0a, 0x23, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb0, 0x01, + 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x44, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x66, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x66, 0x74, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x69, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, + 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, + 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, + 0x09, 0x66, 0x69, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xb2, 0x01, 0x0a, 0x12, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x49, 0x0a, 0x13, 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x74, 0x6f, 0x42, 0x65, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x42, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x6e, 0x0a, 0x14, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, + 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x9d, 0x01, 0x0a, 0x1d, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4b, 0x0a, 0x15, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x74, 0x6f, 0x42, 0x65, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x42, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x0a, 0x13, 0x41, 0x63, 0x6c, + 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4c, 0x0a, 0x14, 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x4a, 0x0a, 0x14, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x22, 0x31, + 0x0a, 0x15, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x22, 0x8b, 0x02, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x34, 0x0a, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x10, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x61, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x57, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, + 0x1a, 0x0a, 0x18, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x12, 0x41, + 0x63, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x69, 0x0a, 0x13, 0x41, + 0x63, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, + 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x11, 0x41, 0x63, 0x6c, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x61, 0x63, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x2a, 0xf8, + 0x01, 0x0a, 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0e, 0x0a, + 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, + 0x18, 0x0a, 0x14, 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x10, 0x04, 0x12, + 0x15, 0x0a, 0x11, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x6f, + 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x63, 0x6c, + 0x48, 0x65, 0x61, 0x64, 0x49, 0x73, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x10, 0x08, 0x12, + 0x0f, 0x0a, 0x0b, 0x41, 0x63, 0x6c, 0x4e, 0x6f, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0x09, + 0x12, 0x15, 0x0a, 0x11, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x10, 0xac, 0x02, 0x2a, 0x97, 0x01, 0x0a, 0x0b, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x10, + 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x10, + 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x10, 0x04, 0x2a, 0x4a, 0x0a, 0x10, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x10, 0x01, 0x2a, + 0x77, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x54, + 0x72, 0x65, 0x65, 0x41, 0x50, 0x49, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x65, + 0x41, 0x50, 0x49, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x50, 0x49, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x50, 0x49, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4e, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x50, 0x49, 0x10, 0x04, 0x12, 0x18, + 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x69, 0x6e, 0x67, 0x41, 0x50, 0x49, 0x10, 0x05, 0x2a, 0x39, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x08, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x10, 0x02, 0x2a, 0x40, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, + 0x0a, 0x02, 0x4f, 0x6b, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x10, 0x02, 0x2a, 0x8c, 0x01, 0x0a, 0x15, 0x41, 0x63, 0x6c, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, + 0x61, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x6e, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x64, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x10, 0x03, 0x32, 0x98, 0x0b, 0x0a, 0x0b, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x69, 0x67, + 0x6e, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5f, 0x0a, 0x10, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6f, + 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6b, 0x0a, 0x14, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, + 0x0a, 0x11, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6f, + 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x14, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x55, 0x6e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6b, 0x65, 0x55, 0x6e, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4d, + 0x61, 0x6b, 0x65, 0x55, 0x6e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x14, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, + 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x67, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6e, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x76, 0x65, 0x72, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x0c, 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x20, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, + 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x41, 0x63, 0x6c, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x6c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x53, 0x65, 0x74, + 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x0b, 0x41, 0x63, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1f, 0x2e, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x6c, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x1e, 0x5a, 0x1c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *AccountRevertDeletionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var ( + file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescOnce sync.Once + file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescData []byte +) -func (m *AccountRevertDeletionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescGZIP() []byte { + file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescOnce.Do(func() { + file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_coordinator_coordinatorproto_protos_coordinator_proto_rawDesc), len(file_coordinator_coordinatorproto_protos_coordinator_proto_rawDesc))) + }) + return file_coordinator_coordinatorproto_protos_coordinator_proto_rawDescData +} + +var file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_coordinator_coordinatorproto_protos_coordinator_proto_goTypes = []any{ + (ErrorCodes)(0), // 0: coordinator.ErrorCodes + (SpaceStatus)(0), // 1: coordinator.SpaceStatus + (SpacePermissions)(0), // 2: coordinator.SpacePermissions + (NodeType)(0), // 3: coordinator.NodeType + (DeletionPayloadType)(0), // 4: coordinator.DeletionPayloadType + (DeletionLogRecordStatus)(0), // 5: coordinator.DeletionLogRecordStatus + (AclEventLogRecordType)(0), // 6: coordinator.AclEventLogRecordType + (*SpaceSignRequest)(nil), // 7: coordinator.SpaceSignRequest + (*SpaceLimits)(nil), // 8: coordinator.SpaceLimits + (*SpaceStatusPayload)(nil), // 9: coordinator.SpaceStatusPayload + (*SpaceSignResponse)(nil), // 10: coordinator.SpaceSignResponse + (*SpaceReceiptWithSignature)(nil), // 11: coordinator.SpaceReceiptWithSignature + (*SpaceReceipt)(nil), // 12: coordinator.SpaceReceipt + (*SpaceStatusCheckRequest)(nil), // 13: coordinator.SpaceStatusCheckRequest + (*SpaceStatusCheckResponse)(nil), // 14: coordinator.SpaceStatusCheckResponse + (*SpaceStatusCheckManyRequest)(nil), // 15: coordinator.SpaceStatusCheckManyRequest + (*SpaceStatusCheckManyResponse)(nil), // 16: coordinator.SpaceStatusCheckManyResponse + (*AccountLimits)(nil), // 17: coordinator.AccountLimits + (*SpaceStatusChangeRequest)(nil), // 18: coordinator.SpaceStatusChangeRequest + (*SpaceStatusChangeResponse)(nil), // 19: coordinator.SpaceStatusChangeResponse + (*SpaceMakeShareableRequest)(nil), // 20: coordinator.SpaceMakeShareableRequest + (*SpaceMakeShareableResponse)(nil), // 21: coordinator.SpaceMakeShareableResponse + (*SpaceMakeUnshareableRequest)(nil), // 22: coordinator.SpaceMakeUnshareableRequest + (*SpaceMakeUnshareableResponse)(nil), // 23: coordinator.SpaceMakeUnshareableResponse + (*NetworkConfigurationRequest)(nil), // 24: coordinator.NetworkConfigurationRequest + (*NetworkConfigurationResponse)(nil), // 25: coordinator.NetworkConfigurationResponse + (*Node)(nil), // 26: coordinator.Node + (*DeletionConfirmPayloadWithSignature)(nil), // 27: coordinator.DeletionConfirmPayloadWithSignature + (*DeletionConfirmPayload)(nil), // 28: coordinator.DeletionConfirmPayload + (*DeletionLogRequest)(nil), // 29: coordinator.DeletionLogRequest + (*DeletionLogResponse)(nil), // 30: coordinator.DeletionLogResponse + (*DeletionLogRecord)(nil), // 31: coordinator.DeletionLogRecord + (*SpaceDeleteRequest)(nil), // 32: coordinator.SpaceDeleteRequest + (*SpaceDeleteResponse)(nil), // 33: coordinator.SpaceDeleteResponse + (*AccountDeleteRequest)(nil), // 34: coordinator.AccountDeleteRequest + (*AccountDeletionConfirmPayload)(nil), // 35: coordinator.AccountDeletionConfirmPayload + (*AccountDeleteResponse)(nil), // 36: coordinator.AccountDeleteResponse + (*AccountRevertDeletionRequest)(nil), // 37: coordinator.AccountRevertDeletionRequest + (*AccountRevertDeletionResponse)(nil), // 38: coordinator.AccountRevertDeletionResponse + (*AclAddRecordRequest)(nil), // 39: coordinator.AclAddRecordRequest + (*AclAddRecordResponse)(nil), // 40: coordinator.AclAddRecordResponse + (*AclGetRecordsRequest)(nil), // 41: coordinator.AclGetRecordsRequest + (*AclGetRecordsResponse)(nil), // 42: coordinator.AclGetRecordsResponse + (*AccountLimitsSetRequest)(nil), // 43: coordinator.AccountLimitsSetRequest + (*AccountLimitsSetResponse)(nil), // 44: coordinator.AccountLimitsSetResponse + (*AclEventLogRequest)(nil), // 45: coordinator.AclEventLogRequest + (*AclEventLogResponse)(nil), // 46: coordinator.AclEventLogResponse + (*AclEventLogRecord)(nil), // 47: coordinator.AclEventLogRecord +} +var file_coordinator_coordinatorproto_protos_coordinator_proto_depIdxs = []int32{ + 1, // 0: coordinator.SpaceStatusPayload.status:type_name -> coordinator.SpaceStatus + 2, // 1: coordinator.SpaceStatusPayload.permissions:type_name -> coordinator.SpacePermissions + 8, // 2: coordinator.SpaceStatusPayload.limits:type_name -> coordinator.SpaceLimits + 11, // 3: coordinator.SpaceSignResponse.receipt:type_name -> coordinator.SpaceReceiptWithSignature + 9, // 4: coordinator.SpaceStatusCheckResponse.payload:type_name -> coordinator.SpaceStatusPayload + 9, // 5: coordinator.SpaceStatusCheckManyResponse.payloads:type_name -> coordinator.SpaceStatusPayload + 17, // 6: coordinator.SpaceStatusCheckManyResponse.accountLimits:type_name -> coordinator.AccountLimits + 4, // 7: coordinator.SpaceStatusChangeRequest.deletionPayloadType:type_name -> coordinator.DeletionPayloadType + 9, // 8: coordinator.SpaceStatusChangeResponse.payload:type_name -> coordinator.SpaceStatusPayload + 26, // 9: coordinator.NetworkConfigurationResponse.nodes:type_name -> coordinator.Node + 3, // 10: coordinator.Node.types:type_name -> coordinator.NodeType + 31, // 11: coordinator.DeletionLogResponse.records:type_name -> coordinator.DeletionLogRecord + 5, // 12: coordinator.DeletionLogRecord.status:type_name -> coordinator.DeletionLogRecordStatus + 47, // 13: coordinator.AclEventLogResponse.records:type_name -> coordinator.AclEventLogRecord + 6, // 14: coordinator.AclEventLogRecord.type:type_name -> coordinator.AclEventLogRecordType + 7, // 15: coordinator.Coordinator.SpaceSign:input_type -> coordinator.SpaceSignRequest + 13, // 16: coordinator.Coordinator.SpaceStatusCheck:input_type -> coordinator.SpaceStatusCheckRequest + 15, // 17: coordinator.Coordinator.SpaceStatusCheckMany:input_type -> coordinator.SpaceStatusCheckManyRequest + 18, // 18: coordinator.Coordinator.SpaceStatusChange:input_type -> coordinator.SpaceStatusChangeRequest + 20, // 19: coordinator.Coordinator.SpaceMakeShareable:input_type -> coordinator.SpaceMakeShareableRequest + 22, // 20: coordinator.Coordinator.SpaceMakeUnshareable:input_type -> coordinator.SpaceMakeUnshareableRequest + 24, // 21: coordinator.Coordinator.NetworkConfiguration:input_type -> coordinator.NetworkConfigurationRequest + 29, // 22: coordinator.Coordinator.DeletionLog:input_type -> coordinator.DeletionLogRequest + 32, // 23: coordinator.Coordinator.SpaceDelete:input_type -> coordinator.SpaceDeleteRequest + 34, // 24: coordinator.Coordinator.AccountDelete:input_type -> coordinator.AccountDeleteRequest + 37, // 25: coordinator.Coordinator.AccountRevertDeletion:input_type -> coordinator.AccountRevertDeletionRequest + 39, // 26: coordinator.Coordinator.AclAddRecord:input_type -> coordinator.AclAddRecordRequest + 41, // 27: coordinator.Coordinator.AclGetRecords:input_type -> coordinator.AclGetRecordsRequest + 43, // 28: coordinator.Coordinator.AccountLimitsSet:input_type -> coordinator.AccountLimitsSetRequest + 45, // 29: coordinator.Coordinator.AclEventLog:input_type -> coordinator.AclEventLogRequest + 10, // 30: coordinator.Coordinator.SpaceSign:output_type -> coordinator.SpaceSignResponse + 14, // 31: coordinator.Coordinator.SpaceStatusCheck:output_type -> coordinator.SpaceStatusCheckResponse + 16, // 32: coordinator.Coordinator.SpaceStatusCheckMany:output_type -> coordinator.SpaceStatusCheckManyResponse + 19, // 33: coordinator.Coordinator.SpaceStatusChange:output_type -> coordinator.SpaceStatusChangeResponse + 21, // 34: coordinator.Coordinator.SpaceMakeShareable:output_type -> coordinator.SpaceMakeShareableResponse + 23, // 35: coordinator.Coordinator.SpaceMakeUnshareable:output_type -> coordinator.SpaceMakeUnshareableResponse + 25, // 36: coordinator.Coordinator.NetworkConfiguration:output_type -> coordinator.NetworkConfigurationResponse + 30, // 37: coordinator.Coordinator.DeletionLog:output_type -> coordinator.DeletionLogResponse + 33, // 38: coordinator.Coordinator.SpaceDelete:output_type -> coordinator.SpaceDeleteResponse + 36, // 39: coordinator.Coordinator.AccountDelete:output_type -> coordinator.AccountDeleteResponse + 38, // 40: coordinator.Coordinator.AccountRevertDeletion:output_type -> coordinator.AccountRevertDeletionResponse + 40, // 41: coordinator.Coordinator.AclAddRecord:output_type -> coordinator.AclAddRecordResponse + 42, // 42: coordinator.Coordinator.AclGetRecords:output_type -> coordinator.AclGetRecordsResponse + 44, // 43: coordinator.Coordinator.AccountLimitsSet:output_type -> coordinator.AccountLimitsSetResponse + 46, // 44: coordinator.Coordinator.AclEventLog:output_type -> coordinator.AclEventLogResponse + 30, // [30:45] is the sub-list for method output_type + 15, // [15:30] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_coordinator_coordinatorproto_protos_coordinator_proto_init() } +func file_coordinator_coordinatorproto_protos_coordinator_proto_init() { + if File_coordinator_coordinatorproto_protos_coordinator_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_coordinator_coordinatorproto_protos_coordinator_proto_rawDesc), len(file_coordinator_coordinatorproto_protos_coordinator_proto_rawDesc)), + NumEnums: 7, + NumMessages: 41, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_coordinator_coordinatorproto_protos_coordinator_proto_goTypes, + DependencyIndexes: file_coordinator_coordinatorproto_protos_coordinator_proto_depIdxs, + EnumInfos: file_coordinator_coordinatorproto_protos_coordinator_proto_enumTypes, + MessageInfos: file_coordinator_coordinatorproto_protos_coordinator_proto_msgTypes, + }.Build() + File_coordinator_coordinatorproto_protos_coordinator_proto = out.File + file_coordinator_coordinatorproto_protos_coordinator_proto_goTypes = nil + file_coordinator_coordinatorproto_protos_coordinator_proto_depIdxs = nil } - -func (m *AccountRevertDeletionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountRevertDeletionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountRevertDeletionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AclAddRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAddRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAddRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclAddRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclAddRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclAddRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if len(m.RecordId) > 0 { - i -= len(m.RecordId) - copy(dAtA[i:], m.RecordId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.RecordId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclGetRecordsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclGetRecordsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclGetRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AclHead) > 0 { - i -= len(m.AclHead) - copy(dAtA[i:], m.AclHead) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AclHead))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclGetRecordsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclGetRecordsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclGetRecordsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Records[iNdEx]) - copy(dAtA[i:], m.Records[iNdEx]) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Records[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AccountLimitsSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountLimitsSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountLimitsSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SharedSpacesLimit != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.SharedSpacesLimit)) - i-- - dAtA[i] = 0x30 - } - if m.SpaceMembersWrite != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.SpaceMembersWrite)) - i-- - dAtA[i] = 0x28 - } - if m.SpaceMembersRead != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.SpaceMembersRead)) - i-- - dAtA[i] = 0x20 - } - if m.FileStorageLimitBytes != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.FileStorageLimitBytes)) - i-- - dAtA[i] = 0x18 - } - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x12 - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountLimitsSetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountLimitsSetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountLimitsSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AclEventLogRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclEventLogRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclEventLogRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Limit != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x18 - } - if len(m.AfterId) > 0 { - i -= len(m.AfterId) - copy(dAtA[i:], m.AfterId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AfterId))) - i-- - dAtA[i] = 0x12 - } - if len(m.AccountIdentity) > 0 { - i -= len(m.AccountIdentity) - copy(dAtA[i:], m.AccountIdentity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AccountIdentity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AclEventLogResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclEventLogResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclEventLogResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HasMore { - i-- - if m.HasMore { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Records) > 0 { - for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCoordinator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AclEventLogRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AclEventLogRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AclEventLogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AclChangeId) > 0 { - i -= len(m.AclChangeId) - copy(dAtA[i:], m.AclChangeId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AclChangeId))) - i-- - dAtA[i] = 0x2a - } - if m.Type != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x20 - } - if m.Timestamp != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x18 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCoordinator(dAtA []byte, offset int, v uint64) int { - offset -= sovCoordinator(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SpaceSignRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.Header) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.OldIdentity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.NewIdentitySignature) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.ForceRequest { - n += 2 - } - return n -} - -func (m *SpaceLimits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ReadMembers != 0 { - n += 1 + sovCoordinator(uint64(m.ReadMembers)) - } - if m.WriteMembers != 0 { - n += 1 + sovCoordinator(uint64(m.WriteMembers)) - } - return n -} - -func (m *SpaceStatusPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != 0 { - n += 1 + sovCoordinator(uint64(m.Status)) - } - if m.DeletionTimestamp != 0 { - n += 1 + sovCoordinator(uint64(m.DeletionTimestamp)) - } - if m.Permissions != 0 { - n += 1 + sovCoordinator(uint64(m.Permissions)) - } - if m.Limits != nil { - l = m.Limits.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.IsShared { - n += 2 - } - return n -} - -func (m *SpaceSignResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Receipt != nil { - l = m.Receipt.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceReceiptWithSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceReceiptPayload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceReceipt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.PeerId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.AccountIdentity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.NetworkId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.ValidUntil != 0 { - n += 1 + sovCoordinator(uint64(m.ValidUntil)) - } - return n -} - -func (m *SpaceStatusCheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceStatusCheckResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceStatusCheckManyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SpaceIds) > 0 { - for _, s := range m.SpaceIds { - l = len(s) - n += 1 + l + sovCoordinator(uint64(l)) - } - } - return n -} - -func (m *SpaceStatusCheckManyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Payloads) > 0 { - for _, e := range m.Payloads { - l = e.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - } - if m.AccountLimits != nil { - l = m.AccountLimits.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *AccountLimits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SharedSpacesLimit != 0 { - n += 1 + sovCoordinator(uint64(m.SharedSpacesLimit)) - } - return n -} - -func (m *SpaceStatusChangeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.DeletionPayloadId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.DeletionPayload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.DeletionPayloadType != 0 { - n += 1 + sovCoordinator(uint64(m.DeletionPayloadType)) - } - return n -} - -func (m *SpaceStatusChangeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceMakeShareableRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceMakeShareableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SpaceMakeUnshareableRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.AclHead) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceMakeUnshareableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *NetworkConfigurationRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CurrentId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *NetworkConfigurationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ConfigurationId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.NetworkId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if len(m.Nodes) > 0 { - for _, e := range m.Nodes { - l = e.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - } - if m.CreationTimeUnix != 0 { - n += 1 + sovCoordinator(uint64(m.CreationTimeUnix)) - } - return n -} - -func (m *Node) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PeerId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovCoordinator(uint64(l)) - } - } - if len(m.Types) > 0 { - l = 0 - for _, e := range m.Types { - l += sovCoordinator(uint64(e)) - } - n += 1 + sovCoordinator(uint64(l)) + l - } - return n -} - -func (m *DeletionConfirmPayloadWithSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DeletionPayload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *DeletionConfirmPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.PeerId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.AccountIdentity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.NetworkId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovCoordinator(uint64(m.Timestamp)) - } - return n -} - -func (m *DeletionLogRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AfterId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovCoordinator(uint64(m.Limit)) - } - return n -} - -func (m *DeletionLogResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - } - if m.HasMore { - n += 2 - } - return n -} - -func (m *DeletionLogRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovCoordinator(uint64(m.Status)) - } - if m.Timestamp != 0 { - n += 1 + sovCoordinator(uint64(m.Timestamp)) - } - l = len(m.FileGroup) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *SpaceDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.DeletionPayloadId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.DeletionPayload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.DeletionDuration != 0 { - n += 1 + sovCoordinator(uint64(m.DeletionDuration)) - } - return n -} - -func (m *SpaceDeleteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ToBeDeletedTimestamp != 0 { - n += 1 + sovCoordinator(uint64(m.ToBeDeletedTimestamp)) - } - return n -} - -func (m *AccountDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DeletionPayloadId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.DeletionPayload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *AccountDeletionConfirmPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PeerId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.AccountIdentity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.NetworkId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovCoordinator(uint64(m.Timestamp)) - } - return n -} - -func (m *AccountDeleteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ToBeDeletedTimestamp != 0 { - n += 1 + sovCoordinator(uint64(m.ToBeDeletedTimestamp)) - } - return n -} - -func (m *AccountRevertDeletionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AccountRevertDeletionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AclAddRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *AclAddRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RecordId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *AclGetRecordsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.AclHead) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *AclGetRecordsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Records) > 0 { - for _, b := range m.Records { - l = len(b) - n += 1 + l + sovCoordinator(uint64(l)) - } - } - return n -} - -func (m *AccountLimitsSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.FileStorageLimitBytes != 0 { - n += 1 + sovCoordinator(uint64(m.FileStorageLimitBytes)) - } - if m.SpaceMembersRead != 0 { - n += 1 + sovCoordinator(uint64(m.SpaceMembersRead)) - } - if m.SpaceMembersWrite != 0 { - n += 1 + sovCoordinator(uint64(m.SpaceMembersWrite)) - } - if m.SharedSpacesLimit != 0 { - n += 1 + sovCoordinator(uint64(m.SharedSpacesLimit)) - } - return n -} - -func (m *AccountLimitsSetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AclEventLogRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AccountIdentity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.AfterId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovCoordinator(uint64(m.Limit)) - } - return n -} - -func (m *AclEventLogResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Records) > 0 { - for _, e := range m.Records { - l = e.Size() - n += 1 + l + sovCoordinator(uint64(l)) - } - } - if m.HasMore { - n += 2 - } - return n -} - -func (m *AclEventLogRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovCoordinator(uint64(m.Timestamp)) - } - if m.Type != 0 { - n += 1 + sovCoordinator(uint64(m.Type)) - } - l = len(m.AclChangeId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func sovCoordinator(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCoordinator(x uint64) (n int) { - return sovCoordinator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SpaceSignRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceSignRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceSignRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Header = append(m.Header[:0], dAtA[iNdEx:postIndex]...) - if m.Header == nil { - m.Header = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OldIdentity = append(m.OldIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.OldIdentity == nil { - m.OldIdentity = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewIdentitySignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewIdentitySignature = append(m.NewIdentitySignature[:0], dAtA[iNdEx:postIndex]...) - if m.NewIdentitySignature == nil { - m.NewIdentitySignature = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ForceRequest", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ForceRequest = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceLimits) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceLimits: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceLimits: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadMembers", wireType) - } - m.ReadMembers = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReadMembers |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WriteMembers", wireType) - } - m.WriteMembers = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WriteMembers |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusPayload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= SpaceStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) - } - m.DeletionTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DeletionTimestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - m.Permissions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Permissions |= SpacePermissions(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Limits == nil { - m.Limits = &SpaceLimits{} - } - if err := m.Limits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsShared", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsShared = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceSignResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceSignResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceSignResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Receipt == nil { - m.Receipt = &SpaceReceiptWithSignature{} - } - if err := m.Receipt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceReceiptWithSignature) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceReceiptWithSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceReceiptWithSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceReceiptPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceReceiptPayload = append(m.SpaceReceiptPayload[:0], dAtA[iNdEx:postIndex]...) - if m.SpaceReceiptPayload == nil { - m.SpaceReceiptPayload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceReceipt) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceReceipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceReceipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.AccountIdentity == nil { - m.AccountIdentity = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType) - } - m.ValidUntil = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidUntil |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusCheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusCheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusCheckResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusCheckResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &SpaceStatusPayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusCheckManyRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusCheckManyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusCheckManyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusCheckManyResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusCheckManyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusCheckManyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payloads = append(m.Payloads, &SpaceStatusPayload{}) - if err := m.Payloads[len(m.Payloads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountLimits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AccountLimits == nil { - m.AccountLimits = &AccountLimits{} - } - if err := m.AccountLimits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountLimits) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountLimits: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountLimits: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedSpacesLimit", wireType) - } - m.SharedSpacesLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedSpacesLimit |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusChangeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusChangeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusChangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayloadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) - if m.DeletionPayload == nil { - m.DeletionPayload = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadType", wireType) - } - m.DeletionPayloadType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DeletionPayloadType |= DeletionPayloadType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceStatusChangeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceStatusChangeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceStatusChangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &SpaceStatusPayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceMakeShareableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceMakeShareableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceMakeShareableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceMakeShareableResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceMakeShareableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceMakeShareableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceMakeUnshareableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceMakeUnshareableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceMakeUnshareableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHead = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceMakeUnshareableResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceMakeUnshareableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceMakeUnshareableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkConfigurationRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkConfigurationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkConfigurationRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CurrentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkConfigurationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkConfigurationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkConfigurationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigurationId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConfigurationId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nodes = append(m.Nodes, &Node{}) - if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationTimeUnix", wireType) - } - m.CreationTimeUnix = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreationTimeUnix |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Node) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Node: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType == 0 { - var v NodeType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= NodeType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Types = append(m.Types, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Types) == 0 { - m.Types = make([]NodeType, 0, elementCount) - } - for iNdEx < postIndex { - var v NodeType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= NodeType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Types = append(m.Types, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Types", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeletionConfirmPayloadWithSignature) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeletionConfirmPayloadWithSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeletionConfirmPayloadWithSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) - if m.DeletionPayload == nil { - m.DeletionPayload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeletionConfirmPayload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeletionConfirmPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeletionConfirmPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.AccountIdentity == nil { - m.AccountIdentity = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeletionLogRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeletionLogRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeletionLogRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AfterId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AfterId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeletionLogResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeletionLogResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeletionLogResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &DeletionLogRecord{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasMore", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasMore = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeletionLogRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeletionLogRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeletionLogRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= DeletionLogRecordStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileGroup", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileGroup = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayloadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) - if m.DeletionPayload == nil { - m.DeletionPayload = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionDuration", wireType) - } - m.DeletionDuration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DeletionDuration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpaceDeleteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpaceDeleteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpaceDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ToBeDeletedTimestamp", wireType) - } - m.ToBeDeletedTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ToBeDeletedTimestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayloadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) - if m.DeletionPayload == nil { - m.DeletionPayload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountDeletionConfirmPayload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountDeletionConfirmPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountDeletionConfirmPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.AccountIdentity == nil { - m.AccountIdentity = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountDeleteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountDeleteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ToBeDeletedTimestamp", wireType) - } - m.ToBeDeletedTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ToBeDeletedTimestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountRevertDeletionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountRevertDeletionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountRevertDeletionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountRevertDeletionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountRevertDeletionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountRevertDeletionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAddRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAddRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAddRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclAddRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclAddRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclAddRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclGetRecordsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclGetRecordsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclGetRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHead = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclGetRecordsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclGetRecordsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclGetRecordsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, make([]byte, postIndex-iNdEx)) - copy(m.Records[len(m.Records)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountLimitsSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountLimitsSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountLimitsSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileStorageLimitBytes", wireType) - } - m.FileStorageLimitBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileStorageLimitBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceMembersRead", wireType) - } - m.SpaceMembersRead = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpaceMembersRead |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceMembersWrite", wireType) - } - m.SpaceMembersWrite = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpaceMembersWrite |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedSpacesLimit", wireType) - } - m.SharedSpacesLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharedSpacesLimit |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccountLimitsSetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccountLimitsSetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountLimitsSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclEventLogRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclEventLogRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclEventLogRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountIdentity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AfterId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AfterId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclEventLogResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclEventLogResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclEventLogResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Records = append(m.Records, &AclEventLogRecord{}) - if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasMore", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasMore = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AclEventLogRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AclEventLogRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AclEventLogRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= AclEventLogRecordType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclChangeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclChangeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCoordinator(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCoordinator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCoordinator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCoordinator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCoordinator - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCoordinator - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCoordinator - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCoordinator = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCoordinator = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCoordinator = fmt.Errorf("proto: unexpected end of group") -) diff --git a/coordinator/coordinatorproto/coordinator_drpc.pb.go b/coordinator/coordinatorproto/coordinator_drpc.pb.go index ffbdc2c1d..646a28a91 100644 --- a/coordinator/coordinatorproto/coordinator_drpc.pb.go +++ b/coordinator/coordinatorproto/coordinator_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: coordinator/coordinatorproto/protos/coordinator.proto package coordinatorproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto struct{} func (drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCCoordinatorClient interface { diff --git a/coordinator/coordinatorproto/coordinator_vtproto.pb.go b/coordinator/coordinatorproto/coordinator_vtproto.pb.go new file mode 100644 index 000000000..cabc778c0 --- /dev/null +++ b/coordinator/coordinatorproto/coordinator_vtproto.pb.go @@ -0,0 +1,7616 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: coordinator/coordinatorproto/protos/coordinator.proto + +package coordinatorproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *SpaceSignRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceSignRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSignRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ForceRequest { + i-- + if m.ForceRequest { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.NewIdentitySignature) > 0 { + i -= len(m.NewIdentitySignature) + copy(dAtA[i:], m.NewIdentitySignature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewIdentitySignature))) + i-- + dAtA[i] = 0x22 + } + if len(m.OldIdentity) > 0 { + i -= len(m.OldIdentity) + copy(dAtA[i:], m.OldIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldIdentity))) + i-- + dAtA[i] = 0x1a + } + if len(m.Header) > 0 { + i -= len(m.Header) + copy(dAtA[i:], m.Header) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Header))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceLimits) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceLimits) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceLimits) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.WriteMembers != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.WriteMembers)) + i-- + dAtA[i] = 0x10 + } + if m.ReadMembers != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ReadMembers)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusPayload) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusPayload) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsShared { + i-- + if m.IsShared { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Limits != nil { + size, err := m.Limits.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.Permissions != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissions)) + i-- + dAtA[i] = 0x18 + } + if m.DeletionTimestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DeletionTimestamp)) + i-- + dAtA[i] = 0x10 + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SpaceSignResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceSignResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceSignResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Receipt != nil { + size, err := m.Receipt.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceReceiptWithSignature) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceReceiptWithSignature) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceReceiptWithSignature) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceReceiptPayload) > 0 { + i -= len(m.SpaceReceiptPayload) + copy(dAtA[i:], m.SpaceReceiptPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceReceiptPayload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceReceipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceReceipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ValidUntil != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ValidUntil)) + i-- + dAtA[i] = 0x28 + } + if len(m.NetworkId) > 0 { + i -= len(m.NetworkId) + copy(dAtA[i:], m.NetworkId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NetworkId))) + i-- + dAtA[i] = 0x22 + } + if len(m.AccountIdentity) > 0 { + i -= len(m.AccountIdentity) + copy(dAtA[i:], m.AccountIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountIdentity))) + i-- + dAtA[i] = 0x1a + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusCheckRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusCheckRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusCheckResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusCheckResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Payload != nil { + size, err := m.Payload.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusCheckManyRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusCheckManyRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusCheckManyRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceIds) > 0 { + for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpaceIds[iNdEx]) + copy(dAtA[i:], m.SpaceIds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusCheckManyResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusCheckManyResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusCheckManyResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AccountLimits != nil { + size, err := m.AccountLimits.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Payloads) > 0 { + for iNdEx := len(m.Payloads) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Payloads[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AccountLimits) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountLimits) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountLimits) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.SharedSpacesLimit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SharedSpacesLimit)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusChangeRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusChangeRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusChangeRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DeletionPayloadType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DeletionPayloadType)) + i-- + dAtA[i] = 0x20 + } + if len(m.DeletionPayload) > 0 { + i -= len(m.DeletionPayload) + copy(dAtA[i:], m.DeletionPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayload))) + i-- + dAtA[i] = 0x1a + } + if len(m.DeletionPayloadId) > 0 { + i -= len(m.DeletionPayloadId) + copy(dAtA[i:], m.DeletionPayloadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayloadId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceStatusChangeResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceStatusChangeResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceStatusChangeResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Payload != nil { + size, err := m.Payload.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceMakeShareableRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceMakeShareableRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceMakeShareableRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceMakeShareableResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceMakeShareableResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceMakeShareableResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *SpaceMakeUnshareableRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceMakeUnshareableRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceMakeUnshareableRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AclHead) > 0 { + i -= len(m.AclHead) + copy(dAtA[i:], m.AclHead) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHead))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceMakeUnshareableResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceMakeUnshareableResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceMakeUnshareableResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *NetworkConfigurationRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkConfigurationRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NetworkConfigurationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.CurrentId) > 0 { + i -= len(m.CurrentId) + copy(dAtA[i:], m.CurrentId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CurrentId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NetworkConfigurationResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkConfigurationResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NetworkConfigurationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.CreationTimeUnix != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CreationTimeUnix)) + i-- + dAtA[i] = 0x20 + } + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Nodes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.NetworkId) > 0 { + i -= len(m.NetworkId) + copy(dAtA[i:], m.NetworkId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NetworkId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConfigurationId) > 0 { + i -= len(m.ConfigurationId) + copy(dAtA[i:], m.ConfigurationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConfigurationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Node) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Node) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Types) > 0 { + var pksize2 int + for _, num := range m.Types { + pksize2 += protohelpers.SizeOfVarint(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range m.Types { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeletionConfirmPayloadWithSignature) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletionConfirmPayloadWithSignature) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeletionConfirmPayloadWithSignature) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.DeletionPayload) > 0 { + i -= len(m.DeletionPayload) + copy(dAtA[i:], m.DeletionPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeletionConfirmPayload) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletionConfirmPayload) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeletionConfirmPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.NetworkId) > 0 { + i -= len(m.NetworkId) + copy(dAtA[i:], m.NetworkId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NetworkId))) + i-- + dAtA[i] = 0x22 + } + if len(m.AccountIdentity) > 0 { + i -= len(m.AccountIdentity) + copy(dAtA[i:], m.AccountIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountIdentity))) + i-- + dAtA[i] = 0x1a + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeletionLogRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletionLogRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeletionLogRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Limit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if len(m.AfterId) > 0 { + i -= len(m.AfterId) + copy(dAtA[i:], m.AfterId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AfterId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeletionLogResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletionLogResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeletionLogResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.HasMore { + i-- + if m.HasMore { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeletionLogRecord) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeletionLogRecord) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeletionLogRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FileGroup) > 0 { + i -= len(m.FileGroup) + copy(dAtA[i:], m.FileGroup) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FileGroup))) + i-- + dAtA[i] = 0x2a + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x20 + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x18 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DeletionDuration != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DeletionDuration)) + i-- + dAtA[i] = 0x20 + } + if len(m.DeletionPayload) > 0 { + i -= len(m.DeletionPayload) + copy(dAtA[i:], m.DeletionPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayload))) + i-- + dAtA[i] = 0x1a + } + if len(m.DeletionPayloadId) > 0 { + i -= len(m.DeletionPayloadId) + copy(dAtA[i:], m.DeletionPayloadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayloadId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceDeleteResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceDeleteResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SpaceDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ToBeDeletedTimestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ToBeDeletedTimestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccountDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.DeletionPayload) > 0 { + i -= len(m.DeletionPayload) + copy(dAtA[i:], m.DeletionPayload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayload))) + i-- + dAtA[i] = 0x12 + } + if len(m.DeletionPayloadId) > 0 { + i -= len(m.DeletionPayloadId) + copy(dAtA[i:], m.DeletionPayloadId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeletionPayloadId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccountDeletionConfirmPayload) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountDeletionConfirmPayload) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountDeletionConfirmPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x20 + } + if len(m.NetworkId) > 0 { + i -= len(m.NetworkId) + copy(dAtA[i:], m.NetworkId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NetworkId))) + i-- + dAtA[i] = 0x1a + } + if len(m.AccountIdentity) > 0 { + i -= len(m.AccountIdentity) + copy(dAtA[i:], m.AccountIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountIdentity))) + i-- + dAtA[i] = 0x12 + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PeerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccountDeleteResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountDeleteResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ToBeDeletedTimestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ToBeDeletedTimestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccountRevertDeletionRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountRevertDeletionRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountRevertDeletionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *AccountRevertDeletionResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountRevertDeletionResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountRevertDeletionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *AclAddRecordRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAddRecordRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAddRecordRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclAddRecordResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclAddRecordResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclAddRecordResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + if len(m.RecordId) > 0 { + i -= len(m.RecordId) + copy(dAtA[i:], m.RecordId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RecordId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclGetRecordsRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclGetRecordsRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclGetRecordsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AclHead) > 0 { + i -= len(m.AclHead) + copy(dAtA[i:], m.AclHead) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclHead))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclGetRecordsResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclGetRecordsResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclGetRecordsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Records[iNdEx]) + copy(dAtA[i:], m.Records[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Records[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AccountLimitsSetRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountLimitsSetRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountLimitsSetRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.SharedSpacesLimit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SharedSpacesLimit)) + i-- + dAtA[i] = 0x30 + } + if m.SpaceMembersWrite != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpaceMembersWrite)) + i-- + dAtA[i] = 0x28 + } + if m.SpaceMembersRead != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpaceMembersRead)) + i-- + dAtA[i] = 0x20 + } + if m.FileStorageLimitBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FileStorageLimitBytes)) + i-- + dAtA[i] = 0x18 + } + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccountLimitsSetResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountLimitsSetResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AccountLimitsSetResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *AclEventLogRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclEventLogRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclEventLogRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Limit != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x18 + } + if len(m.AfterId) > 0 { + i -= len(m.AfterId) + copy(dAtA[i:], m.AfterId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AfterId))) + i-- + dAtA[i] = 0x12 + } + if len(m.AccountIdentity) > 0 { + i -= len(m.AccountIdentity) + copy(dAtA[i:], m.AccountIdentity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountIdentity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AclEventLogResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclEventLogResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclEventLogResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.HasMore { + i-- + if m.HasMore { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AclEventLogRecord) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AclEventLogRecord) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AclEventLogRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AclChangeId) > 0 { + i -= len(m.AclChangeId) + copy(dAtA[i:], m.AclChangeId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AclChangeId))) + i-- + dAtA[i] = 0x2a + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x20 + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceSignRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Header) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OldIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NewIdentitySignature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ForceRequest { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceLimits) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReadMembers != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ReadMembers)) + } + if m.WriteMembers != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.WriteMembers)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusPayload) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + if m.DeletionTimestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DeletionTimestamp)) + } + if m.Permissions != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissions)) + } + if m.Limits != nil { + l = m.Limits.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsShared { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceSignResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Receipt != nil { + l = m.Receipt.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceReceiptWithSignature) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceReceiptPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceReceipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.PeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AccountIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NetworkId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ValidUntil != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ValidUntil)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusCheckRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusCheckResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Payload != nil { + l = m.Payload.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusCheckManyRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpaceIds) > 0 { + for _, s := range m.SpaceIds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusCheckManyResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Payloads) > 0 { + for _, e := range m.Payloads { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.AccountLimits != nil { + l = m.AccountLimits.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountLimits) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SharedSpacesLimit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SharedSpacesLimit)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusChangeRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.DeletionPayloadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.DeletionPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.DeletionPayloadType != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DeletionPayloadType)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceStatusChangeResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Payload != nil { + l = m.Payload.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceMakeShareableRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceMakeShareableResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *SpaceMakeUnshareableRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AclHead) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceMakeUnshareableResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *NetworkConfigurationRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CurrentId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *NetworkConfigurationResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConfigurationId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NetworkId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.CreationTimeUnix != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.CreationTimeUnix)) + } + n += len(m.unknownFields) + return n +} + +func (m *Node) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Types) > 0 { + l = 0 + for _, e := range m.Types { + l += protohelpers.SizeOfVarint(uint64(e)) + } + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l + } + n += len(m.unknownFields) + return n +} + +func (m *DeletionConfirmPayloadWithSignature) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DeletionPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeletionConfirmPayload) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.PeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AccountIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NetworkId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeletionLogRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AfterId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Limit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Limit)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeletionLogResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.HasMore { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *DeletionLogRecord) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.FileGroup) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceDeleteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.DeletionPayloadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.DeletionPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.DeletionDuration != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DeletionDuration)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceDeleteResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ToBeDeletedTimestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ToBeDeletedTimestamp)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountDeleteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DeletionPayloadId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.DeletionPayload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountDeletionConfirmPayload) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PeerId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AccountIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NetworkId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountDeleteResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ToBeDeletedTimestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ToBeDeletedTimestamp)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountRevertDeletionRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *AccountRevertDeletionResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *AclAddRecordRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclAddRecordResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RecordId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclGetRecordsRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AclHead) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclGetRecordsResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, b := range m.Records { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *AccountLimitsSetRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.FileStorageLimitBytes != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FileStorageLimitBytes)) + } + if m.SpaceMembersRead != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SpaceMembersRead)) + } + if m.SpaceMembersWrite != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SpaceMembersWrite)) + } + if m.SharedSpacesLimit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SharedSpacesLimit)) + } + n += len(m.unknownFields) + return n +} + +func (m *AccountLimitsSetResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *AclEventLogRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountIdentity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AfterId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Limit != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Limit)) + } + n += len(m.unknownFields) + return n +} + +func (m *AclEventLogResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.HasMore { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *AclEventLogRecord) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + l = len(m.AclChangeId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SpaceSignRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceSignRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceSignRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Header = append(m.Header[:0], dAtA[iNdEx:postIndex]...) + if m.Header == nil { + m.Header = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldIdentity = append(m.OldIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.OldIdentity == nil { + m.OldIdentity = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewIdentitySignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewIdentitySignature = append(m.NewIdentitySignature[:0], dAtA[iNdEx:postIndex]...) + if m.NewIdentitySignature == nil { + m.NewIdentitySignature = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForceRequest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ForceRequest = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceLimits) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadMembers", wireType) + } + m.ReadMembers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadMembers |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WriteMembers", wireType) + } + m.WriteMembers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WriteMembers |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusPayload) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= SpaceStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) + } + m.DeletionTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeletionTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + m.Permissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Permissions |= SpacePermissions(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Limits == nil { + m.Limits = &SpaceLimits{} + } + if err := m.Limits.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsShared", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsShared = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceSignResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceSignResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceSignResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Receipt == nil { + m.Receipt = &SpaceReceiptWithSignature{} + } + if err := m.Receipt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceReceiptWithSignature) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceReceiptWithSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceReceiptWithSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceReceiptPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceReceiptPayload = append(m.SpaceReceiptPayload[:0], dAtA[iNdEx:postIndex]...) + if m.SpaceReceiptPayload == nil { + m.SpaceReceiptPayload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceReceipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.AccountIdentity == nil { + m.AccountIdentity = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType) + } + m.ValidUntil = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidUntil |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusCheckRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusCheckRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusCheckResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusCheckResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Payload == nil { + m.Payload = &SpaceStatusPayload{} + } + if err := m.Payload.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusCheckManyRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusCheckManyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusCheckManyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusCheckManyResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusCheckManyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusCheckManyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payloads = append(m.Payloads, &SpaceStatusPayload{}) + if err := m.Payloads[len(m.Payloads)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountLimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AccountLimits == nil { + m.AccountLimits = &AccountLimits{} + } + if err := m.AccountLimits.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountLimits) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedSpacesLimit", wireType) + } + m.SharedSpacesLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedSpacesLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusChangeRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusChangeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusChangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayloadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) + if m.DeletionPayload == nil { + m.DeletionPayload = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadType", wireType) + } + m.DeletionPayloadType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeletionPayloadType |= DeletionPayloadType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceStatusChangeResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceStatusChangeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceStatusChangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Payload == nil { + m.Payload = &SpaceStatusPayload{} + } + if err := m.Payload.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeShareableRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceMakeShareableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeShareableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeShareableResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceMakeShareableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeShareableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeUnshareableRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceMakeUnshareableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeUnshareableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHead = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeUnshareableResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceMakeUnshareableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeUnshareableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkConfigurationRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkConfigurationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkConfigurationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkConfigurationResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkConfigurationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkConfigurationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfigurationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConfigurationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, &Node{}) + if err := m.Nodes[len(m.Nodes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTimeUnix", wireType) + } + m.CreationTimeUnix = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationTimeUnix |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v NodeType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Types = append(m.Types, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Types) == 0 { + m.Types = make([]NodeType, 0, elementCount) + } + for iNdEx < postIndex { + var v NodeType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NodeType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Types = append(m.Types, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Types", wireType) + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeletionConfirmPayloadWithSignature) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeletionConfirmPayloadWithSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeletionConfirmPayloadWithSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) + if m.DeletionPayload == nil { + m.DeletionPayload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeletionConfirmPayload) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeletionConfirmPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeletionConfirmPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.AccountIdentity == nil { + m.AccountIdentity = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeletionLogRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeletionLogRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeletionLogRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AfterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AfterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeletionLogResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeletionLogResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeletionLogResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &DeletionLogRecord{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasMore", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasMore = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeletionLogRecord) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeletionLogRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeletionLogRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= DeletionLogRecordStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileGroup = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceDeleteRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceDeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayloadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) + if m.DeletionPayload == nil { + m.DeletionPayload = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionDuration", wireType) + } + m.DeletionDuration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeletionDuration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceDeleteResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceDeleteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ToBeDeletedTimestamp", wireType) + } + m.ToBeDeletedTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ToBeDeletedTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountDeleteRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountDeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayloadId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayloadId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletionPayload = append(m.DeletionPayload[:0], dAtA[iNdEx:postIndex]...) + if m.DeletionPayload == nil { + m.DeletionPayload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountDeletionConfirmPayload) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountDeletionConfirmPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountDeletionConfirmPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.AccountIdentity == nil { + m.AccountIdentity = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountDeleteResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountDeleteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ToBeDeletedTimestamp", wireType) + } + m.ToBeDeletedTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ToBeDeletedTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountRevertDeletionRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountRevertDeletionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountRevertDeletionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountRevertDeletionResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountRevertDeletionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountRevertDeletionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAddRecordRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAddRecordRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAddRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclAddRecordResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclAddRecordResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclAddRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecordId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclGetRecordsRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclGetRecordsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclGetRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHead = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclGetRecordsResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclGetRecordsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclGetRecordsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, make([]byte, postIndex-iNdEx)) + copy(m.Records[len(m.Records)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountLimitsSetRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountLimitsSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimitsSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileStorageLimitBytes", wireType) + } + m.FileStorageLimitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileStorageLimitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceMembersRead", wireType) + } + m.SpaceMembersRead = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpaceMembersRead |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceMembersWrite", wireType) + } + m.SpaceMembersWrite = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpaceMembersWrite |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedSpacesLimit", wireType) + } + m.SharedSpacesLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedSpacesLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountLimitsSetResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountLimitsSetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimitsSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclEventLogRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclEventLogRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclEventLogRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountIdentity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AfterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AfterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclEventLogResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclEventLogResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclEventLogResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Records = append(m.Records, &AclEventLogRecord{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasMore", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasMore = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AclEventLogRecord) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AclEventLogRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AclEventLogRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= AclEventLogRecordType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclChangeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclChangeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/coordinator/coordinatorproto/deleteconfirm.go b/coordinator/coordinatorproto/deleteconfirm.go index 58d3fb7a4..29da0a592 100644 --- a/coordinator/coordinatorproto/deleteconfirm.go +++ b/coordinator/coordinatorproto/deleteconfirm.go @@ -19,7 +19,7 @@ func PrepareDeleteConfirmation(privKey crypto.PrivKey, spaceId, peerId, networkI NetworkId: networkId, Timestamp: time.Now().Unix(), } - marshalledDeleteConfirm, err := deleteConfirm.Marshal() + marshalledDeleteConfirm, err := deleteConfirm.MarshalVT() if err != nil { return } @@ -45,7 +45,7 @@ func PrepareAccountDeleteConfirmation(privKey crypto.PrivKey, peerId, networkId NetworkId: networkId, Timestamp: time.Now().Unix(), } - marshalledDeleteConfirm, err := deleteConfirm.Marshal() + marshalledDeleteConfirm, err := deleteConfirm.MarshalVT() if err != nil { return } @@ -69,7 +69,7 @@ func ValidateAccountDeleteConfirmation(pubKey crypto.PubKey, spaceId, networkId return errSignatureIncorrect } payload := &AccountDeletionConfirmPayload{} - err = payload.Unmarshal(deleteConfirm.GetDeletionPayload()) + err = payload.UnmarshalVT(deleteConfirm.GetDeletionPayload()) if err != nil { return } @@ -95,7 +95,7 @@ func ValidateDeleteConfirmation(pubKey crypto.PubKey, spaceId, networkId string, return errSignatureIncorrect } payload := &DeletionConfirmPayload{} - err = payload.Unmarshal(deleteConfirm.GetDeletionPayload()) + err = payload.UnmarshalVT(deleteConfirm.GetDeletionPayload()) if err != nil { return } diff --git a/coordinator/coordinatorproto/receipt.go b/coordinator/coordinatorproto/receipt.go index 376efc94a..aabeeee8f 100644 --- a/coordinator/coordinatorproto/receipt.go +++ b/coordinator/coordinatorproto/receipt.go @@ -5,7 +5,6 @@ import ( "errors" "github.com/anyproto/any-sync/util/crypto" "github.com/anyproto/any-sync/util/strkey" - "github.com/anyproto/protobuf/proto" "time" ) @@ -30,7 +29,7 @@ func PrepareSpaceReceipt(spaceId, peerId string, validPeriod time.Duration, acco NetworkId: networkKey.GetPublic().Network(), ValidUntil: uint64(time.Now().Add(validPeriod).Unix()), } - receiptData, err := receipt.Marshal() + receiptData, err := receipt.MarshalVT() if err != nil { return } @@ -46,7 +45,7 @@ func PrepareSpaceReceipt(spaceId, peerId string, validPeriod time.Duration, acco func CheckReceipt(peerId, spaceId string, accountIdentity []byte, networkId string, receipt *SpaceReceiptWithSignature) (err error) { payload := &SpaceReceipt{} - err = proto.Unmarshal(receipt.GetSpaceReceiptPayload(), payload) + err = payload.UnmarshalVT(receipt.GetSpaceReceiptPayload()) if err != nil { return } diff --git a/coordinator/coordinatorproto/receipt_test.go b/coordinator/coordinatorproto/receipt_test.go index 86c31c821..c2e00cebd 100644 --- a/coordinator/coordinatorproto/receipt_test.go +++ b/coordinator/coordinatorproto/receipt_test.go @@ -4,7 +4,6 @@ import ( "context" "crypto/rand" "github.com/anyproto/any-sync/util/crypto" - "github.com/anyproto/protobuf/proto" "github.com/stretchr/testify/require" "testing" "time" @@ -45,14 +44,14 @@ func (fx *fixture) prepareReceipt(t *testing.T, validPeriod time.Duration) { fx.signedReceipt, err = PrepareSpaceReceipt(fx.spaceId, fx.peerId, validPeriod, fx.accountKey, fx.networkKey) require.NoError(t, err) fx.originalReceipt = &SpaceReceipt{} - err = proto.Unmarshal(fx.signedReceipt.SpaceReceiptPayload, fx.originalReceipt) + err = fx.originalReceipt.UnmarshalVT(fx.signedReceipt.SpaceReceiptPayload) require.NoError(t, err) return } func (fx *fixture) updateReceipt(t *testing.T, update func(t *testing.T, receipt *SpaceReceipt)) { update(t, fx.originalReceipt) - marshalled, err := proto.Marshal(fx.originalReceipt) + marshalled, err := fx.originalReceipt.MarshalVT() require.NoError(t, err) signature, err := fx.networkKey.Sign(marshalled) require.NoError(t, err) diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..e1a4f00e7 --- /dev/null +++ b/flake.lock @@ -0,0 +1,128 @@ +{ + "nodes": { + "drpc": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1710270657, + "narHash": "sha256-hjb+8iB0HTdAYtsOvr6gY2yhwdg2NLUqQRVJi4qMmJI=", + "owner": "storj", + "repo": "drpc", + "rev": "a5d487af8ae33deb7913b0f7c06b2c7ec7cd4dcc", + "type": "github" + }, + "original": { + "owner": "storj", + "ref": "v0.0.34", + "repo": "drpc", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "revCount": 92, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.92%2Brev-b1d9ab70662946ef0850d488da1c9019f3a9752a/018e2ca5-e5a2-7f80-9261-445a8cecd4d7/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/numtide/flake-utils/%2A.tar.gz" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1710162809, + "narHash": "sha256-i2R2bcnQp+85de67yjgZVvJhd6rRnJbSYNpGmB6Leb8=", + "rev": "ddcd7598b2184008c97e6c9c6a21c5f37590b8d2", + "revCount": 556648, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2311.556648%2Brev-ddcd7598b2184008c97e6c9c6a21c5f37590b8d2/018e3162-e13b-7219-a0b5-da03bcc09ecc/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1741462378, + "narHash": "sha256-ZF3YOjq+vTcH51S+qWa1oGA9FgmdJ67nTNPG2OIlXDc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2d9e4457f8e83120c9fdf6f1707ed0bc603e5ac9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "drpc": "drpc", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..8dee84ee2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,57 @@ +{ + description = "Multi-platform Nix flake (Linux + macOS)"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + drpc.url = "github:storj/drpc/v0.0.34"; + }; + + outputs = + { + self, + nixpkgs, + drpc, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + + protoc-gen-go-vtproto = pkgs.callPackage .nix/protoc-gen-go-vtproto.nix {}; + mockgen = pkgs.callPackage .nix/mockgen.nix {}; + # drpc generator + protoc-gen-go-drpc = drpc.defaultPackage.${system}; + + commonPackages = with pkgs; [ + protoc-gen-go-vtproto + protoc-gen-go-drpc + go_1_23 + protobuf + mockgen + protoc-gen-go + pkg-config + pre-commit + ]; + + devShell = pkgs.mkShell { + name = "dev shell"; + buildInputs = commonPackages; + shellHook = '' + export GOROOT="${pkgs.go_1_23}/share/go" + export PATH="$GOROOT/bin:$PATH" + ''; + }; + + in + { + devShells.default = devShell; + packages.default = protoc-gen-go-vtproto; + } + ); +} diff --git a/go.mod b/go.mod index b03f6e73e..8eb0956ba 100644 --- a/go.mod +++ b/go.mod @@ -11,13 +11,13 @@ require ( github.com/anyproto/go-slip10 v1.0.0 github.com/anyproto/go-slip21 v1.0.0 github.com/anyproto/lexid v0.0.4 - github.com/anyproto/protobuf v1.3.3-0.20240814124528-72b8c7e0e0f5 github.com/btcsuite/btcd v0.22.1 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/cespare/xxhash v1.1.0 github.com/cheggaaa/mb/v3 v3.0.2 github.com/gobwas/glob v0.2.3 github.com/goccy/go-graphviz v0.2.9 + github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db github.com/google/uuid v1.6.0 github.com/hashicorp/yamux v0.1.2 github.com/huandu/skiplist v1.2.1 @@ -29,6 +29,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 + github.com/planetscale/vtprotobuf v0.6.0 github.com/prometheus/client_golang v1.22.0 github.com/quic-go/quic-go v0.51.0 github.com/stretchr/testify v1.10.0 @@ -43,6 +44,7 @@ require ( golang.org/x/sys v0.33.0 golang.org/x/time v0.11.0 golang.org/x/tools v0.33.0 + google.golang.org/protobuf v1.36.5 gopkg.in/yaml.v3 v3.0.1 storj.io/drpc v0.0.34 ) @@ -110,7 +112,6 @@ require ( golang.org/x/mod v0.24.0 // indirect golang.org/x/sync v0.14.0 // indirect golang.org/x/text v0.25.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect lukechampine.com/blake3 v1.4.0 // indirect modernc.org/libc v1.61.13 // indirect modernc.org/mathutil v1.7.1 // indirect diff --git a/go.sum b/go.sum index ca8d63d0a..9aa1bbec7 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,6 @@ github.com/anyproto/go-slip21 v1.0.0 h1:CI7lUqTIwmPOEGVAj4jyNLoICvueh++0U2HoAi3m github.com/anyproto/go-slip21 v1.0.0/go.mod h1:gbIJt7HAdr5DuT4f2pFTKCBSUWYsm/fysHBNqgsuxT0= github.com/anyproto/lexid v0.0.4 h1:2ztI0y5pNdtojd3vChw/YV/P6IO9pB7PccYysImDxWI= github.com/anyproto/lexid v0.0.4/go.mod h1:2RfpYiZkgoNmSDklXdwCCwGlso1FIp9Te8ZtoF3/Ehg= -github.com/anyproto/protobuf v1.3.3-0.20240814124528-72b8c7e0e0f5 h1:aY7tBzQ+z8Hr/v8vOL4/EaKwPZx+J/ClZ1WuD6sqPvE= -github.com/anyproto/protobuf v1.3.3-0.20240814124528-72b8c7e0e0f5/go.mod h1:5+PHE01DgsDPkralb8MYmGg2sPQahsqEJ9ue7ciDHKg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -96,6 +94,8 @@ github.com/goccy/go-graphviz v0.2.9/go.mod h1:hssjl/qbvUXGmloY81BwXt2nqoApKo7DFg github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= @@ -162,8 +162,6 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= @@ -279,6 +277,8 @@ github.com/pion/turn/v4 v4.0.0/go.mod h1:MuPDkm15nYSklKpN8vWJ9W2M0PlyQZqYt1McGux github.com/pion/webrtc/v4 v4.0.10 h1:Hq/JLjhqLxi+NmCtE8lnRPDr8H4LcNvwg8OxVcdv56Q= github.com/pion/webrtc/v4 v4.0.10/go.mod h1:ViHLVaNpiuvaH8pdiuQxuA9awuE6KVzAXx3vVWilOck= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= +github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= @@ -338,8 +338,6 @@ github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= @@ -385,8 +383,6 @@ golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+o golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s= golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= @@ -394,15 +390,11 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= @@ -410,7 +402,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -429,14 +420,11 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= diff --git a/identityrepo/identityrepoproto/identityrepo.pb.go b/identityrepo/identityrepoproto/identityrepo.pb.go index 9051b22ba..cf604711d 100644 --- a/identityrepo/identityrepoproto/identityrepo.pb.go +++ b/identityrepo/identityrepoproto/identityrepo.pb.go @@ -1,1718 +1,498 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: identityrepo/identityrepoproto/protos/identityrepo.proto package identityrepoproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type Data struct { + state protoimpl.MessageState `protogen:"open.v1"` // kind is a string representing the kind of data Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` // data is a byte payload Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // data signature - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Data) Reset() { *m = Data{} } -func (m *Data) String() string { return proto.CompactTextString(m) } -func (*Data) ProtoMessage() {} -func (*Data) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{0} +func (x *Data) Reset() { + *x = Data{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Data) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Data.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *Data) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Data.Merge(m, src) -} -func (m *Data) XXX_Size() int { - return m.Size() -} -func (m *Data) XXX_DiscardUnknown() { - xxx_messageInfo_Data.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_Data proto.InternalMessageInfo +// Deprecated: Use Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{0} +} -func (m *Data) GetKind() string { - if m != nil { - return m.Kind +func (x *Data) GetKind() string { + if x != nil { + return x.Kind } return "" } -func (m *Data) GetData() []byte { - if m != nil { - return m.Data +func (x *Data) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *Data) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *Data) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type DataWithIdentity struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Data []*Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Data []*Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DataWithIdentity) Reset() { *m = DataWithIdentity{} } -func (m *DataWithIdentity) String() string { return proto.CompactTextString(m) } -func (*DataWithIdentity) ProtoMessage() {} -func (*DataWithIdentity) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{1} +func (x *DataWithIdentity) Reset() { + *x = DataWithIdentity{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DataWithIdentity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DataWithIdentity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataWithIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataWithIdentity.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DataWithIdentity) ProtoMessage() {} + +func (x *DataWithIdentity) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *DataWithIdentity) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *DataWithIdentity) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataWithIdentity.Merge(m, src) -} -func (m *DataWithIdentity) XXX_Size() int { - return m.Size() -} -func (m *DataWithIdentity) XXX_DiscardUnknown() { - xxx_messageInfo_DataWithIdentity.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DataWithIdentity proto.InternalMessageInfo +// Deprecated: Use DataWithIdentity.ProtoReflect.Descriptor instead. +func (*DataWithIdentity) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{1} +} -func (m *DataWithIdentity) GetIdentity() string { - if m != nil { - return m.Identity +func (x *DataWithIdentity) GetIdentity() string { + if x != nil { + return x.Identity } return "" } -func (m *DataWithIdentity) GetData() []*Data { - if m != nil { - return m.Data +func (x *DataWithIdentity) GetData() []*Data { + if x != nil { + return x.Data } return nil } type DataPutRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // string representation of identity, must be equal handshake result Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // data to save - Data []*Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + Data []*Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DataPutRequest) Reset() { *m = DataPutRequest{} } -func (m *DataPutRequest) String() string { return proto.CompactTextString(m) } -func (*DataPutRequest) ProtoMessage() {} -func (*DataPutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{2} +func (x *DataPutRequest) Reset() { + *x = DataPutRequest{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DataPutRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DataPutRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataPutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataPutRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DataPutRequest) ProtoMessage() {} + +func (x *DataPutRequest) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *DataPutRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *DataPutRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataPutRequest.Merge(m, src) -} -func (m *DataPutRequest) XXX_Size() int { - return m.Size() -} -func (m *DataPutRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DataPutRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DataPutRequest proto.InternalMessageInfo +// Deprecated: Use DataPutRequest.ProtoReflect.Descriptor instead. +func (*DataPutRequest) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{2} +} -func (m *DataPutRequest) GetIdentity() string { - if m != nil { - return m.Identity +func (x *DataPutRequest) GetIdentity() string { + if x != nil { + return x.Identity } return "" } -func (m *DataPutRequest) GetData() []*Data { - if m != nil { - return m.Data +func (x *DataPutRequest) GetData() []*Data { + if x != nil { + return x.Data } return nil } type DataDeleteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // string representation of identity, must be equal handshake result Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // kinds of data to delete, if empty all kinds will be deleted - Kinds []string `protobuf:"bytes,2,rep,name=kinds,proto3" json:"kinds,omitempty"` + Kinds []string `protobuf:"bytes,2,rep,name=kinds,proto3" json:"kinds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DataDeleteRequest) Reset() { *m = DataDeleteRequest{} } -func (m *DataDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*DataDeleteRequest) ProtoMessage() {} -func (*DataDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{3} +func (x *DataDeleteRequest) Reset() { + *x = DataDeleteRequest{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DataDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DataDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DataDeleteRequest) ProtoMessage() {} + +func (x *DataDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *DataDeleteRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *DataDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataDeleteRequest.Merge(m, src) -} -func (m *DataDeleteRequest) XXX_Size() int { - return m.Size() -} -func (m *DataDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DataDeleteRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DataDeleteRequest proto.InternalMessageInfo +// Deprecated: Use DataDeleteRequest.ProtoReflect.Descriptor instead. +func (*DataDeleteRequest) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{3} +} -func (m *DataDeleteRequest) GetIdentity() string { - if m != nil { - return m.Identity +func (x *DataDeleteRequest) GetIdentity() string { + if x != nil { + return x.Identity } return "" } -func (m *DataDeleteRequest) GetKinds() []string { - if m != nil { - return m.Kinds +func (x *DataDeleteRequest) GetKinds() []string { + if x != nil { + return x.Kinds } return nil } type DataPullRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // list of identities wanted to request Identities []string `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"` // kinds of data wanted to request - Kinds []string `protobuf:"bytes,2,rep,name=kinds,proto3" json:"kinds,omitempty"` -} - -func (m *DataPullRequest) Reset() { *m = DataPullRequest{} } -func (m *DataPullRequest) String() string { return proto.CompactTextString(m) } -func (*DataPullRequest) ProtoMessage() {} -func (*DataPullRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{4} -} -func (m *DataPullRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DataPullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataPullRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DataPullRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *DataPullRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataPullRequest.Merge(m, src) -} -func (m *DataPullRequest) XXX_Size() int { - return m.Size() -} -func (m *DataPullRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DataPullRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DataPullRequest proto.InternalMessageInfo - -func (m *DataPullRequest) GetIdentities() []string { - if m != nil { - return m.Identities - } - return nil -} - -func (m *DataPullRequest) GetKinds() []string { - if m != nil { - return m.Kinds - } - return nil -} - -type DataPullResponse struct { - Data []*DataWithIdentity `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` -} - -func (m *DataPullResponse) Reset() { *m = DataPullResponse{} } -func (m *DataPullResponse) String() string { return proto.CompactTextString(m) } -func (*DataPullResponse) ProtoMessage() {} -func (*DataPullResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{5} -} -func (m *DataPullResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DataPullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataPullResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DataPullResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *DataPullResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataPullResponse.Merge(m, src) -} -func (m *DataPullResponse) XXX_Size() int { - return m.Size() -} -func (m *DataPullResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DataPullResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DataPullResponse proto.InternalMessageInfo - -func (m *DataPullResponse) GetData() []*DataWithIdentity { - if m != nil { - return m.Data - } - return nil -} - -type Ok struct { -} - -func (m *Ok) Reset() { *m = Ok{} } -func (m *Ok) String() string { return proto.CompactTextString(m) } -func (*Ok) ProtoMessage() {} -func (*Ok) Descriptor() ([]byte, []int) { - return fileDescriptor_fff72e8611224dab, []int{6} -} -func (m *Ok) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ok) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ok.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Ok) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Ok) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ok.Merge(m, src) -} -func (m *Ok) XXX_Size() int { - return m.Size() -} -func (m *Ok) XXX_DiscardUnknown() { - xxx_messageInfo_Ok.DiscardUnknown(m) -} - -var xxx_messageInfo_Ok proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Data)(nil), "identityRepo.Data") - proto.RegisterType((*DataWithIdentity)(nil), "identityRepo.DataWithIdentity") - proto.RegisterType((*DataPutRequest)(nil), "identityRepo.DataPutRequest") - proto.RegisterType((*DataDeleteRequest)(nil), "identityRepo.DataDeleteRequest") - proto.RegisterType((*DataPullRequest)(nil), "identityRepo.DataPullRequest") - proto.RegisterType((*DataPullResponse)(nil), "identityRepo.DataPullResponse") - proto.RegisterType((*Ok)(nil), "identityRepo.Ok") -} - -func init() { - proto.RegisterFile("identityrepo/identityrepoproto/protos/identityrepo.proto", fileDescriptor_fff72e8611224dab) -} - -var fileDescriptor_fff72e8611224dab = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x4f, 0x4b, 0x02, 0x41, - 0x18, 0xc6, 0x1d, 0xb5, 0xd2, 0x37, 0x29, 0x7b, 0xe9, 0xb0, 0x88, 0x4d, 0xb2, 0x87, 0xf0, 0xa4, - 0x60, 0x17, 0x3b, 0x05, 0x61, 0x85, 0x10, 0x18, 0x4b, 0x14, 0x74, 0xdb, 0x70, 0xa8, 0x41, 0xd9, - 0xdd, 0x9c, 0xf1, 0xd0, 0xb7, 0xe8, 0x63, 0x75, 0xf4, 0x12, 0x74, 0x0c, 0xfd, 0x22, 0x31, 0x7f, - 0x56, 0x77, 0x59, 0x8d, 0x0e, 0x5d, 0x76, 0xe7, 0x7d, 0xdf, 0x99, 0xdf, 0x33, 0xcf, 0x03, 0x03, - 0x5d, 0x3e, 0x64, 0x81, 0xe4, 0xf2, 0x6d, 0xc2, 0xa2, 0xb0, 0x9d, 0x2c, 0xa2, 0x49, 0x28, 0xc3, - 0xb6, 0xfe, 0x8a, 0xd4, 0xa0, 0xa5, 0x7b, 0x58, 0x89, 0x7b, 0x1e, 0x8b, 0x42, 0xf7, 0x06, 0x8a, - 0x3d, 0x5f, 0xfa, 0x88, 0x50, 0x1c, 0xf1, 0x60, 0xe8, 0x90, 0x06, 0x69, 0x96, 0x3d, 0xbd, 0x56, - 0xbd, 0xa1, 0x2f, 0x7d, 0x27, 0xdf, 0x20, 0xcd, 0x8a, 0xa7, 0xd7, 0x58, 0x87, 0xb2, 0xe0, 0xcf, - 0x81, 0x2f, 0xa7, 0x13, 0xe6, 0x14, 0xf4, 0x60, 0xd5, 0x70, 0xef, 0xa1, 0xaa, 0x68, 0x0f, 0x5c, - 0xbe, 0xf4, 0xad, 0x0a, 0xd6, 0xa0, 0x14, 0x2b, 0x5a, 0xfa, 0xb2, 0xc6, 0x93, 0xa5, 0x42, 0xa1, - 0xb9, 0xdb, 0xc1, 0x56, 0xf2, 0x6a, 0x2d, 0x45, 0x32, 0xaa, 0xee, 0x1d, 0xec, 0xa9, 0xea, 0x76, - 0x2a, 0x3d, 0xf6, 0x3a, 0x65, 0x42, 0xfe, 0x0b, 0xf5, 0x12, 0x0e, 0x54, 0xd5, 0x63, 0x63, 0x26, - 0xd9, 0x5f, 0xc0, 0x87, 0xb0, 0xa5, 0x82, 0x11, 0x9a, 0x5c, 0xf6, 0x4c, 0xe1, 0x5e, 0xc3, 0xbe, - 0xb9, 0xdc, 0x78, 0x1c, 0x43, 0x28, 0x80, 0x3d, 0xc4, 0x99, 0x70, 0x88, 0xde, 0x9d, 0xe8, 0x6c, - 0x00, 0x5d, 0x99, 0xf4, 0x0c, 0x48, 0x44, 0x61, 0x20, 0x18, 0x76, 0xac, 0x17, 0xa2, 0xbd, 0xd0, - 0xac, 0x97, 0x64, 0xd6, 0xd6, 0x57, 0x11, 0xf2, 0x83, 0x51, 0xe7, 0x93, 0x40, 0xa5, 0x9f, 0xd8, - 0x8d, 0x67, 0xb0, 0x63, 0x43, 0xc4, 0x7a, 0x96, 0xb3, 0xca, 0xb6, 0x56, 0x4d, 0x4f, 0x07, 0x23, - 0x3c, 0x07, 0x58, 0x25, 0x85, 0xc7, 0xd9, 0xd3, 0xa9, 0x0c, 0xd7, 0x00, 0xfa, 0x50, 0x8a, 0xad, - 0xe1, 0xd1, 0x3a, 0xf1, 0x65, 0x76, 0x35, 0xba, 0x69, 0x6c, 0x12, 0xb9, 0xe8, 0x7e, 0xcc, 0x29, - 0x99, 0xcd, 0x29, 0xf9, 0x9e, 0x53, 0xf2, 0xbe, 0xa0, 0xb9, 0xd9, 0x82, 0xe6, 0xbe, 0x16, 0x34, - 0xf7, 0x48, 0x7f, 0x7f, 0x13, 0x4f, 0xdb, 0xfa, 0x77, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0x42, - 0x4c, 0xac, 0xe7, 0x3c, 0x03, 0x00, 0x00, -} - -func (m *Data) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Data) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if len(m.Kind) > 0 { - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataWithIdentity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataWithIdentity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DataWithIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIdentityrepo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataPutRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataPutRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DataPutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIdentityrepo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + Kinds []string `protobuf:"bytes,2,rep,name=kinds,proto3" json:"kinds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DataDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Kinds) > 0 { - for iNdEx := len(m.Kinds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Kinds[iNdEx]) - copy(dAtA[i:], m.Kinds[iNdEx]) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Kinds[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func (x *DataPullRequest) Reset() { + *x = DataPullRequest{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DataPullRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *DataPullRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataPullRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*DataPullRequest) ProtoMessage() {} -func (m *DataPullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Kinds) > 0 { - for iNdEx := len(m.Kinds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Kinds[iNdEx]) - copy(dAtA[i:], m.Kinds[iNdEx]) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Kinds[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Identities) > 0 { - for iNdEx := len(m.Identities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Identities[iNdEx]) - copy(dAtA[i:], m.Identities[iNdEx]) - i = encodeVarintIdentityrepo(dAtA, i, uint64(len(m.Identities[iNdEx]))) - i-- - dAtA[i] = 0xa +func (x *DataPullRequest) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *DataPullResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataPullResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DataPullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIdentityrepo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +// Deprecated: Use DataPullRequest.ProtoReflect.Descriptor instead. +func (*DataPullRequest) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{4} } -func (m *Ok) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *DataPullRequest) GetIdentities() []string { + if x != nil { + return x.Identities } - return dAtA[:n], nil -} - -func (m *Ok) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ok) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil + return nil } -func encodeVarintIdentityrepo(dAtA []byte, offset int, v uint64) int { - offset -= sovIdentityrepo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Data) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Kind) - if l > 0 { - n += 1 + l + sovIdentityrepo(uint64(l)) +func (x *DataPullRequest) GetKinds() []string { + if x != nil { + return x.Kinds } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovIdentityrepo(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovIdentityrepo(uint64(l)) - } - return n + return nil } -func (m *DataWithIdentity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovIdentityrepo(uint64(l)) - } - if len(m.Data) > 0 { - for _, e := range m.Data { - l = e.Size() - n += 1 + l + sovIdentityrepo(uint64(l)) - } - } - return n +type DataPullResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []*DataWithIdentity `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DataPutRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovIdentityrepo(uint64(l)) - } - if len(m.Data) > 0 { - for _, e := range m.Data { - l = e.Size() - n += 1 + l + sovIdentityrepo(uint64(l)) - } - } - return n +func (x *DataPullResponse) Reset() { + *x = DataPullResponse{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DataDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovIdentityrepo(uint64(l)) - } - if len(m.Kinds) > 0 { - for _, s := range m.Kinds { - l = len(s) - n += 1 + l + sovIdentityrepo(uint64(l)) - } - } - return n +func (x *DataPullResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataPullRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Identities) > 0 { - for _, s := range m.Identities { - l = len(s) - n += 1 + l + sovIdentityrepo(uint64(l)) - } - } - if len(m.Kinds) > 0 { - for _, s := range m.Kinds { - l = len(s) - n += 1 + l + sovIdentityrepo(uint64(l)) - } - } - return n -} +func (*DataPullResponse) ProtoMessage() {} -func (m *DataPullResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Data) > 0 { - for _, e := range m.Data { - l = e.Size() - n += 1 + l + sovIdentityrepo(uint64(l)) +func (x *DataPullResponse) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return n + return mi.MessageOf(x) } -func (m *Ok) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovIdentityrepo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozIdentityrepo(x uint64) (n int) { - return sovIdentityrepo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +// Deprecated: Use DataPullResponse.ProtoReflect.Descriptor instead. +func (*DataPullResponse) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{5} } -func (m *Data) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *DataPullResponse) GetData() []*DataWithIdentity { + if x != nil { + return x.Data } return nil } -func (m *DataWithIdentity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataWithIdentity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataWithIdentity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, &Data{}) - if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +type Ok struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *DataPutRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataPutRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataPutRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, &Data{}) - if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func (x *Ok) Reset() { + *x = Ok{} + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *DataDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kinds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kinds = append(m.Kinds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func (x *Ok) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataPullRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataPullRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataPullRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identities = append(m.Identities, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kinds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kinds = append(m.Kinds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DataPullResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataPullResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataPullResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIdentityrepo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIdentityrepo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, &DataWithIdentity{}) - if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*Ok) ProtoMessage() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Ok) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Ok: wiretype end group for non-group") +func (x *Ok) ProtoReflect() protoreflect.Message { + mi := &file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipIdentityrepo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIdentityrepo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF + return ms } - return nil -} -func skipIdentityrepo(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIdentityrepo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthIdentityrepo - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupIdentityrepo - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthIdentityrepo - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF + return mi.MessageOf(x) } +// Deprecated: Use Ok.ProtoReflect.Descriptor instead. +func (*Ok) Descriptor() ([]byte, []int) { + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP(), []int{6} +} + +var File_identityrepo_identityrepoproto_protos_identityrepo_proto protoreflect.FileDescriptor + +var file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDesc = string([]byte{ + 0x0a, 0x38, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x72, 0x65, 0x70, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x72, 0x65, 0x70, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x4c, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x56, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x57, 0x69, + 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x54, + 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x45, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x0f, 0x44, + 0x61, 0x74, 0x61, 0x50, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6b, + 0x69, 0x6e, 0x64, 0x73, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x50, 0x75, 0x6c, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x04, 0x0a, 0x02, + 0x4f, 0x6b, 0x32, 0xd5, 0x01, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x70, 0x6f, 0x12, 0x39, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x50, 0x75, 0x74, 0x12, 0x1c, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x4f, 0x6b, 0x12, 0x3f, + 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x4f, 0x6b, 0x12, + 0x49, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x50, 0x75, 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x50, + 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x50, 0x75, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x72, 0x65, 0x70, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +}) + var ( - ErrInvalidLengthIdentityrepo = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIdentityrepo = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupIdentityrepo = fmt.Errorf("proto: unexpected end of group") + file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescOnce sync.Once + file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescData []byte ) + +func file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescGZIP() []byte { + file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescOnce.Do(func() { + file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDesc), len(file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDesc))) + }) + return file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDescData +} + +var file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_identityrepo_identityrepoproto_protos_identityrepo_proto_goTypes = []any{ + (*Data)(nil), // 0: identityRepo.Data + (*DataWithIdentity)(nil), // 1: identityRepo.DataWithIdentity + (*DataPutRequest)(nil), // 2: identityRepo.DataPutRequest + (*DataDeleteRequest)(nil), // 3: identityRepo.DataDeleteRequest + (*DataPullRequest)(nil), // 4: identityRepo.DataPullRequest + (*DataPullResponse)(nil), // 5: identityRepo.DataPullResponse + (*Ok)(nil), // 6: identityRepo.Ok +} +var file_identityrepo_identityrepoproto_protos_identityrepo_proto_depIdxs = []int32{ + 0, // 0: identityRepo.DataWithIdentity.data:type_name -> identityRepo.Data + 0, // 1: identityRepo.DataPutRequest.data:type_name -> identityRepo.Data + 1, // 2: identityRepo.DataPullResponse.data:type_name -> identityRepo.DataWithIdentity + 2, // 3: identityRepo.IdentityRepo.DataPut:input_type -> identityRepo.DataPutRequest + 3, // 4: identityRepo.IdentityRepo.DataDelete:input_type -> identityRepo.DataDeleteRequest + 4, // 5: identityRepo.IdentityRepo.DataPull:input_type -> identityRepo.DataPullRequest + 6, // 6: identityRepo.IdentityRepo.DataPut:output_type -> identityRepo.Ok + 6, // 7: identityRepo.IdentityRepo.DataDelete:output_type -> identityRepo.Ok + 5, // 8: identityRepo.IdentityRepo.DataPull:output_type -> identityRepo.DataPullResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_identityrepo_identityrepoproto_protos_identityrepo_proto_init() } +func file_identityrepo_identityrepoproto_protos_identityrepo_proto_init() { + if File_identityrepo_identityrepoproto_protos_identityrepo_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDesc), len(file_identityrepo_identityrepoproto_protos_identityrepo_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_identityrepo_identityrepoproto_protos_identityrepo_proto_goTypes, + DependencyIndexes: file_identityrepo_identityrepoproto_protos_identityrepo_proto_depIdxs, + MessageInfos: file_identityrepo_identityrepoproto_protos_identityrepo_proto_msgTypes, + }.Build() + File_identityrepo_identityrepoproto_protos_identityrepo_proto = out.File + file_identityrepo_identityrepoproto_protos_identityrepo_proto_goTypes = nil + file_identityrepo_identityrepoproto_protos_identityrepo_proto_depIdxs = nil +} diff --git a/identityrepo/identityrepoproto/identityrepo_drpc.pb.go b/identityrepo/identityrepoproto/identityrepo_drpc.pb.go index 367f1b020..e36b3e6e6 100644 --- a/identityrepo/identityrepoproto/identityrepo_drpc.pb.go +++ b/identityrepo/identityrepoproto/identityrepo_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: identityrepo/identityrepoproto/protos/identityrepo.proto package identityrepoproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_identityrepo_identityrepoproto_protos_identityrepo_proto struct{} func (drpcEncoding_File_identityrepo_identityrepoproto_protos_identityrepo_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_identityrepo_identityrepoproto_protos_identityrepo_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_identityrepo_identityrepoproto_protos_identityrepo_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_identityrepo_identityrepoproto_protos_identityrepo_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCIdentityRepoClient interface { diff --git a/identityrepo/identityrepoproto/identityrepo_vtproto.pb.go b/identityrepo/identityrepoproto/identityrepo_vtproto.pb.go new file mode 100644 index 000000000..6bd1553fb --- /dev/null +++ b/identityrepo/identityrepoproto/identityrepo_vtproto.pb.go @@ -0,0 +1,1237 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: identityrepo/identityrepoproto/protos/identityrepo.proto + +package identityrepoproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Data) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Data) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Data) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if len(m.Kind) > 0 { + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataWithIdentity) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataWithIdentity) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataWithIdentity) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Data[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataPutRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataPutRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataPutRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Data[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Kinds) > 0 { + for iNdEx := len(m.Kinds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Kinds[iNdEx]) + copy(dAtA[i:], m.Kinds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Kinds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataPullRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataPullRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataPullRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Kinds) > 0 { + for iNdEx := len(m.Kinds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Kinds[iNdEx]) + copy(dAtA[i:], m.Kinds[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Kinds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Identities) > 0 { + for iNdEx := len(m.Identities) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Identities[iNdEx]) + copy(dAtA[i:], m.Identities[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identities[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DataPullResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataPullResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataPullResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Data[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Ok) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Ok) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Ok) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *Data) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Kind) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DataWithIdentity) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DataPutRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DataDeleteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Kinds) > 0 { + for _, s := range m.Kinds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DataPullRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Identities) > 0 { + for _, s := range m.Identities { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Kinds) > 0 { + for _, s := range m.Kinds { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DataPullResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Ok) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *Data) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataWithIdentity) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataWithIdentity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataWithIdentity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, &Data{}) + if err := m.Data[len(m.Data)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataPutRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataPutRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataPutRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, &Data{}) + if err := m.Data[len(m.Data)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataDeleteRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataDeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kinds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kinds = append(m.Kinds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataPullRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataPullRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataPullRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identities = append(m.Identities, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kinds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kinds = append(m.Kinds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataPullResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataPullResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataPullResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, &DataWithIdentity{}) + if err := m.Data[len(m.Data)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Ok) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ok: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go index 00f41f3ae..dac69bbe4 100644 --- a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go +++ b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go @@ -5,6 +5,7 @@ // // mockgen -destination=mock/mock_nameserviceclient.go -package=mock_nameserviceclient github.com/anyproto/any-sync/nameservice/nameserviceclient AnyNsClientService // + // Package mock_nameserviceclient is a generated GoMock package. package mock_nameserviceclient @@ -21,6 +22,7 @@ import ( type MockAnyNsClientService struct { ctrl *gomock.Controller recorder *MockAnyNsClientServiceMockRecorder + isgomock struct{} } // MockAnyNsClientServiceMockRecorder is the mock recorder for MockAnyNsClientService. @@ -41,197 +43,197 @@ func (m *MockAnyNsClientService) EXPECT() *MockAnyNsClientServiceMockRecorder { } // AdminFundUserAccount mocks base method. -func (m *MockAnyNsClientService) AdminFundUserAccount(arg0 context.Context, arg1 *nameserviceproto.AdminFundUserAccountRequestSigned) (*nameserviceproto.OperationResponse, error) { +func (m *MockAnyNsClientService) AdminFundUserAccount(ctx context.Context, in *nameserviceproto.AdminFundUserAccountRequestSigned) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AdminFundUserAccount", arg0, arg1) + ret := m.ctrl.Call(m, "AdminFundUserAccount", ctx, in) ret0, _ := ret[0].(*nameserviceproto.OperationResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AdminFundUserAccount indicates an expected call of AdminFundUserAccount. -func (mr *MockAnyNsClientServiceMockRecorder) AdminFundUserAccount(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) AdminFundUserAccount(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminFundUserAccount", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminFundUserAccount), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminFundUserAccount", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminFundUserAccount), ctx, in) } // AdminRegisterName mocks base method. -func (m *MockAnyNsClientService) AdminRegisterName(arg0 context.Context, arg1 *nameserviceproto.NameRegisterRequestSigned) (*nameserviceproto.OperationResponse, error) { +func (m *MockAnyNsClientService) AdminRegisterName(ctx context.Context, in *nameserviceproto.NameRegisterRequestSigned) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AdminRegisterName", arg0, arg1) + ret := m.ctrl.Call(m, "AdminRegisterName", ctx, in) ret0, _ := ret[0].(*nameserviceproto.OperationResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AdminRegisterName indicates an expected call of AdminRegisterName. -func (mr *MockAnyNsClientServiceMockRecorder) AdminRegisterName(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) AdminRegisterName(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminRegisterName", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminRegisterName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminRegisterName", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminRegisterName), ctx, in) } // AdminRenewName mocks base method. -func (m *MockAnyNsClientService) AdminRenewName(arg0 context.Context, arg1 *nameserviceproto.NameRenewRequestSigned) (*nameserviceproto.OperationResponse, error) { +func (m *MockAnyNsClientService) AdminRenewName(ctx context.Context, in *nameserviceproto.NameRenewRequestSigned) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AdminRenewName", arg0, arg1) + ret := m.ctrl.Call(m, "AdminRenewName", ctx, in) ret0, _ := ret[0].(*nameserviceproto.OperationResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AdminRenewName indicates an expected call of AdminRenewName. -func (mr *MockAnyNsClientServiceMockRecorder) AdminRenewName(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) AdminRenewName(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminRenewName", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminRenewName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminRenewName", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminRenewName), ctx, in) } // BatchGetNameByAddress mocks base method. -func (m *MockAnyNsClientService) BatchGetNameByAddress(arg0 context.Context, arg1 *nameserviceproto.BatchNameByAddressRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { +func (m *MockAnyNsClientService) BatchGetNameByAddress(ctx context.Context, in *nameserviceproto.BatchNameByAddressRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BatchGetNameByAddress", arg0, arg1) + ret := m.ctrl.Call(m, "BatchGetNameByAddress", ctx, in) ret0, _ := ret[0].(*nameserviceproto.BatchNameByAddressResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // BatchGetNameByAddress indicates an expected call of BatchGetNameByAddress. -func (mr *MockAnyNsClientServiceMockRecorder) BatchGetNameByAddress(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) BatchGetNameByAddress(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAddress", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchGetNameByAddress), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAddress", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchGetNameByAddress), ctx, in) } // BatchGetNameByAnyId mocks base method. -func (m *MockAnyNsClientService) BatchGetNameByAnyId(arg0 context.Context, arg1 *nameserviceproto.BatchNameByAnyIdRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { +func (m *MockAnyNsClientService) BatchGetNameByAnyId(ctx context.Context, in *nameserviceproto.BatchNameByAnyIdRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BatchGetNameByAnyId", arg0, arg1) + ret := m.ctrl.Call(m, "BatchGetNameByAnyId", ctx, in) ret0, _ := ret[0].(*nameserviceproto.BatchNameByAddressResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // BatchGetNameByAnyId indicates an expected call of BatchGetNameByAnyId. -func (mr *MockAnyNsClientServiceMockRecorder) BatchGetNameByAnyId(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) BatchGetNameByAnyId(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAnyId", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchGetNameByAnyId), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAnyId", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchGetNameByAnyId), ctx, in) } // BatchIsNameAvailable mocks base method. -func (m *MockAnyNsClientService) BatchIsNameAvailable(arg0 context.Context, arg1 *nameserviceproto.BatchNameAvailableRequest) (*nameserviceproto.BatchNameAvailableResponse, error) { +func (m *MockAnyNsClientService) BatchIsNameAvailable(ctx context.Context, in *nameserviceproto.BatchNameAvailableRequest) (*nameserviceproto.BatchNameAvailableResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BatchIsNameAvailable", arg0, arg1) + ret := m.ctrl.Call(m, "BatchIsNameAvailable", ctx, in) ret0, _ := ret[0].(*nameserviceproto.BatchNameAvailableResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // BatchIsNameAvailable indicates an expected call of BatchIsNameAvailable. -func (mr *MockAnyNsClientServiceMockRecorder) BatchIsNameAvailable(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) BatchIsNameAvailable(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchIsNameAvailable", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchIsNameAvailable), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchIsNameAvailable", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchIsNameAvailable), ctx, in) } // CreateOperation mocks base method. -func (m *MockAnyNsClientService) CreateOperation(arg0 context.Context, arg1 *nameserviceproto.CreateUserOperationRequestSigned) (*nameserviceproto.OperationResponse, error) { +func (m *MockAnyNsClientService) CreateOperation(ctx context.Context, in *nameserviceproto.CreateUserOperationRequestSigned) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOperation", arg0, arg1) + ret := m.ctrl.Call(m, "CreateOperation", ctx, in) ret0, _ := ret[0].(*nameserviceproto.OperationResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateOperation indicates an expected call of CreateOperation. -func (mr *MockAnyNsClientServiceMockRecorder) CreateOperation(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) CreateOperation(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOperation", reflect.TypeOf((*MockAnyNsClientService)(nil).CreateOperation), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOperation", reflect.TypeOf((*MockAnyNsClientService)(nil).CreateOperation), ctx, in) } // GetNameByAddress mocks base method. -func (m *MockAnyNsClientService) GetNameByAddress(arg0 context.Context, arg1 *nameserviceproto.NameByAddressRequest) (*nameserviceproto.NameByAddressResponse, error) { +func (m *MockAnyNsClientService) GetNameByAddress(ctx context.Context, in *nameserviceproto.NameByAddressRequest) (*nameserviceproto.NameByAddressResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNameByAddress", arg0, arg1) + ret := m.ctrl.Call(m, "GetNameByAddress", ctx, in) ret0, _ := ret[0].(*nameserviceproto.NameByAddressResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // GetNameByAddress indicates an expected call of GetNameByAddress. -func (mr *MockAnyNsClientServiceMockRecorder) GetNameByAddress(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) GetNameByAddress(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAddress", reflect.TypeOf((*MockAnyNsClientService)(nil).GetNameByAddress), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAddress", reflect.TypeOf((*MockAnyNsClientService)(nil).GetNameByAddress), ctx, in) } // GetNameByAnyId mocks base method. -func (m *MockAnyNsClientService) GetNameByAnyId(arg0 context.Context, arg1 *nameserviceproto.NameByAnyIdRequest) (*nameserviceproto.NameByAddressResponse, error) { +func (m *MockAnyNsClientService) GetNameByAnyId(ctx context.Context, in *nameserviceproto.NameByAnyIdRequest) (*nameserviceproto.NameByAddressResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNameByAnyId", arg0, arg1) + ret := m.ctrl.Call(m, "GetNameByAnyId", ctx, in) ret0, _ := ret[0].(*nameserviceproto.NameByAddressResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // GetNameByAnyId indicates an expected call of GetNameByAnyId. -func (mr *MockAnyNsClientServiceMockRecorder) GetNameByAnyId(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) GetNameByAnyId(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAnyId", reflect.TypeOf((*MockAnyNsClientService)(nil).GetNameByAnyId), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAnyId", reflect.TypeOf((*MockAnyNsClientService)(nil).GetNameByAnyId), ctx, in) } // GetOperation mocks base method. -func (m *MockAnyNsClientService) GetOperation(arg0 context.Context, arg1 *nameserviceproto.GetOperationStatusRequest) (*nameserviceproto.OperationResponse, error) { +func (m *MockAnyNsClientService) GetOperation(ctx context.Context, in *nameserviceproto.GetOperationStatusRequest) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOperation", arg0, arg1) + ret := m.ctrl.Call(m, "GetOperation", ctx, in) ret0, _ := ret[0].(*nameserviceproto.OperationResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // GetOperation indicates an expected call of GetOperation. -func (mr *MockAnyNsClientServiceMockRecorder) GetOperation(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) GetOperation(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockAnyNsClientService)(nil).GetOperation), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockAnyNsClientService)(nil).GetOperation), ctx, in) } // GetUserAccount mocks base method. -func (m *MockAnyNsClientService) GetUserAccount(arg0 context.Context, arg1 *nameserviceproto.GetUserAccountRequest) (*nameserviceproto.UserAccount, error) { +func (m *MockAnyNsClientService) GetUserAccount(ctx context.Context, in *nameserviceproto.GetUserAccountRequest) (*nameserviceproto.UserAccount, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetUserAccount", arg0, arg1) + ret := m.ctrl.Call(m, "GetUserAccount", ctx, in) ret0, _ := ret[0].(*nameserviceproto.UserAccount) ret1, _ := ret[1].(error) return ret0, ret1 } // GetUserAccount indicates an expected call of GetUserAccount. -func (mr *MockAnyNsClientServiceMockRecorder) GetUserAccount(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) GetUserAccount(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserAccount", reflect.TypeOf((*MockAnyNsClientService)(nil).GetUserAccount), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserAccount", reflect.TypeOf((*MockAnyNsClientService)(nil).GetUserAccount), ctx, in) } // Init mocks base method. -func (m *MockAnyNsClientService) Init(arg0 *app.App) error { +func (m *MockAnyNsClientService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockAnyNsClientServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAnyNsClientService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAnyNsClientService)(nil).Init), a) } // IsNameAvailable mocks base method. -func (m *MockAnyNsClientService) IsNameAvailable(arg0 context.Context, arg1 *nameserviceproto.NameAvailableRequest) (*nameserviceproto.NameAvailableResponse, error) { +func (m *MockAnyNsClientService) IsNameAvailable(ctx context.Context, in *nameserviceproto.NameAvailableRequest) (*nameserviceproto.NameAvailableResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsNameAvailable", arg0, arg1) + ret := m.ctrl.Call(m, "IsNameAvailable", ctx, in) ret0, _ := ret[0].(*nameserviceproto.NameAvailableResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // IsNameAvailable indicates an expected call of IsNameAvailable. -func (mr *MockAnyNsClientServiceMockRecorder) IsNameAvailable(arg0, arg1 any) *gomock.Call { +func (mr *MockAnyNsClientServiceMockRecorder) IsNameAvailable(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNameAvailable", reflect.TypeOf((*MockAnyNsClientService)(nil).IsNameAvailable), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNameAvailable", reflect.TypeOf((*MockAnyNsClientService)(nil).IsNameAvailable), ctx, in) } // Name mocks base method. diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 07a3cd693..b213be795 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -1,347 +1,299 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: nameservice/nameserviceproto/protos/nameservice.proto package nameserviceproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type NameAvailableRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // Name including .any suffix - FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameAvailableRequest) Reset() { *m = NameAvailableRequest{} } -func (m *NameAvailableRequest) String() string { return proto.CompactTextString(m) } -func (*NameAvailableRequest) ProtoMessage() {} -func (*NameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{0} -} -func (m *NameAvailableRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameAvailableRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *NameAvailableRequest) Reset() { + *x = NameAvailableRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameAvailableRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameAvailableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameAvailableRequest.Merge(m, src) -} -func (m *NameAvailableRequest) XXX_Size() int { - return m.Size() + +func (x *NameAvailableRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameAvailableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NameAvailableRequest.DiscardUnknown(m) + +func (*NameAvailableRequest) ProtoMessage() {} + +func (x *NameAvailableRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameAvailableRequest proto.InternalMessageInfo +// Deprecated: Use NameAvailableRequest.ProtoReflect.Descriptor instead. +func (*NameAvailableRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{0} +} -func (m *NameAvailableRequest) GetFullName() string { - if m != nil { - return m.FullName +func (x *NameAvailableRequest) GetFullName() string { + if x != nil { + return x.FullName } return "" } type BatchNameAvailableRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // Names including .any suffix - FullNames []string `protobuf:"bytes,1,rep,name=fullNames,proto3" json:"fullNames,omitempty"` + FullNames []string `protobuf:"bytes,1,rep,name=fullNames,proto3" json:"fullNames,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BatchNameAvailableRequest) Reset() { *m = BatchNameAvailableRequest{} } -func (m *BatchNameAvailableRequest) String() string { return proto.CompactTextString(m) } -func (*BatchNameAvailableRequest) ProtoMessage() {} -func (*BatchNameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{1} -} -func (m *BatchNameAvailableRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchNameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchNameAvailableRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BatchNameAvailableRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BatchNameAvailableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchNameAvailableRequest.Merge(m, src) +func (x *BatchNameAvailableRequest) Reset() { + *x = BatchNameAvailableRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BatchNameAvailableRequest) XXX_Size() int { - return m.Size() + +func (x *BatchNameAvailableRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BatchNameAvailableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchNameAvailableRequest.DiscardUnknown(m) + +func (*BatchNameAvailableRequest) ProtoMessage() {} + +func (x *BatchNameAvailableRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BatchNameAvailableRequest proto.InternalMessageInfo +// Deprecated: Use BatchNameAvailableRequest.ProtoReflect.Descriptor instead. +func (*BatchNameAvailableRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{1} +} -func (m *BatchNameAvailableRequest) GetFullNames() []string { - if m != nil { - return m.FullNames +func (x *BatchNameAvailableRequest) GetFullNames() []string { + if x != nil { + return x.FullNames } return nil } type NameByAddressRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // EOA -> SCW -> name // A SCW Ethereum address that owns that name OwnerScwEthAddress string `protobuf:"bytes,1,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameByAddressRequest) Reset() { *m = NameByAddressRequest{} } -func (m *NameByAddressRequest) String() string { return proto.CompactTextString(m) } -func (*NameByAddressRequest) ProtoMessage() {} -func (*NameByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{2} -} -func (m *NameByAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameByAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *NameByAddressRequest) Reset() { + *x = NameByAddressRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameByAddressRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameByAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameByAddressRequest.Merge(m, src) -} -func (m *NameByAddressRequest) XXX_Size() int { - return m.Size() + +func (x *NameByAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameByAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NameByAddressRequest.DiscardUnknown(m) + +func (*NameByAddressRequest) ProtoMessage() {} + +func (x *NameByAddressRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameByAddressRequest proto.InternalMessageInfo +// Deprecated: Use NameByAddressRequest.ProtoReflect.Descriptor instead. +func (*NameByAddressRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{2} +} -func (m *NameByAddressRequest) GetOwnerScwEthAddress() string { - if m != nil { - return m.OwnerScwEthAddress +func (x *NameByAddressRequest) GetOwnerScwEthAddress() string { + if x != nil { + return x.OwnerScwEthAddress } return "" } type BatchNameByAddressRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // EOA -> SCW -> name // A SCW Ethereum address that owns that name OwnerScwEthAddresses []string `protobuf:"bytes,1,rep,name=ownerScwEthAddresses,proto3" json:"ownerScwEthAddresses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BatchNameByAddressRequest) Reset() { *m = BatchNameByAddressRequest{} } -func (m *BatchNameByAddressRequest) String() string { return proto.CompactTextString(m) } -func (*BatchNameByAddressRequest) ProtoMessage() {} -func (*BatchNameByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{3} -} -func (m *BatchNameByAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchNameByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchNameByAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BatchNameByAddressRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BatchNameByAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchNameByAddressRequest.Merge(m, src) +func (x *BatchNameByAddressRequest) Reset() { + *x = BatchNameByAddressRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BatchNameByAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchNameByAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchNameByAddressRequest.DiscardUnknown(m) + +func (x *BatchNameByAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_BatchNameByAddressRequest proto.InternalMessageInfo +func (*BatchNameByAddressRequest) ProtoMessage() {} -func (m *BatchNameByAddressRequest) GetOwnerScwEthAddresses() []string { - if m != nil { - return m.OwnerScwEthAddresses +func (x *BatchNameByAddressRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type NameByAnyIdRequest struct { - AnyAddress string `protobuf:"bytes,1,opt,name=anyAddress,proto3" json:"anyAddress,omitempty"` +// Deprecated: Use BatchNameByAddressRequest.ProtoReflect.Descriptor instead. +func (*BatchNameByAddressRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{3} } -func (m *NameByAnyIdRequest) Reset() { *m = NameByAnyIdRequest{} } -func (m *NameByAnyIdRequest) String() string { return proto.CompactTextString(m) } -func (*NameByAnyIdRequest) ProtoMessage() {} -func (*NameByAnyIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{4} -} -func (m *NameByAnyIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameByAnyIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameByAnyIdRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameByAnyIdRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *BatchNameByAddressRequest) GetOwnerScwEthAddresses() []string { + if x != nil { + return x.OwnerScwEthAddresses } - return b, nil + return nil } -func (m *NameByAnyIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameByAnyIdRequest.Merge(m, src) + +type NameByAnyIdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AnyAddress string `protobuf:"bytes,1,opt,name=anyAddress,proto3" json:"anyAddress,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameByAnyIdRequest) XXX_Size() int { - return m.Size() + +func (x *NameByAnyIdRequest) Reset() { + *x = NameByAnyIdRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameByAnyIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NameByAnyIdRequest.DiscardUnknown(m) + +func (x *NameByAnyIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_NameByAnyIdRequest proto.InternalMessageInfo +func (*NameByAnyIdRequest) ProtoMessage() {} -func (m *NameByAnyIdRequest) GetAnyAddress() string { - if m != nil { - return m.AnyAddress +func (x *NameByAnyIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type BatchNameByAnyIdRequest struct { - AnyAddresses []string `protobuf:"bytes,1,rep,name=anyAddresses,proto3" json:"anyAddresses,omitempty"` +// Deprecated: Use NameByAnyIdRequest.ProtoReflect.Descriptor instead. +func (*NameByAnyIdRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{4} } -func (m *BatchNameByAnyIdRequest) Reset() { *m = BatchNameByAnyIdRequest{} } -func (m *BatchNameByAnyIdRequest) String() string { return proto.CompactTextString(m) } -func (*BatchNameByAnyIdRequest) ProtoMessage() {} -func (*BatchNameByAnyIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{5} -} -func (m *BatchNameByAnyIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchNameByAnyIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchNameByAnyIdRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *NameByAnyIdRequest) GetAnyAddress() string { + if x != nil { + return x.AnyAddress } + return "" } -func (m *BatchNameByAnyIdRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type BatchNameByAnyIdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AnyAddresses []string `protobuf:"bytes,1,rep,name=anyAddresses,proto3" json:"anyAddresses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BatchNameByAnyIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchNameByAnyIdRequest.Merge(m, src) + +func (x *BatchNameByAnyIdRequest) Reset() { + *x = BatchNameByAnyIdRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BatchNameByAnyIdRequest) XXX_Size() int { - return m.Size() + +func (x *BatchNameByAnyIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BatchNameByAnyIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchNameByAnyIdRequest.DiscardUnknown(m) + +func (*BatchNameByAnyIdRequest) ProtoMessage() {} + +func (x *BatchNameByAnyIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BatchNameByAnyIdRequest proto.InternalMessageInfo +// Deprecated: Use BatchNameByAnyIdRequest.ProtoReflect.Descriptor instead. +func (*BatchNameByAnyIdRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{5} +} -func (m *BatchNameByAnyIdRequest) GetAnyAddresses() []string { - if m != nil { - return m.AnyAddresses +func (x *BatchNameByAnyIdRequest) GetAnyAddresses() []string { + if x != nil { + return x.AnyAddresses } return nil } type NameAvailableResponse struct { - Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` // EOA -> SCW -> name // This field is non-empty only if name is "already registered" OwnerScwEthAddress string `protobuf:"bytes,2,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` @@ -354,1918 +306,405 @@ type NameAvailableResponse struct { // This field is non-empty only if name is "already registered" SpaceId string `protobuf:"bytes,5,opt,name=spaceId,proto3" json:"spaceId,omitempty"` // doesn't work with marashalling/unmarshalling - //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; - NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` + // google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; + NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } -func (m *NameAvailableResponse) String() string { return proto.CompactTextString(m) } -func (*NameAvailableResponse) ProtoMessage() {} -func (*NameAvailableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{6} -} -func (m *NameAvailableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameAvailableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameAvailableResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameAvailableResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameAvailableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameAvailableResponse.Merge(m, src) -} -func (m *NameAvailableResponse) XXX_Size() int { - return m.Size() -} -func (m *NameAvailableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NameAvailableResponse.DiscardUnknown(m) +func (x *NameAvailableResponse) Reset() { + *x = NameAvailableResponse{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -var xxx_messageInfo_NameAvailableResponse proto.InternalMessageInfo - -func (m *NameAvailableResponse) GetAvailable() bool { - if m != nil { - return m.Available - } - return false +func (x *NameAvailableResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameAvailableResponse) GetOwnerScwEthAddress() string { - if m != nil { - return m.OwnerScwEthAddress - } - return "" -} - -func (m *NameAvailableResponse) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress - } - return "" -} +func (*NameAvailableResponse) ProtoMessage() {} -func (m *NameAvailableResponse) GetOwnerAnyAddress() string { - if m != nil { - return m.OwnerAnyAddress - } - return "" -} - -func (m *NameAvailableResponse) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *NameAvailableResponse) GetNameExpires() int64 { - if m != nil { - return m.NameExpires - } - return 0 -} - -type BatchNameAvailableResponse struct { - Results []*NameAvailableResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` -} - -func (m *BatchNameAvailableResponse) Reset() { *m = BatchNameAvailableResponse{} } -func (m *BatchNameAvailableResponse) String() string { return proto.CompactTextString(m) } -func (*BatchNameAvailableResponse) ProtoMessage() {} -func (*BatchNameAvailableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{7} -} -func (m *BatchNameAvailableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchNameAvailableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchNameAvailableResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *NameAvailableResponse) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *BatchNameAvailableResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *BatchNameAvailableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchNameAvailableResponse.Merge(m, src) -} -func (m *BatchNameAvailableResponse) XXX_Size() int { - return m.Size() + return mi.MessageOf(x) } -func (m *BatchNameAvailableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchNameAvailableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchNameAvailableResponse proto.InternalMessageInfo -func (m *BatchNameAvailableResponse) GetResults() []*NameAvailableResponse { - if m != nil { - return m.Results - } - return nil -} - -type NameByAddressResponse struct { - Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *NameByAddressResponse) Reset() { *m = NameByAddressResponse{} } -func (m *NameByAddressResponse) String() string { return proto.CompactTextString(m) } -func (*NameByAddressResponse) ProtoMessage() {} -func (*NameByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{8} -} -func (m *NameByAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameByAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameByAddressResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameByAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameByAddressResponse.Merge(m, src) -} -func (m *NameByAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *NameByAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NameByAddressResponse.DiscardUnknown(m) +// Deprecated: Use NameAvailableResponse.ProtoReflect.Descriptor instead. +func (*NameAvailableResponse) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{6} } -var xxx_messageInfo_NameByAddressResponse proto.InternalMessageInfo - -func (m *NameByAddressResponse) GetFound() bool { - if m != nil { - return m.Found +func (x *NameAvailableResponse) GetAvailable() bool { + if x != nil { + return x.Available } return false } -func (m *NameByAddressResponse) GetName() string { - if m != nil { - return m.Name +func (x *NameAvailableResponse) GetOwnerScwEthAddress() string { + if x != nil { + return x.OwnerScwEthAddress } return "" } -type BatchNameByAddressResponse struct { - Results []*NameByAddressResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` -} - -func (m *BatchNameByAddressResponse) Reset() { *m = BatchNameByAddressResponse{} } -func (m *BatchNameByAddressResponse) String() string { return proto.CompactTextString(m) } -func (*BatchNameByAddressResponse) ProtoMessage() {} -func (*BatchNameByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{9} -} -func (m *BatchNameByAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchNameByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchNameByAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BatchNameByAddressResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BatchNameByAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchNameByAddressResponse.Merge(m, src) -} -func (m *BatchNameByAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchNameByAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchNameByAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchNameByAddressResponse proto.InternalMessageInfo - -func (m *BatchNameByAddressResponse) GetResults() []*NameByAddressResponse { - if m != nil { - return m.Results - } - return nil -} - -func init() { - proto.RegisterType((*NameAvailableRequest)(nil), "NameAvailableRequest") - proto.RegisterType((*BatchNameAvailableRequest)(nil), "BatchNameAvailableRequest") - proto.RegisterType((*NameByAddressRequest)(nil), "NameByAddressRequest") - proto.RegisterType((*BatchNameByAddressRequest)(nil), "BatchNameByAddressRequest") - proto.RegisterType((*NameByAnyIdRequest)(nil), "NameByAnyIdRequest") - proto.RegisterType((*BatchNameByAnyIdRequest)(nil), "BatchNameByAnyIdRequest") - proto.RegisterType((*NameAvailableResponse)(nil), "NameAvailableResponse") - proto.RegisterType((*BatchNameAvailableResponse)(nil), "BatchNameAvailableResponse") - proto.RegisterType((*NameByAddressResponse)(nil), "NameByAddressResponse") - proto.RegisterType((*BatchNameByAddressResponse)(nil), "BatchNameByAddressResponse") -} - -func init() { - proto.RegisterFile("nameservice/nameserviceproto/protos/nameservice.proto", fileDescriptor_06bca2ea4304f305) -} - -var fileDescriptor_06bca2ea4304f305 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xb5, 0x69, 0xd2, 0x36, 0x53, 0x44, 0xd1, 0x36, 0x21, 0xc6, 0xad, 0xac, 0x68, 0x4f, 0x39, - 0x6d, 0x51, 0xf8, 0x10, 0x1c, 0x10, 0x72, 0x50, 0x40, 0x11, 0x52, 0x2a, 0xdc, 0x1b, 0x17, 0xb4, - 0x8d, 0xb7, 0xad, 0xa5, 0x64, 0x1d, 0xbc, 0x4e, 0x43, 0xfe, 0x05, 0x3f, 0x8b, 0x63, 0x8f, 0x1c, - 0x38, 0xa0, 0xe4, 0x37, 0x70, 0x47, 0x5e, 0x7f, 0x6d, 0x62, 0xbb, 0xc0, 0xa5, 0xf5, 0xbe, 0x79, - 0xf3, 0xf6, 0xcd, 0xd3, 0x8e, 0x02, 0xcf, 0x39, 0x9d, 0x32, 0xc1, 0x82, 0x1b, 0x6f, 0xcc, 0x4e, - 0x95, 0xef, 0x59, 0xe0, 0x87, 0xfe, 0xa9, 0xfc, 0x2b, 0x54, 0x9c, 0x48, 0xc8, 0x7c, 0xf9, 0x9f, - 0x6d, 0x9f, 0x29, 0x8d, 0x3b, 0x71, 0x0f, 0x9a, 0x23, 0x3a, 0x65, 0xf6, 0x0d, 0xf5, 0x26, 0xf4, - 0x62, 0xc2, 0x1c, 0xf6, 0x65, 0xce, 0x44, 0x88, 0x4c, 0xd8, 0xbf, 0x9c, 0x4f, 0x26, 0x51, 0xcd, - 0xd0, 0x3b, 0x7a, 0xb7, 0xe1, 0x64, 0x67, 0xfc, 0x0a, 0x1e, 0xf7, 0x69, 0x38, 0xbe, 0x2e, 0x6d, - 0x3c, 0x81, 0x46, 0x4a, 0x14, 0x86, 0xde, 0xd9, 0xe9, 0x36, 0x9c, 0x1c, 0xc0, 0xef, 0xe2, 0xeb, - 0xfa, 0x4b, 0xdb, 0x75, 0x03, 0x26, 0x44, 0xda, 0x45, 0x00, 0xf9, 0x0b, 0xce, 0x82, 0xf3, 0xf1, - 0x62, 0x10, 0x5e, 0x27, 0xc5, 0xe4, 0xe2, 0x92, 0x0a, 0x3e, 0x53, 0x2c, 0x14, 0xc4, 0x7a, 0xd0, - 0x2c, 0xb6, 0x64, 0x6e, 0x4a, 0x6b, 0xf8, 0x19, 0xa0, 0x44, 0x8b, 0x2f, 0x87, 0x6e, 0xaa, 0x64, - 0x01, 0x50, 0xbe, 0xdc, 0xb4, 0xa3, 0x20, 0xf8, 0x35, 0xb4, 0x55, 0x1b, 0x6a, 0x2b, 0x86, 0xfb, - 0x39, 0x31, 0xbb, 0x7c, 0x03, 0xc3, 0xbf, 0x75, 0x68, 0x6d, 0x85, 0x28, 0x66, 0x3e, 0x17, 0x2c, - 0x4a, 0x91, 0xa6, 0xa0, 0xbc, 0x77, 0xdf, 0xc9, 0x81, 0x8a, 0xb4, 0xee, 0x55, 0xa5, 0x85, 0xba, - 0x70, 0x28, 0x51, 0x85, 0xbc, 0x23, 0xc9, 0xdb, 0x70, 0xc6, 0xb4, 0xf3, 0xa9, 0x6b, 0x0a, 0x33, - 0x87, 0x91, 0x01, 0x7b, 0x62, 0x46, 0xc7, 0x6c, 0xe8, 0x1a, 0x75, 0xc9, 0x48, 0x8f, 0xa8, 0x03, - 0x07, 0xd1, 0x53, 0x1b, 0x7c, 0x9d, 0x79, 0x01, 0x13, 0xc6, 0x6e, 0x47, 0xef, 0xee, 0x38, 0x2a, - 0x84, 0x47, 0x60, 0x96, 0x3d, 0xa0, 0x64, 0xf6, 0x27, 0xb0, 0x17, 0x30, 0x31, 0x9f, 0x84, 0x71, - 0x68, 0x07, 0xbd, 0x47, 0xa4, 0x94, 0xe8, 0xa4, 0x34, 0x6c, 0xc7, 0x31, 0x2a, 0x0f, 0x21, 0x91, - 0x6a, 0x42, 0xfd, 0xd2, 0x9f, 0x73, 0x37, 0x89, 0x30, 0x3e, 0x20, 0x04, 0xb5, 0xc8, 0x4d, 0x12, - 0x98, 0xfc, 0xde, 0xb0, 0x54, 0xd4, 0xa9, 0xb0, 0x54, 0x20, 0x66, 0x96, 0x7a, 0x3f, 0x6b, 0x50, - 0xb7, 0xf9, 0x92, 0x0b, 0xd4, 0x87, 0xc3, 0xa1, 0xd8, 0x18, 0x00, 0xb5, 0x48, 0xd9, 0xea, 0x98, - 0x15, 0x73, 0x62, 0x0d, 0x7d, 0x84, 0xa6, 0x74, 0xb7, 0x2d, 0x64, 0x92, 0xca, 0x45, 0x34, 0x8f, - 0x49, 0x75, 0xc6, 0x58, 0x43, 0x6f, 0xe1, 0xe1, 0x7b, 0x16, 0x6e, 0x4c, 0x91, 0xf8, 0xda, 0xde, - 0x27, 0xb3, 0x62, 0x58, 0xac, 0x21, 0x07, 0x5a, 0xf2, 0x92, 0x82, 0x92, 0x62, 0xac, 0x20, 0x77, - 0x4c, 0xaa, 0x93, 0xc6, 0x1a, 0x7a, 0x03, 0x0f, 0x72, 0xb9, 0x68, 0xa3, 0xd0, 0x11, 0x29, 0xee, - 0xd7, 0x1d, 0xa6, 0x46, 0x70, 0xb4, 0x65, 0x4a, 0xaa, 0x18, 0xa4, 0x62, 0x55, 0xff, 0x66, 0xe8, - 0x03, 0xb4, 0x6d, 0x77, 0xea, 0xf1, 0xa8, 0xee, 0xb0, 0x2b, 0x4f, 0x84, 0x2c, 0x38, 0xf7, 0xae, - 0x38, 0x73, 0x91, 0x49, 0x54, 0x30, 0xd1, 0x8b, 0x6b, 0x26, 0x22, 0x67, 0x33, 0x16, 0xd0, 0xd0, - 0xf3, 0xb9, 0x22, 0x36, 0x80, 0xa6, 0x22, 0xc6, 0xd9, 0x22, 0x51, 0x6a, 0x93, 0x0c, 0xf9, 0x07, - 0x99, 0xfe, 0x8b, 0xef, 0x2b, 0x4b, 0xbf, 0x5d, 0x59, 0xfa, 0xaf, 0x95, 0xa5, 0x7f, 0x5b, 0x5b, - 0xda, 0xed, 0xda, 0xd2, 0x7e, 0xac, 0x2d, 0xed, 0xd3, 0xc9, 0x5d, 0x3f, 0x05, 0x17, 0xbb, 0xf2, - 0xdf, 0xd3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x02, 0x69, 0x35, 0xe2, 0x68, 0x06, 0x00, 0x00, -} - -func (m *NameAvailableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameAvailableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FullName) > 0 { - i -= len(m.FullName) - copy(dAtA[i:], m.FullName) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.FullName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchNameAvailableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *NameAvailableResponse) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } - return dAtA[:n], nil -} - -func (m *BatchNameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchNameAvailableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FullNames) > 0 { - for iNdEx := len(m.FullNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FullNames[iNdEx]) - copy(dAtA[i:], m.FullNames[iNdEx]) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.FullNames[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NameByAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameByAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OwnerScwEthAddress) > 0 { - i -= len(m.OwnerScwEthAddress) - copy(dAtA[i:], m.OwnerScwEthAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchNameByAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BatchNameByAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchNameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OwnerScwEthAddresses) > 0 { - for iNdEx := len(m.OwnerScwEthAddresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.OwnerScwEthAddresses[iNdEx]) - copy(dAtA[i:], m.OwnerScwEthAddresses[iNdEx]) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NameByAnyIdRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameByAnyIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *NameByAnyIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AnyAddress) > 0 { - i -= len(m.AnyAddress) - copy(dAtA[i:], m.AnyAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.AnyAddress))) - i-- - dAtA[i] = 0xa +func (x *NameAvailableResponse) GetOwnerAnyAddress() string { + if x != nil { + return x.OwnerAnyAddress } - return len(dAtA) - i, nil + return "" } -func (m *BatchNameByAnyIdRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BatchNameByAnyIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchNameByAnyIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AnyAddresses) > 0 { - for iNdEx := len(m.AnyAddresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AnyAddresses[iNdEx]) - copy(dAtA[i:], m.AnyAddresses[iNdEx]) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.AnyAddresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } +func (x *NameAvailableResponse) GetSpaceId() string { + if x != nil { + return x.SpaceId } - return len(dAtA) - i, nil + return "" } -func (m *NameAvailableResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *NameAvailableResponse) GetNameExpires() int64 { + if x != nil { + return x.NameExpires } - return dAtA[:n], nil -} - -func (m *NameAvailableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return 0 } -func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NameExpires != 0 { - i = encodeVarintNameservice(dAtA, i, uint64(m.NameExpires)) - i-- - dAtA[i] = 0x30 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x2a - } - if len(m.OwnerAnyAddress) > 0 { - i -= len(m.OwnerAnyAddress) - copy(dAtA[i:], m.OwnerAnyAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerAnyAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.OwnerScwEthAddress) > 0 { - i -= len(m.OwnerScwEthAddress) - copy(dAtA[i:], m.OwnerScwEthAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddress))) - i-- - dAtA[i] = 0x12 - } - if m.Available { - i-- - if m.Available { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +type BatchNameAvailableResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Results []*NameAvailableResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BatchNameAvailableResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BatchNameAvailableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchNameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNameservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +func (x *BatchNameAvailableResponse) Reset() { + *x = BatchNameAvailableResponse{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameByAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *BatchNameAvailableResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameByAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*BatchNameAvailableResponse) ProtoMessage() {} -func (m *NameByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.Found { - i-- - if m.Found { - dAtA[i] = 1 - } else { - dAtA[i] = 0 +func (x *BatchNameAvailableResponse) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x8 + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *BatchNameByAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BatchNameByAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchNameByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintNameservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +// Deprecated: Use BatchNameAvailableResponse.ProtoReflect.Descriptor instead. +func (*BatchNameAvailableResponse) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{7} } -func encodeVarintNameservice(dAtA []byte, offset int, v uint64) int { - offset -= sovNameservice(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (x *BatchNameAvailableResponse) GetResults() []*NameAvailableResponse { + if x != nil { + return x.Results } - dAtA[offset] = uint8(v) - return base -} -func (m *NameAvailableRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FullName) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - return n + return nil } -func (m *BatchNameAvailableRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.FullNames) > 0 { - for _, s := range m.FullNames { - l = len(s) - n += 1 + l + sovNameservice(uint64(l)) - } - } - return n +type NameByAddressResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameByAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerScwEthAddress) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - return n +func (x *NameByAddressResponse) Reset() { + *x = NameByAddressResponse{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BatchNameByAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.OwnerScwEthAddresses) > 0 { - for _, s := range m.OwnerScwEthAddresses { - l = len(s) - n += 1 + l + sovNameservice(uint64(l)) - } - } - return n +func (x *NameByAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameByAnyIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AnyAddress) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - return n -} +func (*NameByAddressResponse) ProtoMessage() {} -func (m *BatchNameByAnyIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AnyAddresses) > 0 { - for _, s := range m.AnyAddresses { - l = len(s) - n += 1 + l + sovNameservice(uint64(l)) +func (x *NameByAddressResponse) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return n -} - -func (m *NameAvailableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Available { - n += 2 - } - l = len(m.OwnerScwEthAddress) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - l = len(m.OwnerAnyAddress) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - if m.NameExpires != 0 { - n += 1 + sovNameservice(uint64(m.NameExpires)) - } - return n + return mi.MessageOf(x) } -func (m *BatchNameAvailableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovNameservice(uint64(l)) - } - } - return n +// Deprecated: Use NameByAddressResponse.ProtoReflect.Descriptor instead. +func (*NameByAddressResponse) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{8} } -func (m *NameByAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Found { - n += 2 +func (x *NameByAddressResponse) GetFound() bool { + if x != nil { + return x.Found } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovNameservice(uint64(l)) - } - return n + return false } -func (m *BatchNameByAddressResponse) Size() (n int) { - if m == nil { - return 0 +func (x *NameByAddressResponse) GetName() string { + if x != nil { + return x.Name } - var l int - _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovNameservice(uint64(l)) - } - } - return n -} - -func sovNameservice(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozNameservice(x uint64) (n int) { - return sovNameservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NameAvailableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameAvailableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil + return "" } -func (m *BatchNameAvailableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchNameAvailableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchNameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullNames = append(m.FullNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +type BatchNameByAddressResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Results []*NameByAddressResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameByAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func (x *BatchNameByAddressResponse) Reset() { + *x = BatchNameByAddressResponse{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BatchNameByAddressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchNameByAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchNameByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerScwEthAddresses = append(m.OwnerScwEthAddresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func (x *BatchNameByAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameByAnyIdRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameByAnyIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameByAnyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AnyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchNameByAnyIdRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchNameByAnyIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchNameByAnyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyAddresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AnyAddresses = append(m.AnyAddresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*BatchNameByAddressResponse) ProtoMessage() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } +func (x *BatchNameByAddressResponse) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameAvailableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Available = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NameExpires", wireType) - } - m.NameExpires = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NameExpires |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF + return ms } - return nil + return mi.MessageOf(x) } -func (m *BatchNameAvailableResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchNameAvailableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchNameAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, &NameAvailableResponse{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +// Deprecated: Use BatchNameByAddressResponse.ProtoReflect.Descriptor instead. +func (*BatchNameByAddressResponse) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP(), []int{9} } -func (m *NameByAddressResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameByAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Found = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *BatchNameByAddressResponse) GetResults() []*NameByAddressResponse { + if x != nil { + return x.Results } return nil } -func (m *BatchNameByAddressResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchNameByAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchNameByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNameservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthNameservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, &NameByAddressResponse{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNameservice(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNameservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNameservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNameservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthNameservice - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupNameservice - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthNameservice - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} +var File_nameservice_nameserviceproto_protos_nameservice_proto protoreflect.FileDescriptor + +var file_nameservice_nameserviceproto_protos_nameservice_proto_rawDesc = string([]byte{ + 0x0a, 0x35, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x38, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x32, 0x0a, 0x14, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, + 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x22, 0x46, 0x0a, 0x14, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x53, 0x63, 0x77, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x63, 0x77, 0x45, 0x74, + 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4f, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x63, + 0x77, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x63, 0x77, 0x45, 0x74, 0x68, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x34, 0x0a, 0x12, 0x4e, 0x61, 0x6d, + 0x65, 0x42, 0x79, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1e, 0x0a, 0x0a, 0x61, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, + 0x3d, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x6e, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x6e, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0c, 0x61, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0xf5, + 0x01, 0x0a, 0x15, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, + 0x63, 0x77, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x63, 0x77, 0x45, 0x74, 0x68, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x41, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x1a, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, + 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x15, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x1a, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x42, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x32, 0xdc, 0x04, 0x0a, 0x05, 0x41, 0x6e, + 0x79, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x49, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x49, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x1a, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x15, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x52, 0x0a, 0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, + 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, + 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x13, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x6e, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x18, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x79, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, + 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x17, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, + 0x1a, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x12, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x45, 0x0a, 0x14, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x6e, 0x65, 0x77, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x1a, 0x12, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x1e, 0x5a, 0x1c, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( - ErrInvalidLengthNameservice = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNameservice = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupNameservice = fmt.Errorf("proto: unexpected end of group") + file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescOnce sync.Once + file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescData []byte ) + +func file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescGZIP() []byte { + file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescOnce.Do(func() { + file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_nameservice_nameserviceproto_protos_nameservice_proto_rawDesc), len(file_nameservice_nameserviceproto_protos_nameservice_proto_rawDesc))) + }) + return file_nameservice_nameserviceproto_protos_nameservice_proto_rawDescData +} + +var file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_nameservice_nameserviceproto_protos_nameservice_proto_goTypes = []any{ + (*NameAvailableRequest)(nil), // 0: NameAvailableRequest + (*BatchNameAvailableRequest)(nil), // 1: BatchNameAvailableRequest + (*NameByAddressRequest)(nil), // 2: NameByAddressRequest + (*BatchNameByAddressRequest)(nil), // 3: BatchNameByAddressRequest + (*NameByAnyIdRequest)(nil), // 4: NameByAnyIdRequest + (*BatchNameByAnyIdRequest)(nil), // 5: BatchNameByAnyIdRequest + (*NameAvailableResponse)(nil), // 6: NameAvailableResponse + (*BatchNameAvailableResponse)(nil), // 7: BatchNameAvailableResponse + (*NameByAddressResponse)(nil), // 8: NameByAddressResponse + (*BatchNameByAddressResponse)(nil), // 9: BatchNameByAddressResponse + (*NameRegisterRequestSigned)(nil), // 10: NameRegisterRequestSigned + (*NameRenewRequestSigned)(nil), // 11: NameRenewRequestSigned + (*OperationResponse)(nil), // 12: OperationResponse +} +var file_nameservice_nameserviceproto_protos_nameservice_proto_depIdxs = []int32{ + 6, // 0: BatchNameAvailableResponse.results:type_name -> NameAvailableResponse + 8, // 1: BatchNameByAddressResponse.results:type_name -> NameByAddressResponse + 0, // 2: Anyns.IsNameAvailable:input_type -> NameAvailableRequest + 1, // 3: Anyns.BatchIsNameAvailable:input_type -> BatchNameAvailableRequest + 2, // 4: Anyns.GetNameByAddress:input_type -> NameByAddressRequest + 3, // 5: Anyns.BatchGetNameByAddress:input_type -> BatchNameByAddressRequest + 4, // 6: Anyns.GetNameByAnyId:input_type -> NameByAnyIdRequest + 5, // 7: Anyns.BatchGetNameByAnyId:input_type -> BatchNameByAnyIdRequest + 10, // 8: Anyns.AdminNameRegisterSigned:input_type -> NameRegisterRequestSigned + 11, // 9: Anyns.AdminNameRenewSigned:input_type -> NameRenewRequestSigned + 6, // 10: Anyns.IsNameAvailable:output_type -> NameAvailableResponse + 7, // 11: Anyns.BatchIsNameAvailable:output_type -> BatchNameAvailableResponse + 8, // 12: Anyns.GetNameByAddress:output_type -> NameByAddressResponse + 9, // 13: Anyns.BatchGetNameByAddress:output_type -> BatchNameByAddressResponse + 8, // 14: Anyns.GetNameByAnyId:output_type -> NameByAddressResponse + 9, // 15: Anyns.BatchGetNameByAnyId:output_type -> BatchNameByAddressResponse + 12, // 16: Anyns.AdminNameRegisterSigned:output_type -> OperationResponse + 12, // 17: Anyns.AdminNameRenewSigned:output_type -> OperationResponse + 10, // [10:18] is the sub-list for method output_type + 2, // [2:10] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_nameservice_nameserviceproto_protos_nameservice_proto_init() } +func file_nameservice_nameserviceproto_protos_nameservice_proto_init() { + if File_nameservice_nameserviceproto_protos_nameservice_proto != nil { + return + } + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_nameservice_nameserviceproto_protos_nameservice_proto_rawDesc), len(file_nameservice_nameserviceproto_protos_nameservice_proto_rawDesc)), + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nameservice_nameserviceproto_protos_nameservice_proto_goTypes, + DependencyIndexes: file_nameservice_nameserviceproto_protos_nameservice_proto_depIdxs, + MessageInfos: file_nameservice_nameserviceproto_protos_nameservice_proto_msgTypes, + }.Build() + File_nameservice_nameserviceproto_protos_nameservice_proto = out.File + file_nameservice_nameserviceproto_protos_nameservice_proto_goTypes = nil + file_nameservice_nameserviceproto_protos_nameservice_proto_depIdxs = nil +} diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go index 219b8eecd..3ed326b75 100644 --- a/nameservice/nameserviceproto/nameservice_aa.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -1,62 +1,83 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: nameservice/nameserviceproto/protos/nameservice_aa.proto package nameserviceproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type OperationState int32 const ( - OperationState_Unknown OperationState = 0 + OperationState_OpUnknown OperationState = 0 OperationState_Pending OperationState = 1 OperationState_PendingOrNotFound OperationState = 2 OperationState_Completed OperationState = 3 OperationState_Error OperationState = 4 ) -var OperationState_name = map[int32]string{ - 0: "Unknown", - 1: "Pending", - 2: "PendingOrNotFound", - 3: "Completed", - 4: "Error", -} +// Enum value maps for OperationState. +var ( + OperationState_name = map[int32]string{ + 0: "OpUnknown", + 1: "Pending", + 2: "PendingOrNotFound", + 3: "Completed", + 4: "Error", + } + OperationState_value = map[string]int32{ + "OpUnknown": 0, + "Pending": 1, + "PendingOrNotFound": 2, + "Completed": 3, + "Error": 4, + } +) -var OperationState_value = map[string]int32{ - "Unknown": 0, - "Pending": 1, - "PendingOrNotFound": 2, - "Completed": 3, - "Error": 4, +func (x OperationState) Enum() *OperationState { + p := new(OperationState) + *p = x + return p } func (x OperationState) String() string { - return proto.EnumName(OperationState_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperationState) Descriptor() protoreflect.EnumDescriptor { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_enumTypes[0].Descriptor() +} + +func (OperationState) Type() protoreflect.EnumType { + return &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_enumTypes[0] +} + +func (x OperationState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use OperationState.Descriptor instead. func (OperationState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{0} + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{0} } type UserAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` // An Ethereum address that owns that account OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // This smart contract really controls all names @@ -71,457 +92,401 @@ type UserAccount struct { NamesCountLeft uint64 `protobuf:"varint,4,opt,name=namesCountLeft,proto3" json:"namesCountLeft,omitempty"` // Number of gas operations: update name, add new data, etc OperationsCountLeft uint64 `protobuf:"varint,5,opt,name=operationsCountLeft,proto3" json:"operationsCountLeft,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *UserAccount) Reset() { *m = UserAccount{} } -func (m *UserAccount) String() string { return proto.CompactTextString(m) } -func (*UserAccount) ProtoMessage() {} -func (*UserAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{0} -} -func (m *UserAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *UserAccount) Reset() { + *x = UserAccount{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *UserAccount) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *UserAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserAccount.Merge(m, src) -} -func (m *UserAccount) XXX_Size() int { - return m.Size() + +func (x *UserAccount) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UserAccount) XXX_DiscardUnknown() { - xxx_messageInfo_UserAccount.DiscardUnknown(m) + +func (*UserAccount) ProtoMessage() {} + +func (x *UserAccount) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_UserAccount proto.InternalMessageInfo +// Deprecated: Use UserAccount.ProtoReflect.Descriptor instead. +func (*UserAccount) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{0} +} -func (m *UserAccount) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *UserAccount) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *UserAccount) GetOwnerSmartContracWalletAddress() string { - if m != nil { - return m.OwnerSmartContracWalletAddress +func (x *UserAccount) GetOwnerSmartContracWalletAddress() string { + if x != nil { + return x.OwnerSmartContracWalletAddress } return "" } -func (m *UserAccount) GetOwnerSmartContracWalletDeployed() bool { - if m != nil { - return m.OwnerSmartContracWalletDeployed +func (x *UserAccount) GetOwnerSmartContracWalletDeployed() bool { + if x != nil { + return x.OwnerSmartContracWalletDeployed } return false } -func (m *UserAccount) GetNamesCountLeft() uint64 { - if m != nil { - return m.NamesCountLeft +func (x *UserAccount) GetNamesCountLeft() uint64 { + if x != nil { + return x.NamesCountLeft } return 0 } -func (m *UserAccount) GetOperationsCountLeft() uint64 { - if m != nil { - return m.OperationsCountLeft +func (x *UserAccount) GetOperationsCountLeft() uint64 { + if x != nil { + return x.OperationsCountLeft } return 0 } type AdminFundUserAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // An Ethereum address that owns that name OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // Number of names that user can buy. We will mint him tokens that he can use to buy names // (one token per name) - NamesCount uint64 `protobuf:"varint,2,opt,name=namesCount,proto3" json:"namesCount,omitempty"` + NamesCount uint64 `protobuf:"varint,2,opt,name=namesCount,proto3" json:"namesCount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AdminFundUserAccountRequest) Reset() { *m = AdminFundUserAccountRequest{} } -func (m *AdminFundUserAccountRequest) String() string { return proto.CompactTextString(m) } -func (*AdminFundUserAccountRequest) ProtoMessage() {} -func (*AdminFundUserAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{1} -} -func (m *AdminFundUserAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdminFundUserAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdminFundUserAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AdminFundUserAccountRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AdminFundUserAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdminFundUserAccountRequest.Merge(m, src) +func (x *AdminFundUserAccountRequest) Reset() { + *x = AdminFundUserAccountRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AdminFundUserAccountRequest) XXX_Size() int { - return m.Size() + +func (x *AdminFundUserAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AdminFundUserAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AdminFundUserAccountRequest.DiscardUnknown(m) + +func (*AdminFundUserAccountRequest) ProtoMessage() {} + +func (x *AdminFundUserAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AdminFundUserAccountRequest proto.InternalMessageInfo +// Deprecated: Use AdminFundUserAccountRequest.ProtoReflect.Descriptor instead. +func (*AdminFundUserAccountRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{1} +} -func (m *AdminFundUserAccountRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *AdminFundUserAccountRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *AdminFundUserAccountRequest) GetNamesCount() uint64 { - if m != nil { - return m.NamesCount +func (x *AdminFundUserAccountRequest) GetNamesCount() uint64 { + if x != nil { + return x.NamesCount } return 0 } type AdminFundUserAccountRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // AdminFundUserAccountRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // payload signed by Admin of this service - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AdminFundUserAccountRequestSigned) Reset() { *m = AdminFundUserAccountRequestSigned{} } -func (m *AdminFundUserAccountRequestSigned) String() string { return proto.CompactTextString(m) } -func (*AdminFundUserAccountRequestSigned) ProtoMessage() {} -func (*AdminFundUserAccountRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{2} -} -func (m *AdminFundUserAccountRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdminFundUserAccountRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdminFundUserAccountRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AdminFundUserAccountRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *AdminFundUserAccountRequestSigned) Reset() { + *x = AdminFundUserAccountRequestSigned{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AdminFundUserAccountRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdminFundUserAccountRequestSigned.Merge(m, src) -} -func (m *AdminFundUserAccountRequestSigned) XXX_Size() int { - return m.Size() + +func (x *AdminFundUserAccountRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AdminFundUserAccountRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_AdminFundUserAccountRequestSigned.DiscardUnknown(m) + +func (*AdminFundUserAccountRequestSigned) ProtoMessage() {} + +func (x *AdminFundUserAccountRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AdminFundUserAccountRequestSigned proto.InternalMessageInfo +// Deprecated: Use AdminFundUserAccountRequestSigned.ProtoReflect.Descriptor instead. +func (*AdminFundUserAccountRequestSigned) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{2} +} -func (m *AdminFundUserAccountRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *AdminFundUserAccountRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *AdminFundUserAccountRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *AdminFundUserAccountRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type AdminFundGasOperationsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // An Ethereum address that owns that name OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` OwnerAnyID string `protobuf:"bytes,2,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` // Number of gas operations: update name, add new data, etc OperationsCount uint64 `protobuf:"varint,3,opt,name=operationsCount,proto3" json:"operationsCount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AdminFundGasOperationsRequest) Reset() { *m = AdminFundGasOperationsRequest{} } -func (m *AdminFundGasOperationsRequest) String() string { return proto.CompactTextString(m) } -func (*AdminFundGasOperationsRequest) ProtoMessage() {} -func (*AdminFundGasOperationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{3} -} -func (m *AdminFundGasOperationsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdminFundGasOperationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdminFundGasOperationsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AdminFundGasOperationsRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AdminFundGasOperationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdminFundGasOperationsRequest.Merge(m, src) +func (x *AdminFundGasOperationsRequest) Reset() { + *x = AdminFundGasOperationsRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AdminFundGasOperationsRequest) XXX_Size() int { - return m.Size() + +func (x *AdminFundGasOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AdminFundGasOperationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AdminFundGasOperationsRequest.DiscardUnknown(m) + +func (*AdminFundGasOperationsRequest) ProtoMessage() {} + +func (x *AdminFundGasOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AdminFundGasOperationsRequest proto.InternalMessageInfo +// Deprecated: Use AdminFundGasOperationsRequest.ProtoReflect.Descriptor instead. +func (*AdminFundGasOperationsRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{3} +} -func (m *AdminFundGasOperationsRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *AdminFundGasOperationsRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *AdminFundGasOperationsRequest) GetOwnerAnyID() string { - if m != nil { - return m.OwnerAnyID +func (x *AdminFundGasOperationsRequest) GetOwnerAnyID() string { + if x != nil { + return x.OwnerAnyID } return "" } -func (m *AdminFundGasOperationsRequest) GetOperationsCount() uint64 { - if m != nil { - return m.OperationsCount +func (x *AdminFundGasOperationsRequest) GetOperationsCount() uint64 { + if x != nil { + return x.OperationsCount } return 0 } type AdminFundGasOperationsRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // AdminFundGasOperationsRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // payload signed by Admin of this service - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AdminFundGasOperationsRequestSigned) Reset() { *m = AdminFundGasOperationsRequestSigned{} } -func (m *AdminFundGasOperationsRequestSigned) String() string { return proto.CompactTextString(m) } -func (*AdminFundGasOperationsRequestSigned) ProtoMessage() {} -func (*AdminFundGasOperationsRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{4} -} -func (m *AdminFundGasOperationsRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdminFundGasOperationsRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdminFundGasOperationsRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *AdminFundGasOperationsRequestSigned) Reset() { + *x = AdminFundGasOperationsRequestSigned{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AdminFundGasOperationsRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *AdminFundGasOperationsRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdminFundGasOperationsRequestSigned.Merge(m, src) -} -func (m *AdminFundGasOperationsRequestSigned) XXX_Size() int { - return m.Size() + +func (x *AdminFundGasOperationsRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AdminFundGasOperationsRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_AdminFundGasOperationsRequestSigned.DiscardUnknown(m) + +func (*AdminFundGasOperationsRequestSigned) ProtoMessage() {} + +func (x *AdminFundGasOperationsRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AdminFundGasOperationsRequestSigned proto.InternalMessageInfo +// Deprecated: Use AdminFundGasOperationsRequestSigned.ProtoReflect.Descriptor instead. +func (*AdminFundGasOperationsRequestSigned) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{4} +} -func (m *AdminFundGasOperationsRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *AdminFundGasOperationsRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *AdminFundGasOperationsRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *AdminFundGasOperationsRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } // no signature required here type GetUserAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // An Ethereum address that owns that account OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetUserAccountRequest) Reset() { *m = GetUserAccountRequest{} } -func (m *GetUserAccountRequest) String() string { return proto.CompactTextString(m) } -func (*GetUserAccountRequest) ProtoMessage() {} -func (*GetUserAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{5} -} -func (m *GetUserAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetUserAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetUserAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetUserAccountRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetUserAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserAccountRequest.Merge(m, src) +func (x *GetUserAccountRequest) Reset() { + *x = GetUserAccountRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetUserAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *GetUserAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetUserAccountRequest.DiscardUnknown(m) + +func (x *GetUserAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_GetUserAccountRequest proto.InternalMessageInfo +func (*GetUserAccountRequest) ProtoMessage() {} -func (m *GetUserAccountRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *GetUserAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type GetDataNameRegisterResponse struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Context []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` +// Deprecated: Use GetUserAccountRequest.ProtoReflect.Descriptor instead. +func (*GetUserAccountRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{5} } -func (m *GetDataNameRegisterResponse) Reset() { *m = GetDataNameRegisterResponse{} } -func (m *GetDataNameRegisterResponse) String() string { return proto.CompactTextString(m) } -func (*GetDataNameRegisterResponse) ProtoMessage() {} -func (*GetDataNameRegisterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{6} -} -func (m *GetDataNameRegisterResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetDataNameRegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetDataNameRegisterResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *GetUserAccountRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } + return "" } -func (m *GetDataNameRegisterResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil + +type GetDataNameRegisterResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Context []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetDataNameRegisterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDataNameRegisterResponse.Merge(m, src) + +func (x *GetDataNameRegisterResponse) Reset() { + *x = GetDataNameRegisterResponse{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetDataNameRegisterResponse) XXX_Size() int { - return m.Size() + +func (x *GetDataNameRegisterResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetDataNameRegisterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetDataNameRegisterResponse.DiscardUnknown(m) + +func (*GetDataNameRegisterResponse) ProtoMessage() {} + +func (x *GetDataNameRegisterResponse) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_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) } -var xxx_messageInfo_GetDataNameRegisterResponse proto.InternalMessageInfo +// Deprecated: Use GetDataNameRegisterResponse.ProtoReflect.Descriptor instead. +func (*GetDataNameRegisterResponse) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{6} +} -func (m *GetDataNameRegisterResponse) GetData() []byte { - if m != nil { - return m.Data +func (x *GetDataNameRegisterResponse) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *GetDataNameRegisterResponse) GetContext() []byte { - if m != nil { - return m.Context +func (x *GetDataNameRegisterResponse) GetContext() []byte { + if x != nil { + return x.Context } return nil } type CreateUserOperationRequest struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // "data" signed with Ethereum private key SignedData []byte `protobuf:"bytes,2,opt,name=signedData,proto3" json:"signedData,omitempty"` Context []byte `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` @@ -531,156 +496,140 @@ type CreateUserOperationRequest struct { OwnerAnyID string `protobuf:"bytes,5,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` // all operations currently are towards single name, please specify it // we can use it for caching, etc purps. - FullName string `protobuf:"bytes,6,opt,name=fullName,proto3" json:"fullName,omitempty"` + FullName string `protobuf:"bytes,6,opt,name=fullName,proto3" json:"fullName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *CreateUserOperationRequest) Reset() { *m = CreateUserOperationRequest{} } -func (m *CreateUserOperationRequest) String() string { return proto.CompactTextString(m) } -func (*CreateUserOperationRequest) ProtoMessage() {} -func (*CreateUserOperationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{7} -} -func (m *CreateUserOperationRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateUserOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateUserOperationRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreateUserOperationRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *CreateUserOperationRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserOperationRequest.Merge(m, src) +func (x *CreateUserOperationRequest) Reset() { + *x = CreateUserOperationRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *CreateUserOperationRequest) XXX_Size() int { - return m.Size() + +func (x *CreateUserOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateUserOperationRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserOperationRequest.DiscardUnknown(m) + +func (*CreateUserOperationRequest) ProtoMessage() {} + +func (x *CreateUserOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateUserOperationRequest proto.InternalMessageInfo +// Deprecated: Use CreateUserOperationRequest.ProtoReflect.Descriptor instead. +func (*CreateUserOperationRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{7} +} -func (m *CreateUserOperationRequest) GetData() []byte { - if m != nil { - return m.Data +func (x *CreateUserOperationRequest) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *CreateUserOperationRequest) GetSignedData() []byte { - if m != nil { - return m.SignedData +func (x *CreateUserOperationRequest) GetSignedData() []byte { + if x != nil { + return x.SignedData } return nil } -func (m *CreateUserOperationRequest) GetContext() []byte { - if m != nil { - return m.Context +func (x *CreateUserOperationRequest) GetContext() []byte { + if x != nil { + return x.Context } return nil } -func (m *CreateUserOperationRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *CreateUserOperationRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *CreateUserOperationRequest) GetOwnerAnyID() string { - if m != nil { - return m.OwnerAnyID +func (x *CreateUserOperationRequest) GetOwnerAnyID() string { + if x != nil { + return x.OwnerAnyID } return "" } -func (m *CreateUserOperationRequest) GetFullName() string { - if m != nil { - return m.FullName +func (x *CreateUserOperationRequest) GetFullName() string { + if x != nil { + return x.FullName } return "" } type CreateUserOperationRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // CreateUserOperationRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // payload signed with Anytype identity - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *CreateUserOperationRequestSigned) Reset() { *m = CreateUserOperationRequestSigned{} } -func (m *CreateUserOperationRequestSigned) String() string { return proto.CompactTextString(m) } -func (*CreateUserOperationRequestSigned) ProtoMessage() {} -func (*CreateUserOperationRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{8} -} -func (m *CreateUserOperationRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateUserOperationRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateUserOperationRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *CreateUserOperationRequestSigned) Reset() { + *x = CreateUserOperationRequestSigned{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *CreateUserOperationRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *CreateUserOperationRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserOperationRequestSigned.Merge(m, src) -} -func (m *CreateUserOperationRequestSigned) XXX_Size() int { - return m.Size() + +func (x *CreateUserOperationRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateUserOperationRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserOperationRequestSigned.DiscardUnknown(m) + +func (*CreateUserOperationRequestSigned) ProtoMessage() {} + +func (x *CreateUserOperationRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateUserOperationRequestSigned proto.InternalMessageInfo +// Deprecated: Use CreateUserOperationRequestSigned.ProtoReflect.Descriptor instead. +func (*CreateUserOperationRequestSigned) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{8} +} -func (m *CreateUserOperationRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *CreateUserOperationRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *CreateUserOperationRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *CreateUserOperationRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type NameRegisterRequest struct { - FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name // This should not be empty! // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" @@ -693,148 +642,132 @@ type NameRegisterRequest struct { RegisterToSmartContractWallet bool `protobuf:"varint,4,opt,name=registerToSmartContractWallet,proto3" json:"registerToSmartContractWallet,omitempty"` // How many months to register the name for RegisterPeriodMonths uint32 `protobuf:"varint,5,opt,name=registerPeriodMonths,proto3" json:"registerPeriodMonths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameRegisterRequest) Reset() { *m = NameRegisterRequest{} } -func (m *NameRegisterRequest) String() string { return proto.CompactTextString(m) } -func (*NameRegisterRequest) ProtoMessage() {} -func (*NameRegisterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{9} -} -func (m *NameRegisterRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameRegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameRegisterRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameRegisterRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameRegisterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRegisterRequest.Merge(m, src) +func (x *NameRegisterRequest) Reset() { + *x = NameRegisterRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameRegisterRequest) XXX_Size() int { - return m.Size() + +func (x *NameRegisterRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameRegisterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NameRegisterRequest.DiscardUnknown(m) + +func (*NameRegisterRequest) ProtoMessage() {} + +func (x *NameRegisterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameRegisterRequest proto.InternalMessageInfo +// Deprecated: Use NameRegisterRequest.ProtoReflect.Descriptor instead. +func (*NameRegisterRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{9} +} -func (m *NameRegisterRequest) GetFullName() string { - if m != nil { - return m.FullName +func (x *NameRegisterRequest) GetFullName() string { + if x != nil { + return x.FullName } return "" } -func (m *NameRegisterRequest) GetOwnerAnyAddress() string { - if m != nil { - return m.OwnerAnyAddress +func (x *NameRegisterRequest) GetOwnerAnyAddress() string { + if x != nil { + return x.OwnerAnyAddress } return "" } -func (m *NameRegisterRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *NameRegisterRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *NameRegisterRequest) GetRegisterToSmartContractWallet() bool { - if m != nil { - return m.RegisterToSmartContractWallet +func (x *NameRegisterRequest) GetRegisterToSmartContractWallet() bool { + if x != nil { + return x.RegisterToSmartContractWallet } return false } -func (m *NameRegisterRequest) GetRegisterPeriodMonths() uint32 { - if m != nil { - return m.RegisterPeriodMonths +func (x *NameRegisterRequest) GetRegisterPeriodMonths() uint32 { + if x != nil { + return x.RegisterPeriodMonths } return 0 } type NameRegisterRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // NameRegisterRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // payload signed by payload.ownerEthAddress - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameRegisterRequestSigned) Reset() { *m = NameRegisterRequestSigned{} } -func (m *NameRegisterRequestSigned) String() string { return proto.CompactTextString(m) } -func (*NameRegisterRequestSigned) ProtoMessage() {} -func (*NameRegisterRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{10} -} -func (m *NameRegisterRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameRegisterRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameRegisterRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameRegisterRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *NameRegisterRequestSigned) Reset() { + *x = NameRegisterRequestSigned{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameRegisterRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRegisterRequestSigned.Merge(m, src) -} -func (m *NameRegisterRequestSigned) XXX_Size() int { - return m.Size() + +func (x *NameRegisterRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameRegisterRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_NameRegisterRequestSigned.DiscardUnknown(m) + +func (*NameRegisterRequestSigned) ProtoMessage() {} + +func (x *NameRegisterRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameRegisterRequestSigned proto.InternalMessageInfo +// Deprecated: Use NameRegisterRequestSigned.ProtoReflect.Descriptor instead. +func (*NameRegisterRequestSigned) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{10} +} -func (m *NameRegisterRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *NameRegisterRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *NameRegisterRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *NameRegisterRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type NameRenewRequest struct { - FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name // This should not be empty! // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" @@ -847,148 +780,132 @@ type NameRenewRequest struct { RenewToSmartContractWallet bool `protobuf:"varint,4,opt,name=renewToSmartContractWallet,proto3" json:"renewToSmartContractWallet,omitempty"` // How many months to register the name for RenewPeriodMonths uint32 `protobuf:"varint,5,opt,name=renewPeriodMonths,proto3" json:"renewPeriodMonths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameRenewRequest) Reset() { *m = NameRenewRequest{} } -func (m *NameRenewRequest) String() string { return proto.CompactTextString(m) } -func (*NameRenewRequest) ProtoMessage() {} -func (*NameRenewRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{11} -} -func (m *NameRenewRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameRenewRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameRenewRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameRenewRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameRenewRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRenewRequest.Merge(m, src) +func (x *NameRenewRequest) Reset() { + *x = NameRenewRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameRenewRequest) XXX_Size() int { - return m.Size() + +func (x *NameRenewRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameRenewRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NameRenewRequest.DiscardUnknown(m) + +func (*NameRenewRequest) ProtoMessage() {} + +func (x *NameRenewRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameRenewRequest proto.InternalMessageInfo +// Deprecated: Use NameRenewRequest.ProtoReflect.Descriptor instead. +func (*NameRenewRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{11} +} -func (m *NameRenewRequest) GetFullName() string { - if m != nil { - return m.FullName +func (x *NameRenewRequest) GetFullName() string { + if x != nil { + return x.FullName } return "" } -func (m *NameRenewRequest) GetOwnerAnyAddress() string { - if m != nil { - return m.OwnerAnyAddress +func (x *NameRenewRequest) GetOwnerAnyAddress() string { + if x != nil { + return x.OwnerAnyAddress } return "" } -func (m *NameRenewRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *NameRenewRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *NameRenewRequest) GetRenewToSmartContractWallet() bool { - if m != nil { - return m.RenewToSmartContractWallet +func (x *NameRenewRequest) GetRenewToSmartContractWallet() bool { + if x != nil { + return x.RenewToSmartContractWallet } return false } -func (m *NameRenewRequest) GetRenewPeriodMonths() uint32 { - if m != nil { - return m.RenewPeriodMonths +func (x *NameRenewRequest) GetRenewPeriodMonths() uint32 { + if x != nil { + return x.RenewPeriodMonths } return 0 } type NameRenewRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // NameRenewRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // payload signed by payload.ownerEthAddress - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameRenewRequestSigned) Reset() { *m = NameRenewRequestSigned{} } -func (m *NameRenewRequestSigned) String() string { return proto.CompactTextString(m) } -func (*NameRenewRequestSigned) ProtoMessage() {} -func (*NameRenewRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{12} -} -func (m *NameRenewRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameRenewRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameRenewRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *NameRenewRequestSigned) Reset() { + *x = NameRenewRequestSigned{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameRenewRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameRenewRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRenewRequestSigned.Merge(m, src) -} -func (m *NameRenewRequestSigned) XXX_Size() int { - return m.Size() + +func (x *NameRenewRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameRenewRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_NameRenewRequestSigned.DiscardUnknown(m) + +func (*NameRenewRequestSigned) ProtoMessage() {} + +func (x *NameRenewRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameRenewRequestSigned proto.InternalMessageInfo +// Deprecated: Use NameRenewRequestSigned.ProtoReflect.Descriptor instead. +func (*NameRenewRequestSigned) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{12} +} -func (m *NameRenewRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *NameRenewRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *NameRenewRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *NameRenewRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type NameRegisterForSpaceRequest struct { - FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name // This should not be empty! // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" @@ -1000,3582 +917,442 @@ type NameRegisterForSpaceRequest struct { SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` // How many months to register the name for RegisterPeriodMonths uint32 `protobuf:"varint,5,opt,name=registerPeriodMonths,proto3" json:"registerPeriodMonths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *NameRegisterForSpaceRequest) Reset() { *m = NameRegisterForSpaceRequest{} } -func (m *NameRegisterForSpaceRequest) String() string { return proto.CompactTextString(m) } -func (*NameRegisterForSpaceRequest) ProtoMessage() {} -func (*NameRegisterForSpaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{13} -} -func (m *NameRegisterForSpaceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NameRegisterForSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameRegisterForSpaceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NameRegisterForSpaceRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *NameRegisterForSpaceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRegisterForSpaceRequest.Merge(m, src) +func (x *NameRegisterForSpaceRequest) Reset() { + *x = NameRegisterForSpaceRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *NameRegisterForSpaceRequest) XXX_Size() int { - return m.Size() + +func (x *NameRegisterForSpaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NameRegisterForSpaceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NameRegisterForSpaceRequest.DiscardUnknown(m) + +func (*NameRegisterForSpaceRequest) ProtoMessage() {} + +func (x *NameRegisterForSpaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NameRegisterForSpaceRequest proto.InternalMessageInfo +// Deprecated: Use NameRegisterForSpaceRequest.ProtoReflect.Descriptor instead. +func (*NameRegisterForSpaceRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{13} +} -func (m *NameRegisterForSpaceRequest) GetFullName() string { - if m != nil { - return m.FullName +func (x *NameRegisterForSpaceRequest) GetFullName() string { + if x != nil { + return x.FullName } return "" } -func (m *NameRegisterForSpaceRequest) GetOwnerAnyAddress() string { - if m != nil { - return m.OwnerAnyAddress +func (x *NameRegisterForSpaceRequest) GetOwnerAnyAddress() string { + if x != nil { + return x.OwnerAnyAddress } return "" } -func (m *NameRegisterForSpaceRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *NameRegisterForSpaceRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *NameRegisterForSpaceRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId +func (x *NameRegisterForSpaceRequest) GetSpaceId() string { + if x != nil { + return x.SpaceId } return "" } -func (m *NameRegisterForSpaceRequest) GetRegisterPeriodMonths() uint32 { - if m != nil { - return m.RegisterPeriodMonths +func (x *NameRegisterForSpaceRequest) GetRegisterPeriodMonths() uint32 { + if x != nil { + return x.RegisterPeriodMonths } return 0 } type GetOperationStatusRequest struct { - OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetOperationStatusRequest) Reset() { *m = GetOperationStatusRequest{} } -func (m *GetOperationStatusRequest) String() string { return proto.CompactTextString(m) } -func (*GetOperationStatusRequest) ProtoMessage() {} -func (*GetOperationStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{14} -} -func (m *GetOperationStatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetOperationStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetOperationStatusRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetOperationStatusRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *GetOperationStatusRequest) Reset() { + *x = GetOperationStatusRequest{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetOperationStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetOperationStatusRequest.Merge(m, src) -} -func (m *GetOperationStatusRequest) XXX_Size() int { - return m.Size() -} -func (m *GetOperationStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetOperationStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetOperationStatusRequest proto.InternalMessageInfo -func (m *GetOperationStatusRequest) GetOperationId() string { - if m != nil { - return m.OperationId - } - return "" +func (x *GetOperationStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -type OperationResponse struct { - OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` - OperationState OperationState `protobuf:"varint,2,opt,name=operationState,proto3,enum=OperationState" json:"operationState,omitempty"` -} +func (*GetOperationStatusRequest) ProtoMessage() {} -func (m *OperationResponse) Reset() { *m = OperationResponse{} } -func (m *OperationResponse) String() string { return proto.CompactTextString(m) } -func (*OperationResponse) ProtoMessage() {} -func (*OperationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{15} -} -func (m *OperationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OperationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *GetOperationStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *OperationResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *OperationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperationResponse.Merge(m, src) -} -func (m *OperationResponse) XXX_Size() int { - return m.Size() -} -func (m *OperationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_OperationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_OperationResponse proto.InternalMessageInfo - -func (m *OperationResponse) GetOperationId() string { - if m != nil { - return m.OperationId - } - return "" -} - -func (m *OperationResponse) GetOperationState() OperationState { - if m != nil { - return m.OperationState + return ms } - return OperationState_Unknown -} - -func init() { - proto.RegisterEnum("OperationState", OperationState_name, OperationState_value) - proto.RegisterType((*UserAccount)(nil), "UserAccount") - proto.RegisterType((*AdminFundUserAccountRequest)(nil), "AdminFundUserAccountRequest") - proto.RegisterType((*AdminFundUserAccountRequestSigned)(nil), "AdminFundUserAccountRequestSigned") - proto.RegisterType((*AdminFundGasOperationsRequest)(nil), "AdminFundGasOperationsRequest") - proto.RegisterType((*AdminFundGasOperationsRequestSigned)(nil), "AdminFundGasOperationsRequestSigned") - proto.RegisterType((*GetUserAccountRequest)(nil), "GetUserAccountRequest") - proto.RegisterType((*GetDataNameRegisterResponse)(nil), "GetDataNameRegisterResponse") - proto.RegisterType((*CreateUserOperationRequest)(nil), "CreateUserOperationRequest") - proto.RegisterType((*CreateUserOperationRequestSigned)(nil), "CreateUserOperationRequestSigned") - proto.RegisterType((*NameRegisterRequest)(nil), "NameRegisterRequest") - proto.RegisterType((*NameRegisterRequestSigned)(nil), "NameRegisterRequestSigned") - proto.RegisterType((*NameRenewRequest)(nil), "NameRenewRequest") - proto.RegisterType((*NameRenewRequestSigned)(nil), "NameRenewRequestSigned") - proto.RegisterType((*NameRegisterForSpaceRequest)(nil), "NameRegisterForSpaceRequest") - proto.RegisterType((*GetOperationStatusRequest)(nil), "GetOperationStatusRequest") - proto.RegisterType((*OperationResponse)(nil), "OperationResponse") -} - -func init() { - proto.RegisterFile("nameservice/nameserviceproto/protos/nameservice_aa.proto", fileDescriptor_c9d3f9b8b141e804) -} - -var fileDescriptor_c9d3f9b8b141e804 = []byte{ - // 872 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0xf6, 0x26, 0x4e, 0x93, 0x9c, 0xa4, 0xae, 0x33, 0x49, 0x83, 0xeb, 0xa4, 0x8b, 0xbb, 0x20, - 0x14, 0x21, 0xb4, 0x45, 0x41, 0x82, 0xde, 0x80, 0x58, 0x92, 0x26, 0x44, 0x85, 0x34, 0x5a, 0xb7, - 0x42, 0x6a, 0x84, 0xd0, 0xd4, 0x7b, 0xea, 0xae, 0xb0, 0x67, 0xcc, 0xcc, 0x98, 0xe0, 0xb7, 0x40, - 0xe2, 0x11, 0x78, 0x08, 0x5e, 0x81, 0xcb, 0x5c, 0x22, 0x71, 0x83, 0x92, 0x17, 0xe0, 0x0d, 0x40, - 0x3b, 0x5e, 0x6f, 0x67, 0x9d, 0xf1, 0xba, 0xad, 0x2f, 0x72, 0x63, 0xef, 0x7c, 0x73, 0xe6, 0xfc, - 0x7c, 0x67, 0xe7, 0x7c, 0x0b, 0x0f, 0x18, 0xed, 0xa2, 0x44, 0xf1, 0x73, 0xdc, 0xc2, 0xfb, 0xc6, - 0x73, 0x4f, 0x70, 0xc5, 0xef, 0xeb, 0x5f, 0x69, 0xe2, 0x3f, 0x50, 0xea, 0x6b, 0xd4, 0xfb, 0x7d, - 0x0e, 0x56, 0x9e, 0x4a, 0x14, 0x41, 0xab, 0xc5, 0xfb, 0x4c, 0x91, 0x1d, 0xb8, 0xc5, 0xcf, 0x18, - 0x8a, 0x87, 0xea, 0x65, 0x10, 0x45, 0x02, 0xa5, 0xac, 0x39, 0x0d, 0x67, 0x67, 0x39, 0x1c, 0x87, - 0xc9, 0x01, 0xb8, 0x1a, 0x6a, 0x76, 0xa9, 0x50, 0x7b, 0x9c, 0x29, 0x41, 0x5b, 0xdf, 0xd1, 0x4e, - 0x07, 0xd5, 0xe8, 0xe0, 0x9c, 0x3e, 0x38, 0xc5, 0x8a, 0x7c, 0x0d, 0xef, 0x4e, 0xb0, 0xd8, 0xc7, - 0x5e, 0x87, 0x0f, 0x30, 0xaa, 0xcd, 0x37, 0x9c, 0x9d, 0xa5, 0x70, 0x9a, 0x19, 0xf9, 0x00, 0x2a, - 0xba, 0xc6, 0xbd, 0xa4, 0x92, 0x6f, 0xf0, 0x85, 0xaa, 0x95, 0x1b, 0xce, 0x4e, 0x39, 0x1c, 0x43, - 0xc9, 0xc7, 0xb0, 0xce, 0x7b, 0x28, 0xa8, 0x8a, 0x39, 0x33, 0x8c, 0x17, 0xb4, 0xb1, 0x6d, 0xcb, - 0x6b, 0xc3, 0x56, 0x10, 0x75, 0x63, 0x76, 0xd0, 0x67, 0x91, 0xc1, 0x56, 0x88, 0x3f, 0xf5, 0x51, - 0xbe, 0x09, 0x69, 0x2e, 0xc0, 0xab, 0x64, 0x34, 0x41, 0xe5, 0xd0, 0x40, 0xbc, 0x53, 0xb8, 0x57, - 0x10, 0xa8, 0x19, 0xb7, 0x19, 0x46, 0xa4, 0x06, 0x8b, 0x3d, 0x3a, 0xe8, 0x70, 0x1a, 0xe9, 0x30, - 0xab, 0xe1, 0x68, 0x49, 0xb6, 0x61, 0x59, 0xc6, 0x6d, 0x46, 0x55, 0x5f, 0xa0, 0xf6, 0xbe, 0x1a, - 0xbe, 0x02, 0xbc, 0xdf, 0x1c, 0xb8, 0x9b, 0x79, 0x3f, 0xa4, 0xf2, 0x71, 0x56, 0xe9, 0x5b, 0x15, - 0xa2, 0xa1, 0x80, 0x0d, 0x8e, 0xf6, 0xd3, 0x4e, 0x1b, 0x88, 0xf6, 0x94, 0x27, 0x52, 0x77, 0xb1, - 0x1c, 0x8e, 0xc3, 0xde, 0xf7, 0xf0, 0x5e, 0x61, 0x52, 0x33, 0x16, 0x1d, 0xc0, 0xed, 0x43, 0x54, - 0xb3, 0x34, 0xcd, 0x7b, 0x04, 0x5b, 0x87, 0xa8, 0xf6, 0xa9, 0xa2, 0xc7, 0xb4, 0x8b, 0x21, 0xb6, - 0x63, 0xa9, 0x50, 0x84, 0x28, 0x7b, 0x9c, 0x49, 0x24, 0x04, 0xca, 0x11, 0x55, 0x34, 0x4d, 0x4b, - 0x3f, 0x27, 0xd9, 0xb6, 0x38, 0x53, 0xf8, 0x8b, 0x4a, 0x33, 0x1a, 0x2d, 0xbd, 0x73, 0x07, 0xea, - 0x7b, 0x02, 0xa9, 0xc2, 0x24, 0xa7, 0xac, 0xda, 0x51, 0x56, 0x36, 0x67, 0x2e, 0x80, 0xd4, 0x24, - 0x24, 0x29, 0xa4, 0xfe, 0x0c, 0xc4, 0x0c, 0x36, 0x9f, 0x0b, 0x66, 0xab, 0xb1, 0xfc, 0x3a, 0xfd, - 0x5c, 0xb8, 0xd2, 0xcf, 0x3a, 0x2c, 0xbd, 0xe8, 0x77, 0x3a, 0x09, 0x01, 0xb5, 0x1b, 0x7a, 0x37, - 0x5b, 0x7b, 0xcf, 0xa0, 0x31, 0xb9, 0xa2, 0x19, 0xdb, 0xf7, 0x9f, 0x03, 0xeb, 0x79, 0xd6, 0x87, - 0x3c, 0x99, 0xf9, 0x38, 0xf9, 0x7c, 0xb2, 0xaa, 0x03, 0x36, 0xc8, 0x8f, 0xa2, 0x71, 0xd8, 0xc6, - 0xcf, 0xbc, 0x9d, 0x9f, 0x7d, 0xb8, 0x2b, 0xd2, 0x14, 0x9e, 0x70, 0x73, 0x06, 0xa9, 0xe1, 0x10, - 0xd2, 0xbc, 0x2e, 0x85, 0xc5, 0x46, 0x64, 0x17, 0x36, 0x46, 0x06, 0x27, 0x28, 0x62, 0x1e, 0x7d, - 0xcb, 0x99, 0x7a, 0x29, 0x35, 0xdf, 0x37, 0x43, 0xeb, 0x9e, 0xd7, 0x84, 0x3b, 0x16, 0x02, 0x66, - 0xa4, 0xf5, 0x5f, 0x07, 0xaa, 0x43, 0xaf, 0x0c, 0xcf, 0xae, 0x8b, 0xd3, 0x2f, 0xa0, 0x2e, 0x92, - 0xf8, 0x45, 0x84, 0x16, 0x58, 0x90, 0x8f, 0x60, 0x4d, 0xef, 0x5a, 0xa8, 0xbc, 0xba, 0xe1, 0x9d, - 0xc0, 0xe6, 0x78, 0xc5, 0x33, 0x92, 0xf8, 0xb7, 0x03, 0x5b, 0x66, 0x6b, 0x0e, 0xb8, 0x68, 0xf6, - 0x68, 0x0b, 0xaf, 0x8b, 0xcf, 0x1a, 0x2c, 0xca, 0x24, 0xfe, 0x51, 0x94, 0xde, 0xf2, 0xd1, 0xf2, - 0xad, 0xde, 0xbb, 0xcf, 0xe1, 0xce, 0x21, 0xaa, 0xec, 0x3a, 0x37, 0x15, 0x55, 0xfd, 0x4c, 0x28, - 0x1a, 0xb0, 0x92, 0xcd, 0xf1, 0xa3, 0x28, 0xad, 0xce, 0x84, 0x3c, 0x06, 0x6b, 0xc6, 0x28, 0x48, - 0x47, 0xe5, 0xd4, 0x63, 0xe4, 0x33, 0xa8, 0x70, 0x33, 0xe4, 0x90, 0xf6, 0xca, 0xee, 0x2d, 0x3f, - 0x97, 0x09, 0x86, 0x63, 0x66, 0x1f, 0x9e, 0x42, 0x25, 0x6f, 0x41, 0x56, 0x60, 0xf1, 0x29, 0xfb, - 0x91, 0xf1, 0x33, 0x56, 0x2d, 0x25, 0x8b, 0x13, 0x64, 0x51, 0xcc, 0xda, 0x55, 0x87, 0xdc, 0x86, - 0xb5, 0x74, 0xf1, 0x58, 0x1c, 0x73, 0x75, 0xc0, 0xfb, 0x2c, 0xaa, 0xce, 0x91, 0x9b, 0xb0, 0xbc, - 0xc7, 0xbb, 0xbd, 0x0e, 0x2a, 0x8c, 0xaa, 0xf3, 0x64, 0x19, 0x16, 0x1e, 0x0a, 0xc1, 0x45, 0xb5, - 0xbc, 0xfb, 0x47, 0x19, 0xde, 0x09, 0xd8, 0x80, 0xc9, 0x54, 0x43, 0x82, 0xe7, 0x52, 0xbf, 0x88, - 0x31, 0x67, 0xe4, 0x4b, 0x58, 0x35, 0x79, 0x22, 0x75, 0x7f, 0x22, 0x6d, 0x75, 0xe2, 0x5f, 0xe1, - 0xc4, 0x2b, 0x91, 0x13, 0xd8, 0xb0, 0x89, 0x3e, 0xf1, 0xfc, 0xa9, 0xdf, 0x02, 0x13, 0x3c, 0x3e, - 0x81, 0x4d, 0xbb, 0xa6, 0x92, 0xf7, 0xfd, 0xd7, 0x10, 0xdb, 0x09, 0x5e, 0x1f, 0x40, 0x25, 0x2f, - 0xa5, 0x64, 0xd3, 0xb7, 0x6a, 0x6b, 0x7d, 0xd5, 0x37, 0x40, 0xaf, 0x44, 0x1e, 0xc1, 0xba, 0x45, - 0x41, 0xc9, 0x86, 0x6f, 0x99, 0x6c, 0xf5, 0x6d, 0xbf, 0x40, 0x6d, 0xbd, 0x12, 0x39, 0xb5, 0xca, - 0xf1, 0xe8, 0xf2, 0x91, 0x6d, 0xbf, 0xe0, 0x4e, 0x4e, 0x75, 0x7e, 0x0c, 0xeb, 0x16, 0x2d, 0x23, - 0xf7, 0xfc, 0x69, 0x0a, 0x67, 0xe7, 0xec, 0xab, 0x4f, 0xff, 0xbc, 0x70, 0x9d, 0xf3, 0x0b, 0xd7, - 0xf9, 0xe7, 0xc2, 0x75, 0x7e, 0xbd, 0x74, 0x4b, 0xe7, 0x97, 0x6e, 0xe9, 0xaf, 0x4b, 0xb7, 0xf4, - 0x6c, 0xbb, 0xe8, 0x9b, 0xfd, 0xf9, 0x0d, 0xfd, 0xf7, 0xc9, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x58, 0x1a, 0x82, 0x1c, 0xda, 0x0b, 0x00, 0x00, -} - -func (m *UserAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *UserAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OperationsCountLeft != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.OperationsCountLeft)) - i-- - dAtA[i] = 0x28 - } - if m.NamesCountLeft != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.NamesCountLeft)) - i-- - dAtA[i] = 0x20 - } - if m.OwnerSmartContracWalletDeployed { - i-- - if m.OwnerSmartContracWalletDeployed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.OwnerSmartContracWalletAddress) > 0 { - i -= len(m.OwnerSmartContracWalletAddress) - copy(dAtA[i:], m.OwnerSmartContracWalletAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerSmartContracWalletAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use GetOperationStatusRequest.ProtoReflect.Descriptor instead. +func (*GetOperationStatusRequest) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{14} } -func (m *AdminFundUserAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *GetOperationStatusRequest) GetOperationId() string { + if x != nil { + return x.OperationId } - return dAtA[:n], nil -} - -func (m *AdminFundUserAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *AdminFundUserAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NamesCount != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.NamesCount)) - i-- - dAtA[i] = 0x10 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type OperationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` + OperationState OperationState `protobuf:"varint,2,opt,name=operationState,proto3,enum=OperationState" json:"operationState,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *AdminFundUserAccountRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *OperationResponse) Reset() { + *x = OperationResponse{} + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *AdminFundUserAccountRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *OperationResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AdminFundUserAccountRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +func (*OperationResponse) ProtoMessage() {} -func (m *AdminFundGasOperationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *OperationResponse) ProtoReflect() protoreflect.Message { + mi := &file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *AdminFundGasOperationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use OperationResponse.ProtoReflect.Descriptor instead. +func (*OperationResponse) Descriptor() ([]byte, []int) { + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP(), []int{15} } -func (m *AdminFundGasOperationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OperationsCount != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.OperationsCount)) - i-- - dAtA[i] = 0x18 +func (x *OperationResponse) GetOperationId() string { + if x != nil { + return x.OperationId } - if len(m.OwnerAnyID) > 0 { - i -= len(m.OwnerAnyID) - copy(dAtA[i:], m.OwnerAnyID) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyID))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return "" } -func (m *AdminFundGasOperationsRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +func (x *OperationResponse) GetOperationState() OperationState { + if x != nil { + return x.OperationState + } + return OperationState_OpUnknown +} + +var File_nameservice_nameserviceproto_protos_nameservice_aa_proto protoreflect.FileDescriptor + +var file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDesc = string([]byte{ + 0x0a, 0x38, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x61, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x0b, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x6d, 0x61, + 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x48, 0x0a, 0x1f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x6d, 0x61, 0x72, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x12, 0x30, + 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x4c, 0x65, 0x66, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, + 0x22, 0x67, 0x0a, 0x1b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5b, 0x0a, 0x21, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x1d, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x46, 0x75, 0x6e, 0x64, 0x47, 0x61, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x44, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, + 0x49, 0x44, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5d, 0x0a, 0x23, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x47, 0x61, 0x73, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x41, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4b, + 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x1a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, + 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x44, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, + 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5a, + 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xff, 0x01, 0x0a, 0x13, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, + 0x53, 0x6d, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x22, 0x53, 0x0a, 0x19, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x41, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x1a, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x54, + 0x6f, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6e, 0x65, + 0x77, 0x54, 0x6f, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x11, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x6f, + 0x6e, 0x74, 0x68, 0x73, 0x22, 0x50, 0x0a, 0x16, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x6e, 0x65, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x1b, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x41, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x32, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x6f, + 0x6e, 0x74, 0x68, 0x73, 0x22, 0x3d, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x6e, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x0e, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x2a, 0x5d, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x70, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, + 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x4e, 0x6f, + 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x10, 0x04, 0x32, 0xb7, 0x04, 0x0a, 0x17, 0x41, 0x6e, 0x79, 0x6e, 0x73, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x14, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x46, 0x75, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x12, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x54, 0x0a, 0x16, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x47, + 0x61, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x47, 0x61, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x1a, 0x12, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x5b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, + 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x13, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x12, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x1e, 0x5a, 0x1c, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *AdminFundGasOperationsRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var ( + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescOnce sync.Once + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescData []byte +) -func (m *AdminFundGasOperationsRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescGZIP() []byte { + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescOnce.Do(func() { + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDesc), len(file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDesc))) + }) + return file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDescData +} + +var file_nameservice_nameserviceproto_protos_nameservice_aa_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_nameservice_nameserviceproto_protos_nameservice_aa_proto_goTypes = []any{ + (OperationState)(0), // 0: OperationState + (*UserAccount)(nil), // 1: UserAccount + (*AdminFundUserAccountRequest)(nil), // 2: AdminFundUserAccountRequest + (*AdminFundUserAccountRequestSigned)(nil), // 3: AdminFundUserAccountRequestSigned + (*AdminFundGasOperationsRequest)(nil), // 4: AdminFundGasOperationsRequest + (*AdminFundGasOperationsRequestSigned)(nil), // 5: AdminFundGasOperationsRequestSigned + (*GetUserAccountRequest)(nil), // 6: GetUserAccountRequest + (*GetDataNameRegisterResponse)(nil), // 7: GetDataNameRegisterResponse + (*CreateUserOperationRequest)(nil), // 8: CreateUserOperationRequest + (*CreateUserOperationRequestSigned)(nil), // 9: CreateUserOperationRequestSigned + (*NameRegisterRequest)(nil), // 10: NameRegisterRequest + (*NameRegisterRequestSigned)(nil), // 11: NameRegisterRequestSigned + (*NameRenewRequest)(nil), // 12: NameRenewRequest + (*NameRenewRequestSigned)(nil), // 13: NameRenewRequestSigned + (*NameRegisterForSpaceRequest)(nil), // 14: NameRegisterForSpaceRequest + (*GetOperationStatusRequest)(nil), // 15: GetOperationStatusRequest + (*OperationResponse)(nil), // 16: OperationResponse +} +var file_nameservice_nameserviceproto_protos_nameservice_aa_proto_depIdxs = []int32{ + 0, // 0: OperationResponse.operationState:type_name -> OperationState + 15, // 1: AnynsAccountAbstraction.GetOperation:input_type -> GetOperationStatusRequest + 3, // 2: AnynsAccountAbstraction.AdminFundUserAccount:input_type -> AdminFundUserAccountRequestSigned + 5, // 3: AnynsAccountAbstraction.AdminFundGasOperations:input_type -> AdminFundGasOperationsRequestSigned + 6, // 4: AnynsAccountAbstraction.GetUserAccount:input_type -> GetUserAccountRequest + 10, // 5: AnynsAccountAbstraction.GetDataNameRegister:input_type -> NameRegisterRequest + 14, // 6: AnynsAccountAbstraction.GetDataNameRegisterForSpace:input_type -> NameRegisterForSpaceRequest + 9, // 7: AnynsAccountAbstraction.CreateUserOperation:input_type -> CreateUserOperationRequestSigned + 16, // 8: AnynsAccountAbstraction.GetOperation:output_type -> OperationResponse + 16, // 9: AnynsAccountAbstraction.AdminFundUserAccount:output_type -> OperationResponse + 16, // 10: AnynsAccountAbstraction.AdminFundGasOperations:output_type -> OperationResponse + 1, // 11: AnynsAccountAbstraction.GetUserAccount:output_type -> UserAccount + 7, // 12: AnynsAccountAbstraction.GetDataNameRegister:output_type -> GetDataNameRegisterResponse + 7, // 13: AnynsAccountAbstraction.GetDataNameRegisterForSpace:output_type -> GetDataNameRegisterResponse + 16, // 14: AnynsAccountAbstraction.CreateUserOperation:output_type -> OperationResponse + 8, // [8:15] is the sub-list for method output_type + 1, // [1:8] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nameservice_nameserviceproto_protos_nameservice_aa_proto_init() } +func file_nameservice_nameserviceproto_protos_nameservice_aa_proto_init() { + if File_nameservice_nameserviceproto_protos_nameservice_aa_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDesc), len(file_nameservice_nameserviceproto_protos_nameservice_aa_proto_rawDesc)), + NumEnums: 1, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nameservice_nameserviceproto_protos_nameservice_aa_proto_goTypes, + DependencyIndexes: file_nameservice_nameserviceproto_protos_nameservice_aa_proto_depIdxs, + EnumInfos: file_nameservice_nameserviceproto_protos_nameservice_aa_proto_enumTypes, + MessageInfos: file_nameservice_nameserviceproto_protos_nameservice_aa_proto_msgTypes, + }.Build() + File_nameservice_nameserviceproto_protos_nameservice_aa_proto = out.File + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_goTypes = nil + file_nameservice_nameserviceproto_protos_nameservice_aa_proto_depIdxs = nil } - -func (m *GetUserAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetUserAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetUserAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetDataNameRegisterResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetDataNameRegisterResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetDataNameRegisterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Context) > 0 { - i -= len(m.Context) - copy(dAtA[i:], m.Context) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Context))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CreateUserOperationRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateUserOperationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateUserOperationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FullName) > 0 { - i -= len(m.FullName) - copy(dAtA[i:], m.FullName) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.FullName))) - i-- - dAtA[i] = 0x32 - } - if len(m.OwnerAnyID) > 0 { - i -= len(m.OwnerAnyID) - copy(dAtA[i:], m.OwnerAnyID) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyID))) - i-- - dAtA[i] = 0x2a - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Context) > 0 { - i -= len(m.Context) - copy(dAtA[i:], m.Context) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Context))) - i-- - dAtA[i] = 0x1a - } - if len(m.SignedData) > 0 { - i -= len(m.SignedData) - copy(dAtA[i:], m.SignedData) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.SignedData))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CreateUserOperationRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateUserOperationRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateUserOperationRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NameRegisterRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameRegisterRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RegisterPeriodMonths != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.RegisterPeriodMonths)) - i-- - dAtA[i] = 0x28 - } - if m.RegisterToSmartContractWallet { - i-- - if m.RegisterToSmartContractWallet { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.OwnerAnyAddress) > 0 { - i -= len(m.OwnerAnyAddress) - copy(dAtA[i:], m.OwnerAnyAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.FullName) > 0 { - i -= len(m.FullName) - copy(dAtA[i:], m.FullName) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.FullName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NameRegisterRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameRegisterRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameRegisterRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NameRenewRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameRenewRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameRenewRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RenewPeriodMonths != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.RenewPeriodMonths)) - i-- - dAtA[i] = 0x28 - } - if m.RenewToSmartContractWallet { - i-- - if m.RenewToSmartContractWallet { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.OwnerAnyAddress) > 0 { - i -= len(m.OwnerAnyAddress) - copy(dAtA[i:], m.OwnerAnyAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.FullName) > 0 { - i -= len(m.FullName) - copy(dAtA[i:], m.FullName) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.FullName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NameRenewRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameRenewRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameRenewRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NameRegisterForSpaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NameRegisterForSpaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameRegisterForSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RegisterPeriodMonths != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.RegisterPeriodMonths)) - i-- - dAtA[i] = 0x28 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x22 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.OwnerAnyAddress) > 0 { - i -= len(m.OwnerAnyAddress) - copy(dAtA[i:], m.OwnerAnyAddress) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.FullName) > 0 { - i -= len(m.FullName) - copy(dAtA[i:], m.FullName) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.FullName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetOperationStatusRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetOperationStatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetOperationStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OperationId) > 0 { - i -= len(m.OperationId) - copy(dAtA[i:], m.OperationId) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OperationId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OperationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OperationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OperationState != 0 { - i = encodeVarintNameserviceAa(dAtA, i, uint64(m.OperationState)) - i-- - dAtA[i] = 0x10 - } - if len(m.OperationId) > 0 { - i -= len(m.OperationId) - copy(dAtA[i:], m.OperationId) - i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OperationId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintNameserviceAa(dAtA []byte, offset int, v uint64) int { - offset -= sovNameserviceAa(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UserAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerSmartContracWalletAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.OwnerSmartContracWalletDeployed { - n += 2 - } - if m.NamesCountLeft != 0 { - n += 1 + sovNameserviceAa(uint64(m.NamesCountLeft)) - } - if m.OperationsCountLeft != 0 { - n += 1 + sovNameserviceAa(uint64(m.OperationsCountLeft)) - } - return n -} - -func (m *AdminFundUserAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.NamesCount != 0 { - n += 1 + sovNameserviceAa(uint64(m.NamesCount)) - } - return n -} - -func (m *AdminFundUserAccountRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *AdminFundGasOperationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerAnyID) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.OperationsCount != 0 { - n += 1 + sovNameserviceAa(uint64(m.OperationsCount)) - } - return n -} - -func (m *AdminFundGasOperationsRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *GetUserAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *GetDataNameRegisterResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Context) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *CreateUserOperationRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.SignedData) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Context) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerAnyID) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.FullName) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *CreateUserOperationRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *NameRegisterRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FullName) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerAnyAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.RegisterToSmartContractWallet { - n += 2 - } - if m.RegisterPeriodMonths != 0 { - n += 1 + sovNameserviceAa(uint64(m.RegisterPeriodMonths)) - } - return n -} - -func (m *NameRegisterRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *NameRenewRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FullName) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerAnyAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.RenewToSmartContractWallet { - n += 2 - } - if m.RenewPeriodMonths != 0 { - n += 1 + sovNameserviceAa(uint64(m.RenewPeriodMonths)) - } - return n -} - -func (m *NameRenewRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *NameRegisterForSpaceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FullName) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerAnyAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.RegisterPeriodMonths != 0 { - n += 1 + sovNameserviceAa(uint64(m.RegisterPeriodMonths)) - } - return n -} - -func (m *GetOperationStatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OperationId) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - return n -} - -func (m *OperationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OperationId) - if l > 0 { - n += 1 + l + sovNameserviceAa(uint64(l)) - } - if m.OperationState != 0 { - n += 1 + sovNameserviceAa(uint64(m.OperationState)) - } - return n -} - -func sovNameserviceAa(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozNameserviceAa(x uint64) (n int) { - return sovNameserviceAa(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UserAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerSmartContracWalletAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerSmartContracWalletAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerSmartContracWalletDeployed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.OwnerSmartContracWalletDeployed = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NamesCountLeft", wireType) - } - m.NamesCountLeft = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NamesCountLeft |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationsCountLeft", wireType) - } - m.OperationsCountLeft = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OperationsCountLeft |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdminFundUserAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdminFundUserAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdminFundUserAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NamesCount", wireType) - } - m.NamesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NamesCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdminFundUserAccountRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdminFundUserAccountRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdminFundUserAccountRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdminFundGasOperationsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdminFundGasOperationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdminFundGasOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationsCount", wireType) - } - m.OperationsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OperationsCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdminFundGasOperationsRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdminFundGasOperationsRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdminFundGasOperationsRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetUserAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetUserAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetUserAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetDataNameRegisterResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetDataNameRegisterResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetDataNameRegisterResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) - if m.Context == nil { - m.Context = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateUserOperationRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateUserOperationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateUserOperationRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignedData = append(m.SignedData[:0], dAtA[iNdEx:postIndex]...) - if m.SignedData == nil { - m.SignedData = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) - if m.Context == nil { - m.Context = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateUserOperationRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateUserOperationRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateUserOperationRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NameRegisterRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameRegisterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameRegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RegisterToSmartContractWallet", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RegisterToSmartContractWallet = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RegisterPeriodMonths", wireType) - } - m.RegisterPeriodMonths = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RegisterPeriodMonths |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NameRegisterRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameRegisterRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameRegisterRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NameRenewRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameRenewRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameRenewRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RenewToSmartContractWallet", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RenewToSmartContractWallet = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RenewPeriodMonths", wireType) - } - m.RenewPeriodMonths = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RenewPeriodMonths |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NameRenewRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameRenewRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameRenewRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NameRegisterForSpaceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NameRegisterForSpaceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NameRegisterForSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RegisterPeriodMonths", wireType) - } - m.RegisterPeriodMonths = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RegisterPeriodMonths |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetOperationStatusRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetOperationStatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetOperationStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperationId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OperationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNameserviceAa - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNameserviceAa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperationId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationState", wireType) - } - m.OperationState = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OperationState |= OperationState(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNameserviceAa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNameserviceAa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNameserviceAa(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNameserviceAa - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthNameserviceAa - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupNameserviceAa - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthNameserviceAa - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthNameserviceAa = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNameserviceAa = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupNameserviceAa = fmt.Errorf("proto: unexpected end of group") -) diff --git a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go index ac123f57f..9b5c5ea2d 100644 --- a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: nameservice/nameserviceproto/protos/nameservice_aa.proto package nameserviceproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto struct{} func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCAnynsAccountAbstractionClient interface { diff --git a/nameservice/nameserviceproto/nameservice_aa_vtproto.pb.go b/nameservice/nameserviceproto/nameservice_aa_vtproto.pb.go new file mode 100644 index 000000000..8fb8b705c --- /dev/null +++ b/nameservice/nameserviceproto/nameservice_aa_vtproto.pb.go @@ -0,0 +1,3417 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: nameservice/nameserviceproto/protos/nameservice_aa.proto + +package nameserviceproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *UserAccount) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UserAccount) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *UserAccount) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.OperationsCountLeft != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OperationsCountLeft)) + i-- + dAtA[i] = 0x28 + } + if m.NamesCountLeft != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NamesCountLeft)) + i-- + dAtA[i] = 0x20 + } + if m.OwnerSmartContracWalletDeployed { + i-- + if m.OwnerSmartContracWalletDeployed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.OwnerSmartContracWalletAddress) > 0 { + i -= len(m.OwnerSmartContracWalletAddress) + copy(dAtA[i:], m.OwnerSmartContracWalletAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerSmartContracWalletAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundUserAccountRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AdminFundUserAccountRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AdminFundUserAccountRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.NamesCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NamesCount)) + i-- + dAtA[i] = 0x10 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundUserAccountRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AdminFundUserAccountRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AdminFundUserAccountRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundGasOperationsRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AdminFundGasOperationsRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AdminFundGasOperationsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.OperationsCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OperationsCount)) + i-- + dAtA[i] = 0x18 + } + if len(m.OwnerAnyID) > 0 { + i -= len(m.OwnerAnyID) + copy(dAtA[i:], m.OwnerAnyID) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyID))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundGasOperationsRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AdminFundGasOperationsRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AdminFundGasOperationsRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetUserAccountRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserAccountRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetUserAccountRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetDataNameRegisterResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDataNameRegisterResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetDataNameRegisterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Context) > 0 { + i -= len(m.Context) + copy(dAtA[i:], m.Context) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Context))) + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateUserOperationRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateUserOperationRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CreateUserOperationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0x32 + } + if len(m.OwnerAnyID) > 0 { + i -= len(m.OwnerAnyID) + copy(dAtA[i:], m.OwnerAnyID) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyID))) + i-- + dAtA[i] = 0x2a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Context) > 0 { + i -= len(m.Context) + copy(dAtA[i:], m.Context) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Context))) + i-- + dAtA[i] = 0x1a + } + if len(m.SignedData) > 0 { + i -= len(m.SignedData) + copy(dAtA[i:], m.SignedData) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SignedData))) + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateUserOperationRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateUserOperationRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CreateUserOperationRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRegisterRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameRegisterRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameRegisterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.RegisterPeriodMonths != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RegisterPeriodMonths)) + i-- + dAtA[i] = 0x28 + } + if m.RegisterToSmartContractWallet { + i-- + if m.RegisterToSmartContractWallet { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRegisterRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameRegisterRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameRegisterRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRenewRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameRenewRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameRenewRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.RenewPeriodMonths != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RenewPeriodMonths)) + i-- + dAtA[i] = 0x28 + } + if m.RenewToSmartContractWallet { + i-- + if m.RenewToSmartContractWallet { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRenewRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameRenewRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameRenewRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRegisterForSpaceRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameRegisterForSpaceRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameRegisterForSpaceRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.RegisterPeriodMonths != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RegisterPeriodMonths)) + i-- + dAtA[i] = 0x28 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x22 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetOperationStatusRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationStatusRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetOperationStatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OperationId) > 0 { + i -= len(m.OperationId) + copy(dAtA[i:], m.OperationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OperationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OperationResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OperationResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *OperationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.OperationState != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OperationState)) + i-- + dAtA[i] = 0x10 + } + if len(m.OperationId) > 0 { + i -= len(m.OperationId) + copy(dAtA[i:], m.OperationId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OperationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UserAccount) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerSmartContracWalletAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.OwnerSmartContracWalletDeployed { + n += 2 + } + if m.NamesCountLeft != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NamesCountLeft)) + } + if m.OperationsCountLeft != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.OperationsCountLeft)) + } + n += len(m.unknownFields) + return n +} + +func (m *AdminFundUserAccountRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.NamesCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NamesCount)) + } + n += len(m.unknownFields) + return n +} + +func (m *AdminFundUserAccountRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AdminFundGasOperationsRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerAnyID) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.OperationsCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.OperationsCount)) + } + n += len(m.unknownFields) + return n +} + +func (m *AdminFundGasOperationsRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetUserAccountRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetDataNameRegisterResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Context) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CreateUserOperationRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SignedData) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Context) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerAnyID) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.FullName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CreateUserOperationRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *NameRegisterRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RegisterToSmartContractWallet { + n += 2 + } + if m.RegisterPeriodMonths != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RegisterPeriodMonths)) + } + n += len(m.unknownFields) + return n +} + +func (m *NameRegisterRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *NameRenewRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RenewToSmartContractWallet { + n += 2 + } + if m.RenewPeriodMonths != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RenewPeriodMonths)) + } + n += len(m.unknownFields) + return n +} + +func (m *NameRenewRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *NameRegisterForSpaceRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RegisterPeriodMonths != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RegisterPeriodMonths)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetOperationStatusRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperationId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *OperationResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperationId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.OperationState != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.OperationState)) + } + n += len(m.unknownFields) + return n +} + +func (m *UserAccount) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UserAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerSmartContracWalletAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerSmartContracWalletAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerSmartContracWalletDeployed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OwnerSmartContracWalletDeployed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NamesCountLeft", wireType) + } + m.NamesCountLeft = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NamesCountLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationsCountLeft", wireType) + } + m.OperationsCountLeft = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OperationsCountLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundUserAccountRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AdminFundUserAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundUserAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NamesCount", wireType) + } + m.NamesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NamesCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundUserAccountRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AdminFundUserAccountRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundUserAccountRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundGasOperationsRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AdminFundGasOperationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundGasOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationsCount", wireType) + } + m.OperationsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OperationsCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundGasOperationsRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AdminFundGasOperationsRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundGasOperationsRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserAccountRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDataNameRegisterResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDataNameRegisterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDataNameRegisterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) + if m.Context == nil { + m.Context = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateUserOperationRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateUserOperationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateUserOperationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignedData = append(m.SignedData[:0], dAtA[iNdEx:postIndex]...) + if m.SignedData == nil { + m.SignedData = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) + if m.Context == nil { + m.Context = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateUserOperationRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateUserOperationRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateUserOperationRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRegisterRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameRegisterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterToSmartContractWallet", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RegisterToSmartContractWallet = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterPeriodMonths", wireType) + } + m.RegisterPeriodMonths = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegisterPeriodMonths |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRegisterRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameRegisterRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRegisterRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRenewRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameRenewRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRenewRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RenewToSmartContractWallet", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RenewToSmartContractWallet = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RenewPeriodMonths", wireType) + } + m.RenewPeriodMonths = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RenewPeriodMonths |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRenewRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameRenewRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRenewRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRegisterForSpaceRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameRegisterForSpaceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRegisterForSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterPeriodMonths", wireType) + } + m.RegisterPeriodMonths = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegisterPeriodMonths |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationStatusRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperationResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OperationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationState", wireType) + } + m.OperationState = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OperationState |= OperationState(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/nameservice/nameserviceproto/nameservice_drpc.pb.go b/nameservice/nameserviceproto/nameservice_drpc.pb.go index 9ad7f4919..c35d805dd 100644 --- a/nameservice/nameserviceproto/nameservice_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: nameservice/nameserviceproto/protos/nameservice.proto package nameserviceproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto struct{} func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCAnynsClient interface { diff --git a/nameservice/nameserviceproto/nameservice_vtproto.pb.go b/nameservice/nameserviceproto/nameservice_vtproto.pb.go new file mode 100644 index 000000000..740286bcf --- /dev/null +++ b/nameservice/nameserviceproto/nameservice_vtproto.pb.go @@ -0,0 +1,1642 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: nameservice/nameserviceproto/protos/nameservice.proto + +package nameserviceproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *NameAvailableRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameAvailableRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameAvailableRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchNameAvailableRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchNameAvailableRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchNameAvailableRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.FullNames) > 0 { + for iNdEx := len(m.FullNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FullNames[iNdEx]) + copy(dAtA[i:], m.FullNames[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FullNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NameByAddressRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameByAddressRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameByAddressRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OwnerScwEthAddress) > 0 { + i -= len(m.OwnerScwEthAddress) + copy(dAtA[i:], m.OwnerScwEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerScwEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchNameByAddressRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchNameByAddressRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchNameByAddressRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OwnerScwEthAddresses) > 0 { + for iNdEx := len(m.OwnerScwEthAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OwnerScwEthAddresses[iNdEx]) + copy(dAtA[i:], m.OwnerScwEthAddresses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerScwEthAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NameByAnyIdRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameByAnyIdRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameByAnyIdRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AnyAddress) > 0 { + i -= len(m.AnyAddress) + copy(dAtA[i:], m.AnyAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AnyAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchNameByAnyIdRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchNameByAnyIdRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchNameByAnyIdRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AnyAddresses) > 0 { + for iNdEx := len(m.AnyAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AnyAddresses[iNdEx]) + copy(dAtA[i:], m.AnyAddresses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AnyAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NameAvailableResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameAvailableResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameAvailableResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.NameExpires != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NameExpires)) + i-- + dAtA[i] = 0x30 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x2a + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerScwEthAddress) > 0 { + i -= len(m.OwnerScwEthAddress) + copy(dAtA[i:], m.OwnerScwEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerScwEthAddress))) + i-- + dAtA[i] = 0x12 + } + if m.Available { + i-- + if m.Available { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BatchNameAvailableResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchNameAvailableResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchNameAvailableResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Results[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NameByAddressResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NameByAddressResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NameByAddressResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Found { + i-- + if m.Found { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BatchNameByAddressResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchNameByAddressResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BatchNameByAddressResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Results[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NameAvailableRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BatchNameAvailableRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FullNames) > 0 { + for _, s := range m.FullNames { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NameByAddressRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerScwEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BatchNameByAddressRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OwnerScwEthAddresses) > 0 { + for _, s := range m.OwnerScwEthAddresses { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NameByAnyIdRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AnyAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BatchNameByAnyIdRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AnyAddresses) > 0 { + for _, s := range m.AnyAddresses { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NameAvailableResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Available { + n += 2 + } + l = len(m.OwnerScwEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.NameExpires != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NameExpires)) + } + n += len(m.unknownFields) + return n +} + +func (m *BatchNameAvailableResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NameByAddressResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Found { + n += 2 + } + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BatchNameByAddressResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NameAvailableRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameAvailableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchNameAvailableRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchNameAvailableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullNames = append(m.FullNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameByAddressRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameByAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchNameByAddressRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchNameByAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerScwEthAddresses = append(m.OwnerScwEthAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameByAnyIdRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameByAnyIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameByAnyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchNameByAnyIdRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchNameByAnyIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameByAnyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyAddresses = append(m.AnyAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameAvailableResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameAvailableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Available = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NameExpires", wireType) + } + m.NameExpires = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NameExpires |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchNameAvailableResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchNameAvailableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &NameAvailableResponse{}) + if err := m.Results[len(m.Results)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameByAddressResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NameByAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Found = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchNameByAddressResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchNameByAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &NameByAddressResponse{}) + if err := m.Results[len(m.Results)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto index b29ccb027..5a88ee8cf 100644 --- a/nameservice/nameserviceproto/protos/nameservice_aa.proto +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -184,7 +184,7 @@ message GetOperationStatusRequest { } enum OperationState { - Unknown = 0; + OpUnknown = 0; Pending = 1; PendingOrNotFound = 2; diff --git a/net/peer/mock_peer/mock_peer.go b/net/peer/mock_peer/mock_peer.go index 4ace14a8a..7e1ba5639 100644 --- a/net/peer/mock_peer/mock_peer.go +++ b/net/peer/mock_peer/mock_peer.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_peer/mock_peer.go github.com/anyproto/any-sync/net/peer Peer // + // Package mock_peer is a generated GoMock package. package mock_peer @@ -21,6 +22,7 @@ import ( type MockPeer struct { ctrl *gomock.Controller recorder *MockPeerMockRecorder + isgomock struct{} } // MockPeerMockRecorder is the mock recorder for MockPeer. @@ -41,18 +43,18 @@ func (m *MockPeer) EXPECT() *MockPeerMockRecorder { } // AcquireDrpcConn mocks base method. -func (m *MockPeer) AcquireDrpcConn(arg0 context.Context) (drpc.Conn, error) { +func (m *MockPeer) AcquireDrpcConn(ctx context.Context) (drpc.Conn, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AcquireDrpcConn", arg0) + ret := m.ctrl.Call(m, "AcquireDrpcConn", ctx) ret0, _ := ret[0].(drpc.Conn) ret1, _ := ret[1].(error) return ret0, ret1 } // AcquireDrpcConn indicates an expected call of AcquireDrpcConn. -func (mr *MockPeerMockRecorder) AcquireDrpcConn(arg0 any) *gomock.Call { +func (mr *MockPeerMockRecorder) AcquireDrpcConn(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcquireDrpcConn", reflect.TypeOf((*MockPeer)(nil).AcquireDrpcConn), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcquireDrpcConn", reflect.TypeOf((*MockPeer)(nil).AcquireDrpcConn), ctx) } // Close mocks base method. @@ -98,17 +100,17 @@ func (mr *MockPeerMockRecorder) Context() *gomock.Call { } // DoDrpc mocks base method. -func (m *MockPeer) DoDrpc(arg0 context.Context, arg1 func(drpc.Conn) error) error { +func (m *MockPeer) DoDrpc(ctx context.Context, do func(drpc.Conn) error) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DoDrpc", arg0, arg1) + ret := m.ctrl.Call(m, "DoDrpc", ctx, do) ret0, _ := ret[0].(error) return ret0 } // DoDrpc indicates an expected call of DoDrpc. -func (mr *MockPeerMockRecorder) DoDrpc(arg0, arg1 any) *gomock.Call { +func (mr *MockPeerMockRecorder) DoDrpc(ctx, do any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoDrpc", reflect.TypeOf((*MockPeer)(nil).DoDrpc), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoDrpc", reflect.TypeOf((*MockPeer)(nil).DoDrpc), ctx, do) } // Id mocks base method. @@ -140,40 +142,40 @@ func (mr *MockPeerMockRecorder) IsClosed() *gomock.Call { } // ReleaseDrpcConn mocks base method. -func (m *MockPeer) ReleaseDrpcConn(arg0 drpc.Conn) { +func (m *MockPeer) ReleaseDrpcConn(conn drpc.Conn) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ReleaseDrpcConn", arg0) + m.ctrl.Call(m, "ReleaseDrpcConn", conn) } // ReleaseDrpcConn indicates an expected call of ReleaseDrpcConn. -func (mr *MockPeerMockRecorder) ReleaseDrpcConn(arg0 any) *gomock.Call { +func (mr *MockPeerMockRecorder) ReleaseDrpcConn(conn any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseDrpcConn", reflect.TypeOf((*MockPeer)(nil).ReleaseDrpcConn), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseDrpcConn", reflect.TypeOf((*MockPeer)(nil).ReleaseDrpcConn), conn) } // SetTTL mocks base method. -func (m *MockPeer) SetTTL(arg0 time.Duration) { +func (m *MockPeer) SetTTL(ttl time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetTTL", arg0) + m.ctrl.Call(m, "SetTTL", ttl) } // SetTTL indicates an expected call of SetTTL. -func (mr *MockPeerMockRecorder) SetTTL(arg0 any) *gomock.Call { +func (mr *MockPeerMockRecorder) SetTTL(ttl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTTL", reflect.TypeOf((*MockPeer)(nil).SetTTL), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTTL", reflect.TypeOf((*MockPeer)(nil).SetTTL), ttl) } // TryClose mocks base method. -func (m *MockPeer) TryClose(arg0 time.Duration) (bool, error) { +func (m *MockPeer) TryClose(objectTTL time.Duration) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryClose", arg0) + ret := m.ctrl.Call(m, "TryClose", objectTTL) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // TryClose indicates an expected call of TryClose. -func (mr *MockPeerMockRecorder) TryClose(arg0 any) *gomock.Call { +func (mr *MockPeerMockRecorder) TryClose(objectTTL any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockPeer)(nil).TryClose), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockPeer)(nil).TryClose), objectTTL) } diff --git a/net/peer/peer.go b/net/peer/peer.go index 916dc713d..922aba077 100644 --- a/net/peer/peer.go +++ b/net/peer/peer.go @@ -5,6 +5,7 @@ import ( "context" "io" "net" + "slices" "sync" "sync/atomic" "time" @@ -20,6 +21,7 @@ import ( "github.com/anyproto/any-sync/app/ocache" "github.com/anyproto/any-sync/net/connutil" "github.com/anyproto/any-sync/net/rpc" + "github.com/anyproto/any-sync/net/rpc/encoding" "github.com/anyproto/any-sync/net/secureservice/handshake" "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" "github.com/anyproto/any-sync/net/transport" @@ -198,24 +200,32 @@ func (p *peer) DoDrpc(ctx context.Context, do func(conn drpc.Conn) error) error return do(conn) } -func (p *peer) openDrpcConn(ctx context.Context) (dconn *subConn, err error) { +var defaultHandshakeProto = &handshakeproto.Proto{ + Proto: handshakeproto.ProtoType_DRPC, + Encodings: []handshakeproto.Encoding{handshakeproto.Encoding_Snappy, handshakeproto.Encoding_None}, +} + +func (p *peer) openDrpcConn(ctx context.Context) (*subConn, error) { conn, err := p.Open(ctx) if err != nil { return nil, err } - tconn := connutil.NewLastUsageConn(conn) - if err = handshake.OutgoingProtoHandshake(ctx, tconn, handshakeproto.ProtoType_DRPC); err != nil { + lastUsageConn := connutil.NewLastUsageConn(conn) + proto, err := handshake.OutgoingProtoHandshake(ctx, lastUsageConn, defaultHandshakeProto) + if err != nil { return nil, err } bufSize := p.ctrl.DrpcConfig().Stream.MaxMsgSizeMb * (1 << 20) + drpcConn := drpcconn.NewWithOptions(lastUsageConn, drpcconn.Options{ + Manager: drpcmanager.Options{ + Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize}, + Stream: drpcstream.Options{MaximumBufferSize: bufSize}, + }, + }) + isSnappy := slices.Contains(proto.Encodings, handshakeproto.Encoding_Snappy) return &subConn{ - Conn: drpcconn.NewWithOptions(tconn, drpcconn.Options{ - Manager: drpcmanager.Options{ - Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize}, - Stream: drpcstream.Options{MaximumBufferSize: bufSize}, - }, - }), - LastUsageConn: tconn, + Conn: encoding.WrapConnEncoding(drpcConn, isSnappy), + LastUsageConn: lastUsageConn, }, nil } @@ -255,6 +265,7 @@ var defaultProtoChecker = handshake.ProtoChecker{ AllowedProtoTypes: []handshakeproto.ProtoType{ handshakeproto.ProtoType_DRPC, }, + SupportedEncodings: []handshakeproto.Encoding{handshakeproto.Encoding_Snappy, handshakeproto.Encoding_None}, } func (p *peer) serve(conn net.Conn) (err error) { @@ -262,12 +273,17 @@ func (p *peer) serve(conn net.Conn) (err error) { _ = conn.Close() }() hsCtx, cancel := context.WithTimeout(p.Context(), time.Second*20) - if _, err = handshake.IncomingProtoHandshake(hsCtx, conn, defaultProtoChecker); err != nil { + proto, err := handshake.IncomingProtoHandshake(hsCtx, conn, defaultProtoChecker) + if err != nil { cancel() return } cancel() - return p.ctrl.ServeConn(p.Context(), conn) + ctx := p.Context() + if slices.Contains(proto.Encodings, handshakeproto.Encoding_Snappy) { + ctx = encoding.CtxWithSnappy(ctx) + } + return p.ctrl.ServeConn(ctx, conn) } func (p *peer) SetTTL(ttl time.Duration) { diff --git a/net/peer/peer_test.go b/net/peer/peer_test.go index ae5f534b7..f03d55281 100644 --- a/net/peer/peer_test.go +++ b/net/peer/peer_test.go @@ -2,20 +2,21 @@ package peer import ( "context" - "github.com/anyproto/any-sync/net/rpc" - "github.com/anyproto/any-sync/net/secureservice/handshake" - "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" - "github.com/anyproto/any-sync/net/transport/mock_transport" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" "io" "net" _ "net/http/pprof" - "storj.io/drpc" - "storj.io/drpc/drpcconn" "testing" "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + "storj.io/drpc" + "storj.io/drpc/drpcconn" + + "github.com/anyproto/any-sync/net/rpc" + "github.com/anyproto/any-sync/net/secureservice/handshake" + "github.com/anyproto/any-sync/net/transport/mock_transport" ) var ctx = context.Background() @@ -111,7 +112,8 @@ func TestPeerAccept(t *testing.T) { var outHandshakeCh = make(chan error) go func() { - outHandshakeCh <- handshake.OutgoingProtoHandshake(ctx, out, handshakeproto.ProtoType_DRPC) + _, hErr := handshake.OutgoingProtoHandshake(ctx, out, defaultHandshakeProto) + outHandshakeCh <- hErr }() fx.acceptCh <- acceptedConn{conn: in} cn := <-fx.testCtrl.serveConn @@ -130,7 +132,8 @@ func TestPeer_DrpcConn_AcceptThrottling(t *testing.T) { var outHandshakeCh = make(chan error) go func() { - outHandshakeCh <- handshake.OutgoingProtoHandshake(ctx, out, handshakeproto.ProtoType_DRPC) + _, hErr := handshake.OutgoingProtoHandshake(ctx, out, defaultHandshakeProto) + outHandshakeCh <- hErr }() fx.acceptCh <- acceptedConn{conn: in} cn := <-fx.testCtrl.serveConn diff --git a/net/pool/mock_pool/mock_pool.go b/net/pool/mock_pool/mock_pool.go index 2a1b8f99b..62f2997c2 100644 --- a/net/pool/mock_pool/mock_pool.go +++ b/net/pool/mock_pool/mock_pool.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_pool/mock_pool.go github.com/anyproto/any-sync/net/pool Pool,Service // + // Package mock_pool is a generated GoMock package. package mock_pool @@ -21,6 +22,7 @@ import ( type MockPool struct { ctrl *gomock.Controller recorder *MockPoolMockRecorder + isgomock struct{} } // MockPoolMockRecorder is the mock recorder for MockPool. @@ -41,68 +43,69 @@ func (m *MockPool) EXPECT() *MockPoolMockRecorder { } // AddPeer mocks base method. -func (m *MockPool) AddPeer(arg0 context.Context, arg1 peer.Peer) error { +func (m *MockPool) AddPeer(ctx context.Context, p peer.Peer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddPeer", arg0, arg1) + ret := m.ctrl.Call(m, "AddPeer", ctx, p) ret0, _ := ret[0].(error) return ret0 } // AddPeer indicates an expected call of AddPeer. -func (mr *MockPoolMockRecorder) AddPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockPoolMockRecorder) AddPeer(ctx, p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPeer", reflect.TypeOf((*MockPool)(nil).AddPeer), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPeer", reflect.TypeOf((*MockPool)(nil).AddPeer), ctx, p) } // Get mocks base method. -func (m *MockPool) Get(arg0 context.Context, arg1 string) (peer.Peer, error) { +func (m *MockPool) Get(ctx context.Context, id string) (peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, id) ret0, _ := ret[0].(peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockPoolMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockPoolMockRecorder) Get(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPool)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPool)(nil).Get), ctx, id) } // GetOneOf mocks base method. -func (m *MockPool) GetOneOf(arg0 context.Context, arg1 []string) (peer.Peer, error) { +func (m *MockPool) GetOneOf(ctx context.Context, peerIds []string) (peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOneOf", arg0, arg1) + ret := m.ctrl.Call(m, "GetOneOf", ctx, peerIds) ret0, _ := ret[0].(peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // GetOneOf indicates an expected call of GetOneOf. -func (mr *MockPoolMockRecorder) GetOneOf(arg0, arg1 any) *gomock.Call { +func (mr *MockPoolMockRecorder) GetOneOf(ctx, peerIds any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOneOf", reflect.TypeOf((*MockPool)(nil).GetOneOf), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOneOf", reflect.TypeOf((*MockPool)(nil).GetOneOf), ctx, peerIds) } // Pick mocks base method. -func (m *MockPool) Pick(arg0 context.Context, arg1 string) (peer.Peer, error) { +func (m *MockPool) Pick(ctx context.Context, id string) (peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Pick", arg0, arg1) + ret := m.ctrl.Call(m, "Pick", ctx, id) ret0, _ := ret[0].(peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // Pick indicates an expected call of Pick. -func (mr *MockPoolMockRecorder) Pick(arg0, arg1 any) *gomock.Call { +func (mr *MockPoolMockRecorder) Pick(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pick", reflect.TypeOf((*MockPool)(nil).Pick), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pick", reflect.TypeOf((*MockPool)(nil).Pick), ctx, id) } // MockService is a mock of Service interface. type MockService struct { ctrl *gomock.Controller recorder *MockServiceMockRecorder + isgomock struct{} } // MockServiceMockRecorder is the mock recorder for MockService. @@ -123,75 +126,75 @@ func (m *MockService) EXPECT() *MockServiceMockRecorder { } // AddPeer mocks base method. -func (m *MockService) AddPeer(arg0 context.Context, arg1 peer.Peer) error { +func (m *MockService) AddPeer(ctx context.Context, p peer.Peer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddPeer", arg0, arg1) + ret := m.ctrl.Call(m, "AddPeer", ctx, p) ret0, _ := ret[0].(error) return ret0 } // AddPeer indicates an expected call of AddPeer. -func (mr *MockServiceMockRecorder) AddPeer(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceMockRecorder) AddPeer(ctx, p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPeer", reflect.TypeOf((*MockService)(nil).AddPeer), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPeer", reflect.TypeOf((*MockService)(nil).AddPeer), ctx, p) } // Close mocks base method. -func (m *MockService) Close(arg0 context.Context) error { +func (m *MockService) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockServiceMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), ctx) } // Get mocks base method. -func (m *MockService) Get(arg0 context.Context, arg1 string) (peer.Peer, error) { +func (m *MockService) Get(ctx context.Context, id string) (peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, id) ret0, _ := ret[0].(peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockServiceMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Get(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockService)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockService)(nil).Get), ctx, id) } // GetOneOf mocks base method. -func (m *MockService) GetOneOf(arg0 context.Context, arg1 []string) (peer.Peer, error) { +func (m *MockService) GetOneOf(ctx context.Context, peerIds []string) (peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOneOf", arg0, arg1) + ret := m.ctrl.Call(m, "GetOneOf", ctx, peerIds) ret0, _ := ret[0].(peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // GetOneOf indicates an expected call of GetOneOf. -func (mr *MockServiceMockRecorder) GetOneOf(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceMockRecorder) GetOneOf(ctx, peerIds any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOneOf", reflect.TypeOf((*MockService)(nil).GetOneOf), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOneOf", reflect.TypeOf((*MockService)(nil).GetOneOf), ctx, peerIds) } // Init mocks base method. -func (m *MockService) Init(arg0 *app.App) error { +func (m *MockService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), a) } // Name mocks base method. @@ -209,30 +212,30 @@ func (mr *MockServiceMockRecorder) Name() *gomock.Call { } // Pick mocks base method. -func (m *MockService) Pick(arg0 context.Context, arg1 string) (peer.Peer, error) { +func (m *MockService) Pick(ctx context.Context, id string) (peer.Peer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Pick", arg0, arg1) + ret := m.ctrl.Call(m, "Pick", ctx, id) ret0, _ := ret[0].(peer.Peer) ret1, _ := ret[1].(error) return ret0, ret1 } // Pick indicates an expected call of Pick. -func (mr *MockServiceMockRecorder) Pick(arg0, arg1 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Pick(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pick", reflect.TypeOf((*MockService)(nil).Pick), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pick", reflect.TypeOf((*MockService)(nil).Pick), ctx, id) } // Run mocks base method. -func (m *MockService) Run(arg0 context.Context) error { +func (m *MockService) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockServiceMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockService)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockService)(nil).Run), ctx) } diff --git a/net/rpc/encoding/connection.go b/net/rpc/encoding/connection.go new file mode 100644 index 000000000..34cade3eb --- /dev/null +++ b/net/rpc/encoding/connection.go @@ -0,0 +1,95 @@ +package encoding + +import ( + "context" + "errors" + + "storj.io/drpc" + + "github.com/anyproto/any-sync/protobuf" +) + +var ErrNotAProtoMessage = errors.New("encoding: not a proto message") + +type ProtoMessageGettable interface { + ProtoMessage() (protobuf.Message, error) +} + +type ProtoMessageSettable interface { + ProtoMessageGettable + SetProtoMessage(protobuf.Message) error +} + +// WrapConnEncoding wraps the drpc connection and replace an encoding +func WrapConnEncoding(conn drpc.Conn, useSnappy bool) drpc.Conn { + encConn := &connWrap{Conn: conn} + if useSnappy { + encConn.snappyEnc = snappyPool.Get().(*snappyEncoding) + } + return encConn +} + +type connWrap struct { + drpc.Conn + snappyEnc *snappyEncoding +} + +func (c *connWrap) Invoke(ctx context.Context, rpc string, enc drpc.Encoding, in, out drpc.Message) error { + if c.snappyEnc != nil { + enc = c.snappyEnc + } else { + enc = defaultProtoEncoding + } + return c.Conn.Invoke(ctx, rpc, enc, in, out) +} + +func (c *connWrap) NewStream(ctx context.Context, rpc string, enc drpc.Encoding) (drpc.Stream, error) { + if c.snappyEnc != nil { + enc = c.snappyEnc + } else { + enc = defaultProtoEncoding + } + stream, err := c.Conn.NewStream(ctx, rpc, enc) + if err != nil { + return nil, err + } + return streamWrap{Stream: stream, encoding: enc}, nil +} + +func (c *connWrap) Close() (err error) { + err = c.Conn.Close() + if c.snappyEnc != nil { + snappyPool.Put(c.snappyEnc) + } + return +} + +type streamWrap struct { + drpc.Stream + encoding drpc.Encoding + returnToPool bool +} + +func (s streamWrap) MsgSend(msg drpc.Message, _ drpc.Encoding) error { + return s.Stream.MsgSend(msg, s.encoding) +} + +func (s streamWrap) MsgRecv(msg drpc.Message, _ drpc.Encoding) error { + return s.Stream.MsgRecv(msg, s.encoding) +} + +func (s streamWrap) CloseSend() (err error) { + err = s.Stream.CloseSend() + if s.returnToPool { + snappyPool.Put(s.encoding.(*snappyEncoding)) + } + return +} + +func (s streamWrap) Close() (err error) { + err = s.Stream.Close() + if s.returnToPool { + snappyPool.Put(s.encoding.(*snappyEncoding)) + } + return +} diff --git a/net/rpc/encoding/context.go b/net/rpc/encoding/context.go new file mode 100644 index 000000000..06dc725e5 --- /dev/null +++ b/net/rpc/encoding/context.go @@ -0,0 +1,18 @@ +package encoding + +import "context" + +type ctxKey uint32 + +const ( + ctxKeySnappy ctxKey = iota +) + +func CtxWithSnappy(ctx context.Context) context.Context { + return context.WithValue(ctx, ctxKeySnappy, true) +} + +func CtxIsSnappy(ctx context.Context) bool { + isSnappy, _ := ctx.Value(ctxKeySnappy).(bool) + return isSnappy +} diff --git a/net/rpc/encoding/handler.go b/net/rpc/encoding/handler.go new file mode 100644 index 000000000..db93a2aae --- /dev/null +++ b/net/rpc/encoding/handler.go @@ -0,0 +1,29 @@ +package encoding + +import ( + "storj.io/drpc" +) + +func WrapHandler(h drpc.Handler) drpc.Handler { + return &handleWrap{Handler: h} +} + +type handleWrap struct { + drpc.Handler +} + +func (s *handleWrap) HandleRPC(stream drpc.Stream, rpc string) (err error) { + if CtxIsSnappy(stream.Context()) { + stream = streamWrap{ + Stream: stream, + encoding: snappyPool.Get().(*snappyEncoding), + returnToPool: true, + } + } else { + stream = streamWrap{ + Stream: stream, + encoding: defaultProtoEncoding, + } + } + return s.Handler.HandleRPC(stream, rpc) +} diff --git a/net/rpc/encoding/proto.go b/net/rpc/encoding/proto.go new file mode 100644 index 000000000..eee2f4680 --- /dev/null +++ b/net/rpc/encoding/proto.go @@ -0,0 +1,55 @@ +package encoding + +import ( + "storj.io/drpc" + + "github.com/anyproto/any-sync/protobuf" +) + +var ( + defaultProtoEncoding = protoEncoding{} +) + +type protoEncoding struct{} + +func (b protoEncoding) Marshal(msg drpc.Message) ([]byte, error) { + return b.MarshalAppend(nil, msg) +} + +func (b protoEncoding) MarshalAppend(buf []byte, msg drpc.Message) (res []byte, err error) { + protoMessage, ok := msg.(protobuf.Message) + if !ok { + if protoMessageGettable, ok := msg.(ProtoMessageGettable); ok { + protoMessage, err = protoMessageGettable.ProtoMessage() + if err != nil { + return nil, err + } + } else { + return nil, ErrNotAProtoMessage + } + } + return protobuf.MarshalAppend(buf, protoMessage) +} + +func (b protoEncoding) Unmarshal(buf []byte, msg drpc.Message) (err error) { + var protoMessageSettable ProtoMessageSettable + protoMessage, ok := msg.(protobuf.Message) + if !ok { + if protoMessageSettable, ok = msg.(ProtoMessageSettable); ok { + protoMessage, err = protoMessageSettable.ProtoMessage() + if err != nil { + return + } + } else { + return ErrNotAProtoMessage + } + } + err = protoMessage.UnmarshalVT(buf) + if err != nil { + return err + } + if protoMessageSettable != nil { + err = protoMessageSettable.SetProtoMessage(protoMessage) + } + return +} diff --git a/net/rpc/encoding/snappy.go b/net/rpc/encoding/snappy.go new file mode 100644 index 000000000..1f47383fe --- /dev/null +++ b/net/rpc/encoding/snappy.go @@ -0,0 +1,103 @@ +package encoding + +import ( + "fmt" + "slices" + "sync" + "sync/atomic" + "time" + + "github.com/golang/snappy" + "storj.io/drpc" + + "github.com/anyproto/any-sync/protobuf" +) + +var ( + rawBytes atomic.Uint64 + compressedBytes atomic.Uint64 +) + +func init() { + go func() { + for { + time.Sleep(10 * time.Second) + fmt.Printf("rawBytes: %d; compressedBytes: %d\n", rawBytes.Load(), compressedBytes.Load()) + } + }() +} + +var snappyPool = sync.Pool{ + New: func() any { + return &snappyEncoding{} + }, +} + +type snappyEncoding struct { + marshalBuf []byte + unmarshalBuf []byte +} + +func (se *snappyEncoding) Marshal(msg drpc.Message) ([]byte, error) { + return se.MarshalAppend(nil, msg) +} + +func (se *snappyEncoding) MarshalAppend(buf []byte, msg drpc.Message) (res []byte, err error) { + protoMessage, ok := msg.(protobuf.Message) + if !ok { + if protoMessageGettable, ok := msg.(ProtoMessageGettable); ok { + protoMessage, err = protoMessageGettable.ProtoMessage() + if err != nil { + return nil, err + } + } else { + return nil, ErrNotAProtoMessage + } + } + if se.marshalBuf, err = protobuf.MarshalAppend(se.marshalBuf[:0], protoMessage); err != nil { + return nil, err + } + + maxEncodedLen := snappy.MaxEncodedLen(len(se.marshalBuf)) + buf = slices.Grow(buf, maxEncodedLen)[:maxEncodedLen] + res = snappy.Encode(buf, se.marshalBuf) + + rawBytes.Add(uint64(len(se.marshalBuf))) + compressedBytes.Add(uint64(len(res))) + return res, nil +} + +func (se *snappyEncoding) Unmarshal(buf []byte, msg drpc.Message) (err error) { + decodedLen, err := snappy.DecodedLen(buf) + if err != nil { + return + } + se.unmarshalBuf = slices.Grow(se.unmarshalBuf, decodedLen)[:decodedLen] + if se.unmarshalBuf, err = snappy.Decode(se.unmarshalBuf, buf); err != nil { + return + } + + compressedBytes.Add(uint64(len(buf))) + rawBytes.Add(uint64(len(se.unmarshalBuf))) + + var protoMessageSettable ProtoMessageSettable + protoMessage, ok := msg.(protobuf.Message) + if !ok { + if protoMessageSettable, ok = msg.(ProtoMessageSettable); ok { + protoMessage, err = protoMessageSettable.ProtoMessage() + if err != nil { + return + } + } else { + return ErrNotAProtoMessage + } + } + err = protoMessage.UnmarshalVT(se.unmarshalBuf) + if err != nil { + return err + } + if protoMessageSettable != nil { + err = protoMessageSettable.SetProtoMessage(protoMessage) + } + return +} diff --git a/net/rpc/encoding/snappy_test.go b/net/rpc/encoding/snappy_test.go new file mode 100644 index 000000000..c88680ad1 --- /dev/null +++ b/net/rpc/encoding/snappy_test.go @@ -0,0 +1,47 @@ +package encoding + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func TestSnappyEncoding_Marshal(t *testing.T) { + msg := &message{data: []byte("0000000000000000000000000000")} + enc := &snappyEncoding{} + data, err := enc.Marshal(msg) + require.NoError(t, err) + assert.NotEqual(t, msg.data, data) + msg2 := &message{} + require.NoError(t, enc.Unmarshal(data, msg2)) + assert.Equal(t, msg, msg2) + t.Log(len(data), len(msg.data)) +} + +type message struct { + data []byte +} + +func (m *message) SizeVT() (n int) { + return len(m.data) +} + +func (m *message) MarshalVT() (dAtA []byte, err error) { + return m.data, nil +} + +func (m *message) UnmarshalVT(dAtA []byte) error { + m.data = dAtA + return nil +} + +func (m *message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + copy(dAtA, m.data) + return len(m.data), nil +} + +func (m *message) ProtoReflect() protoreflect.Message { + return nil +} diff --git a/net/rpc/limiter/limiterproto/limiter.pb.go b/net/rpc/limiter/limiterproto/limiter.pb.go index 4d861989a..b49e03c62 100644 --- a/net/rpc/limiter/limiterproto/limiter.pb.go +++ b/net/rpc/limiter/limiterproto/limiter.pb.go @@ -1,24 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: net/rpc/limiter/limiterproto/protos/limiter.proto package limiterproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ErrCodes int32 @@ -27,42 +28,104 @@ const ( ErrCodes_ErrorOffset ErrCodes = 700 ) -var ErrCodes_name = map[int32]string{ - 0: "RateLimitExceeded", - 700: "ErrorOffset", -} +// Enum value maps for ErrCodes. +var ( + ErrCodes_name = map[int32]string{ + 0: "RateLimitExceeded", + 700: "ErrorOffset", + } + ErrCodes_value = map[string]int32{ + "RateLimitExceeded": 0, + "ErrorOffset": 700, + } +) -var ErrCodes_value = map[string]int32{ - "RateLimitExceeded": 0, - "ErrorOffset": 700, +func (x ErrCodes) Enum() *ErrCodes { + p := new(ErrCodes) + *p = x + return p } func (x ErrCodes) String() string { - return proto.EnumName(ErrCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrCodes) Descriptor() protoreflect.EnumDescriptor { + return file_net_rpc_limiter_limiterproto_protos_limiter_proto_enumTypes[0].Descriptor() +} + +func (ErrCodes) Type() protoreflect.EnumType { + return &file_net_rpc_limiter_limiterproto_protos_limiter_proto_enumTypes[0] +} + +func (x ErrCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ErrCodes.Descriptor instead. func (ErrCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_43f29163996a95d8, []int{0} + return file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescGZIP(), []int{0} } -func init() { - proto.RegisterEnum("limiter.ErrCodes", ErrCodes_name, ErrCodes_value) +var File_net_rpc_limiter_limiterproto_protos_limiter_proto protoreflect.FileDescriptor + +var file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDesc = string([]byte{ + 0x0a, 0x31, 0x6e, 0x65, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, + 0x72, 0x2f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x2a, 0x33, 0x0a, 0x08, + 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x10, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x10, 0xbc, + 0x05, 0x42, 0x1e, 0x5a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescOnce sync.Once + file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescData []byte +) + +func file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescGZIP() []byte { + file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescOnce.Do(func() { + file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDesc), len(file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDesc))) + }) + return file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDescData } -func init() { - proto.RegisterFile("net/rpc/limiter/limiterproto/protos/limiter.proto", fileDescriptor_43f29163996a95d8) +var file_net_rpc_limiter_limiterproto_protos_limiter_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_net_rpc_limiter_limiterproto_protos_limiter_proto_goTypes = []any{ + (ErrCodes)(0), // 0: limiter.ErrCodes +} +var file_net_rpc_limiter_limiterproto_protos_limiter_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } -var fileDescriptor_43f29163996a95d8 = []byte{ - // 147 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xcc, 0x4b, 0x2d, 0xd1, - 0x2f, 0x2a, 0x48, 0xd6, 0xcf, 0xc9, 0xcc, 0xcd, 0x2c, 0x49, 0x2d, 0x82, 0xd1, 0x05, 0x45, 0xf9, - 0x25, 0xf9, 0xfa, 0x60, 0xb2, 0x18, 0x26, 0xa6, 0x07, 0xe6, 0x0a, 0xb1, 0x43, 0xb9, 0x5a, 0xc6, - 0x5c, 0x1c, 0xae, 0x45, 0x45, 0xce, 0xf9, 0x29, 0xa9, 0xc5, 0x42, 0xa2, 0x5c, 0x82, 0x41, 0x89, - 0x25, 0xa9, 0x3e, 0x20, 0x29, 0xd7, 0x8a, 0xe4, 0xd4, 0xd4, 0x94, 0xd4, 0x14, 0x01, 0x06, 0x21, - 0x01, 0x2e, 0x6e, 0xd7, 0xa2, 0xa2, 0xfc, 0x22, 0xff, 0xb4, 0xb4, 0xe2, 0xd4, 0x12, 0x81, 0x3d, - 0xac, 0x4e, 0x66, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, - 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x25, 0x83, 0xcf, - 0x29, 0x49, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x6b, 0xb3, 0x13, 0xb1, - 0x00, 0x00, 0x00, +func init() { file_net_rpc_limiter_limiterproto_protos_limiter_proto_init() } +func file_net_rpc_limiter_limiterproto_protos_limiter_proto_init() { + if File_net_rpc_limiter_limiterproto_protos_limiter_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDesc), len(file_net_rpc_limiter_limiterproto_protos_limiter_proto_rawDesc)), + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_net_rpc_limiter_limiterproto_protos_limiter_proto_goTypes, + DependencyIndexes: file_net_rpc_limiter_limiterproto_protos_limiter_proto_depIdxs, + EnumInfos: file_net_rpc_limiter_limiterproto_protos_limiter_proto_enumTypes, + }.Build() + File_net_rpc_limiter_limiterproto_protos_limiter_proto = out.File + file_net_rpc_limiter_limiterproto_protos_limiter_proto_goTypes = nil + file_net_rpc_limiter_limiterproto_protos_limiter_proto_depIdxs = nil } diff --git a/net/rpc/limiter/mock_limiter/mock_limiter.go b/net/rpc/limiter/mock_limiter/mock_limiter.go index 78b9cc52c..b369d3a3c 100644 --- a/net/rpc/limiter/mock_limiter/mock_limiter.go +++ b/net/rpc/limiter/mock_limiter/mock_limiter.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_limiter/mock_limiter.go github.com/anyproto/any-sync/net/rpc/limiter RpcLimiter // + // Package mock_limiter is a generated GoMock package. package mock_limiter @@ -21,6 +22,7 @@ import ( type MockRpcLimiter struct { ctrl *gomock.Controller recorder *MockRpcLimiterMockRecorder + isgomock struct{} } // MockRpcLimiterMockRecorder is the mock recorder for MockRpcLimiter. @@ -41,31 +43,31 @@ func (m *MockRpcLimiter) EXPECT() *MockRpcLimiterMockRecorder { } // Close mocks base method. -func (m *MockRpcLimiter) Close(arg0 context.Context) error { +func (m *MockRpcLimiter) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockRpcLimiterMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockRpcLimiterMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRpcLimiter)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRpcLimiter)(nil).Close), ctx) } // Init mocks base method. -func (m *MockRpcLimiter) Init(arg0 *app.App) error { +func (m *MockRpcLimiter) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockRpcLimiterMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockRpcLimiterMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockRpcLimiter)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockRpcLimiter)(nil).Init), a) } // Name mocks base method. @@ -83,29 +85,29 @@ func (mr *MockRpcLimiterMockRecorder) Name() *gomock.Call { } // Run mocks base method. -func (m *MockRpcLimiter) Run(arg0 context.Context) error { +func (m *MockRpcLimiter) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockRpcLimiterMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockRpcLimiterMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRpcLimiter)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRpcLimiter)(nil).Run), ctx) } // WrapDRPCHandler mocks base method. -func (m *MockRpcLimiter) WrapDRPCHandler(arg0 drpc.Handler) drpc.Handler { +func (m *MockRpcLimiter) WrapDRPCHandler(handler drpc.Handler) drpc.Handler { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WrapDRPCHandler", arg0) + ret := m.ctrl.Call(m, "WrapDRPCHandler", handler) ret0, _ := ret[0].(drpc.Handler) return ret0 } // WrapDRPCHandler indicates an expected call of WrapDRPCHandler. -func (mr *MockRpcLimiterMockRecorder) WrapDRPCHandler(arg0 any) *gomock.Call { +func (mr *MockRpcLimiterMockRecorder) WrapDRPCHandler(handler any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WrapDRPCHandler", reflect.TypeOf((*MockRpcLimiter)(nil).WrapDRPCHandler), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WrapDRPCHandler", reflect.TypeOf((*MockRpcLimiter)(nil).WrapDRPCHandler), handler) } diff --git a/net/rpc/rpctest/server.go b/net/rpc/rpctest/server.go index de6bf68bb..27864a851 100644 --- a/net/rpc/rpctest/server.go +++ b/net/rpc/rpctest/server.go @@ -2,13 +2,16 @@ package rpctest import ( "context" + "net" + + "storj.io/drpc/drpcmux" + "storj.io/drpc/drpcserver" + "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/rpc" + "github.com/anyproto/any-sync/net/rpc/encoding" "github.com/anyproto/any-sync/net/rpc/server" - "net" - "storj.io/drpc/drpcmux" - "storj.io/drpc/drpcserver" ) type mockCtrl struct { @@ -26,7 +29,7 @@ func NewTestServer() *TestServer { ts := &TestServer{ Mux: drpcmux.New(), } - ts.Server = drpcserver.New(ts.Mux) + ts.Server = drpcserver.New(encoding.WrapHandler(ts.Mux)) return ts } diff --git a/net/rpc/server/drpcserver.go b/net/rpc/server/drpcserver.go index 85ec08907..bf2005f09 100644 --- a/net/rpc/server/drpcserver.go +++ b/net/rpc/server/drpcserver.go @@ -8,6 +8,7 @@ import ( "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/metric" "github.com/anyproto/any-sync/net/rpc" + "github.com/anyproto/any-sync/net/rpc/encoding" "github.com/anyproto/any-sync/net/rpc/limiter" "go.uber.org/zap" @@ -62,6 +63,8 @@ func (s *drpcServer) Init(a *app.App) (err error) { if s.metric != nil { handler = s.metric.WrapDRPCHandler(handler) } + handler = encoding.WrapHandler(handler) + bufSize := s.config.Stream.MaxMsgSizeMb * (1 << 20) s.drpcServer = drpcserver.NewWithOptions(handler, drpcserver.Options{Manager: drpcmanager.Options{ Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize}, diff --git a/net/secureservice/credential.go b/net/secureservice/credential.go index 04ee9b157..a0051b51a 100644 --- a/net/secureservice/credential.go +++ b/net/secureservice/credential.go @@ -75,7 +75,7 @@ func (p *peerSignVerifier) MakeCredentials(remotePeerId string) *handshakeproto. Identity: marshalled, Sign: sign, } - payload, _ := msg.Marshal() + payload, _ := msg.MarshalVT() return &handshakeproto.Credentials{ Type: handshakeproto.CredentialsType_SignedPeerIds, Payload: payload, @@ -94,7 +94,7 @@ func (p *peerSignVerifier) CheckCredential(remotePeerId string, cred *handshakep return } var msg = &handshakeproto.PayloadSignedPeerIds{} - if err = msg.Unmarshal(cred.Payload); err != nil { + if err = msg.UnmarshalVT(cred.Payload); err != nil { err = handshake.ErrUnexpectedPayload return } diff --git a/net/secureservice/handshake/handshake.go b/net/secureservice/handshake/handshake.go index 8a8af38c6..3807acbac 100644 --- a/net/secureservice/handshake/handshake.go +++ b/net/secureservice/handshake/handshake.go @@ -3,10 +3,12 @@ package handshake import ( "encoding/binary" "errors" - "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" - "golang.org/x/exp/slices" "io" "sync" + + "golang.org/x/exp/slices" + + "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" ) const headerSize = 5 // 1 byte for type + 4 byte for uint32 size @@ -87,8 +89,8 @@ type handshake struct { } func (h *handshake) writeCredentials(cred *handshakeproto.Credentials) (err error) { - h.buf = slices.Grow(h.buf, cred.Size()+headerSize)[:cred.Size()+headerSize] - n, err := cred.MarshalToSizedBuffer(h.buf[headerSize:]) + h.buf = slices.Grow(h.buf, cred.SizeVT()+headerSize)[:cred.SizeVT()+headerSize] + n, err := cred.MarshalToSizedBufferVT(h.buf[headerSize:]) if err != nil { return err } @@ -96,8 +98,8 @@ func (h *handshake) writeCredentials(cred *handshakeproto.Credentials) (err erro } func (h *handshake) writeProto(proto *handshakeproto.Proto) (err error) { - h.buf = slices.Grow(h.buf, proto.Size()+headerSize)[:proto.Size()+headerSize] - n, err := proto.MarshalToSizedBuffer(h.buf[headerSize:]) + h.buf = slices.Grow(h.buf, proto.SizeVT()+headerSize)[:proto.SizeVT()+headerSize] + n, err := proto.MarshalToSizedBufferVT(h.buf[headerSize:]) if err != nil { return err } @@ -122,8 +124,8 @@ func (h *handshake) tryWriteErrAndClose(err error) { func (h *handshake) writeAck(ackErr handshakeproto.Error) (err error) { h.localAck.Error = ackErr - h.buf = slices.Grow(h.buf, h.localAck.Size()+headerSize)[:h.localAck.Size()+headerSize] - n, err := h.localAck.MarshalTo(h.buf[headerSize:]) + h.buf = slices.Grow(h.buf, h.localAck.SizeVT()+headerSize)[:h.localAck.SizeVT()+headerSize] + n, err := h.localAck.MarshalToSizedBufferVT(h.buf[headerSize:]) if err != nil { return err } @@ -164,17 +166,17 @@ func (h *handshake) readMsg(allowedTypes ...byte) (msg message, err error) { } switch tp { case msgTypeCred: - if err = h.remoteCred.Unmarshal(h.buf[:size]); err != nil { + if err = h.remoteCred.UnmarshalVT(h.buf[:size]); err != nil { return } msg.cred = h.remoteCred case msgTypeAck: - if err = h.remoteAck.Unmarshal(h.buf[:size]); err != nil { + if err = h.remoteAck.UnmarshalVT(h.buf[:size]); err != nil { return } msg.ack = h.remoteAck case msgTypeProto: - if err = h.remoteProto.Unmarshal(h.buf[:size]); err != nil { + if err = h.remoteProto.UnmarshalVT(h.buf[:size]); err != nil { return } msg.proto = h.remoteProto diff --git a/net/secureservice/handshake/handshakeproto/handshake.pb.go b/net/secureservice/handshake/handshakeproto/handshake.pb.go index 546779990..16f5bf1be 100644 --- a/net/secureservice/handshake/handshakeproto/handshake.pb.go +++ b/net/secureservice/handshake/handshakeproto/handshake.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: net/secureservice/handshake/handshakeproto/protos/handshake.proto package handshakeproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type CredentialsType int32 @@ -31,22 +30,43 @@ const ( CredentialsType_SignedPeerIds CredentialsType = 1 ) -var CredentialsType_name = map[int32]string{ - 0: "SkipVerify", - 1: "SignedPeerIds", -} +// Enum value maps for CredentialsType. +var ( + CredentialsType_name = map[int32]string{ + 0: "SkipVerify", + 1: "SignedPeerIds", + } + CredentialsType_value = map[string]int32{ + "SkipVerify": 0, + "SignedPeerIds": 1, + } +) -var CredentialsType_value = map[string]int32{ - "SkipVerify": 0, - "SignedPeerIds": 1, +func (x CredentialsType) Enum() *CredentialsType { + p := new(CredentialsType) + *p = x + return p } func (x CredentialsType) String() string { - return proto.EnumName(CredentialsType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CredentialsType) Descriptor() protoreflect.EnumDescriptor { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[0].Descriptor() +} + +func (CredentialsType) Type() protoreflect.EnumType { + return &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[0] } +func (x CredentialsType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CredentialsType.Descriptor instead. func (CredentialsType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{0} + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{0} } type Error int32 @@ -62,34 +82,55 @@ const ( Error_IncompatibleProto Error = 7 ) -var Error_name = map[int32]string{ - 0: "Null", - 1: "Unexpected", - 2: "InvalidCredentials", - 3: "UnexpectedPayload", - 4: "SkipVerifyNotAllowed", - 5: "DeadlineExceeded", - 6: "IncompatibleVersion", - 7: "IncompatibleProto", -} +// Enum value maps for Error. +var ( + Error_name = map[int32]string{ + 0: "Null", + 1: "Unexpected", + 2: "InvalidCredentials", + 3: "UnexpectedPayload", + 4: "SkipVerifyNotAllowed", + 5: "DeadlineExceeded", + 6: "IncompatibleVersion", + 7: "IncompatibleProto", + } + Error_value = map[string]int32{ + "Null": 0, + "Unexpected": 1, + "InvalidCredentials": 2, + "UnexpectedPayload": 3, + "SkipVerifyNotAllowed": 4, + "DeadlineExceeded": 5, + "IncompatibleVersion": 6, + "IncompatibleProto": 7, + } +) -var Error_value = map[string]int32{ - "Null": 0, - "Unexpected": 1, - "InvalidCredentials": 2, - "UnexpectedPayload": 3, - "SkipVerifyNotAllowed": 4, - "DeadlineExceeded": 5, - "IncompatibleVersion": 6, - "IncompatibleProto": 7, +func (x Error) Enum() *Error { + p := new(Error) + *p = x + return p } func (x Error) String() string { - return proto.EnumName(Error_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Error) Descriptor() protoreflect.EnumDescriptor { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[1].Descriptor() +} + +func (Error) Type() protoreflect.EnumType { + return &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[1] +} + +func (x Error) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use Error.Descriptor instead. func (Error) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{1} + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{1} } type ProtoType int32 @@ -98,1023 +139,420 @@ const ( ProtoType_DRPC ProtoType = 0 ) -var ProtoType_name = map[int32]string{ - 0: "DRPC", -} +// Enum value maps for ProtoType. +var ( + ProtoType_name = map[int32]string{ + 0: "DRPC", + } + ProtoType_value = map[string]int32{ + "DRPC": 0, + } +) -var ProtoType_value = map[string]int32{ - "DRPC": 0, +func (x ProtoType) Enum() *ProtoType { + p := new(ProtoType) + *p = x + return p } func (x ProtoType) String() string { - return proto.EnumName(ProtoType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ProtoType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{2} +func (ProtoType) Descriptor() protoreflect.EnumDescriptor { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[2].Descriptor() } -type Credentials struct { - Type CredentialsType `protobuf:"varint,1,opt,name=type,proto3,enum=anyHandshake.CredentialsType" json:"type,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - ClientVersion string `protobuf:"bytes,4,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"` +func (ProtoType) Type() protoreflect.EnumType { + return &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[2] } -func (m *Credentials) Reset() { *m = Credentials{} } -func (m *Credentials) String() string { return proto.CompactTextString(m) } -func (*Credentials) ProtoMessage() {} -func (*Credentials) Descriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{0} +func (x ProtoType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *Credentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Credentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Credentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Credentials) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Credentials) XXX_Merge(src proto.Message) { - xxx_messageInfo_Credentials.Merge(m, src) -} -func (m *Credentials) XXX_Size() int { - return m.Size() -} -func (m *Credentials) XXX_DiscardUnknown() { - xxx_messageInfo_Credentials.DiscardUnknown(m) + +// Deprecated: Use ProtoType.Descriptor instead. +func (ProtoType) EnumDescriptor() ([]byte, []int) { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{2} } -var xxx_messageInfo_Credentials proto.InternalMessageInfo +type Encoding int32 -func (m *Credentials) GetType() CredentialsType { - if m != nil { - return m.Type - } - return CredentialsType_SkipVerify -} +const ( + Encoding_None Encoding = 0 + Encoding_Snappy Encoding = 1 +) -func (m *Credentials) GetPayload() []byte { - if m != nil { - return m.Payload +// Enum value maps for Encoding. +var ( + Encoding_name = map[int32]string{ + 0: "None", + 1: "Snappy", } - return nil -} - -func (m *Credentials) GetVersion() uint32 { - if m != nil { - return m.Version + Encoding_value = map[string]int32{ + "None": 0, + "Snappy": 1, } - return 0 -} +) -func (m *Credentials) GetClientVersion() string { - if m != nil { - return m.ClientVersion - } - return "" +func (x Encoding) Enum() *Encoding { + p := new(Encoding) + *p = x + return p } -type PayloadSignedPeerIds struct { - // account identity - Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - // sign of (localPeerId + remotePeerId) - Sign []byte `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"` +func (x Encoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (m *PayloadSignedPeerIds) Reset() { *m = PayloadSignedPeerIds{} } -func (m *PayloadSignedPeerIds) String() string { return proto.CompactTextString(m) } -func (*PayloadSignedPeerIds) ProtoMessage() {} -func (*PayloadSignedPeerIds) Descriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{1} -} -func (m *PayloadSignedPeerIds) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayloadSignedPeerIds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayloadSignedPeerIds.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PayloadSignedPeerIds) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *PayloadSignedPeerIds) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayloadSignedPeerIds.Merge(m, src) -} -func (m *PayloadSignedPeerIds) XXX_Size() int { - return m.Size() +func (Encoding) Descriptor() protoreflect.EnumDescriptor { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[3].Descriptor() } -func (m *PayloadSignedPeerIds) XXX_DiscardUnknown() { - xxx_messageInfo_PayloadSignedPeerIds.DiscardUnknown(m) -} - -var xxx_messageInfo_PayloadSignedPeerIds proto.InternalMessageInfo -func (m *PayloadSignedPeerIds) GetIdentity() []byte { - if m != nil { - return m.Identity - } - return nil +func (Encoding) Type() protoreflect.EnumType { + return &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes[3] } -func (m *PayloadSignedPeerIds) GetSign() []byte { - if m != nil { - return m.Sign - } - return nil +func (x Encoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -type Ack struct { - Error Error `protobuf:"varint,1,opt,name=error,proto3,enum=anyHandshake.Error" json:"error,omitempty"` +// Deprecated: Use Encoding.Descriptor instead. +func (Encoding) EnumDescriptor() ([]byte, []int) { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{3} } -func (m *Ack) Reset() { *m = Ack{} } -func (m *Ack) String() string { return proto.CompactTextString(m) } -func (*Ack) ProtoMessage() {} -func (*Ack) Descriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{2} -} -func (m *Ack) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ack.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Ack) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Ack) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ack.Merge(m, src) +type Credentials struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type CredentialsType `protobuf:"varint,1,opt,name=type,proto3,enum=anyHandshake.CredentialsType" json:"type,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + ClientVersion string `protobuf:"bytes,4,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Ack) XXX_Size() int { - return m.Size() + +func (x *Credentials) Reset() { + *x = Credentials{} + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Ack) XXX_DiscardUnknown() { - xxx_messageInfo_Ack.DiscardUnknown(m) + +func (x *Credentials) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Ack proto.InternalMessageInfo +func (*Credentials) ProtoMessage() {} -func (m *Ack) GetError() Error { - if m != nil { - return m.Error +func (x *Credentials) ProtoReflect() protoreflect.Message { + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return Error_Null + return mi.MessageOf(x) } -type Proto struct { - Proto ProtoType `protobuf:"varint,1,opt,name=proto,proto3,enum=anyHandshake.ProtoType" json:"proto,omitempty"` +// Deprecated: Use Credentials.ProtoReflect.Descriptor instead. +func (*Credentials) Descriptor() ([]byte, []int) { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{0} } -func (m *Proto) Reset() { *m = Proto{} } -func (m *Proto) String() string { return proto.CompactTextString(m) } -func (*Proto) ProtoMessage() {} -func (*Proto) Descriptor() ([]byte, []int) { - return fileDescriptor_60283fc75f020893, []int{3} -} -func (m *Proto) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proto.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Proto) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *Credentials) GetType() CredentialsType { + if x != nil { + return x.Type } - return b, nil -} -func (m *Proto) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proto.Merge(m, src) -} -func (m *Proto) XXX_Size() int { - return m.Size() -} -func (m *Proto) XXX_DiscardUnknown() { - xxx_messageInfo_Proto.DiscardUnknown(m) + return CredentialsType_SkipVerify } -var xxx_messageInfo_Proto proto.InternalMessageInfo - -func (m *Proto) GetProto() ProtoType { - if m != nil { - return m.Proto +func (x *Credentials) GetPayload() []byte { + if x != nil { + return x.Payload } - return ProtoType_DRPC + return nil } -func init() { - proto.RegisterEnum("anyHandshake.CredentialsType", CredentialsType_name, CredentialsType_value) - proto.RegisterEnum("anyHandshake.Error", Error_name, Error_value) - proto.RegisterEnum("anyHandshake.ProtoType", ProtoType_name, ProtoType_value) - proto.RegisterType((*Credentials)(nil), "anyHandshake.Credentials") - proto.RegisterType((*PayloadSignedPeerIds)(nil), "anyHandshake.PayloadSignedPeerIds") - proto.RegisterType((*Ack)(nil), "anyHandshake.Ack") - proto.RegisterType((*Proto)(nil), "anyHandshake.Proto") +func (x *Credentials) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 } -func init() { - proto.RegisterFile("net/secureservice/handshake/handshakeproto/protos/handshake.proto", fileDescriptor_60283fc75f020893) +func (x *Credentials) GetClientVersion() string { + if x != nil { + return x.ClientVersion + } + return "" } -var fileDescriptor_60283fc75f020893 = []byte{ - // 457 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xf5, 0x36, 0x71, 0x3f, 0x86, 0xa4, 0x6c, 0xb7, 0x29, 0xb5, 0x90, 0xb0, 0xa2, 0x88, 0x43, - 0x88, 0x44, 0xc2, 0x97, 0xb8, 0x87, 0xa6, 0x88, 0x5c, 0xaa, 0xc8, 0x85, 0x1e, 0xb8, 0x6d, 0xbd, - 0x43, 0xbb, 0xca, 0xb2, 0xb6, 0xd6, 0xdb, 0x50, 0xff, 0x0b, 0xce, 0xfc, 0x0a, 0x7e, 0x06, 0xc7, - 0x1e, 0x39, 0xa2, 0xe4, 0x8f, 0x20, 0x6f, 0x9c, 0xc6, 0xe1, 0xc4, 0xc5, 0xde, 0x99, 0xf7, 0x66, - 0xe7, 0xbd, 0x67, 0xc3, 0x50, 0xa3, 0x1d, 0x64, 0x18, 0xdf, 0x18, 0xcc, 0xd0, 0xcc, 0x64, 0x8c, - 0x83, 0x6b, 0xae, 0x45, 0x76, 0xcd, 0xa7, 0x95, 0x53, 0x6a, 0x12, 0x9b, 0x0c, 0xdc, 0x33, 0x5b, - 0x77, 0xfb, 0xae, 0xc1, 0x1a, 0x5c, 0xe7, 0x1f, 0x56, 0xbd, 0xce, 0x0f, 0x02, 0x0f, 0x4e, 0x0c, - 0x0a, 0xd4, 0x56, 0x72, 0x95, 0xb1, 0x97, 0x50, 0xb7, 0x79, 0x8a, 0x01, 0x69, 0x93, 0xee, 0xfe, - 0xab, 0x27, 0xfd, 0x2a, 0xb9, 0x5f, 0x21, 0x7e, 0xcc, 0x53, 0x8c, 0x1c, 0x95, 0x05, 0xb0, 0x93, - 0xf2, 0x5c, 0x25, 0x5c, 0x04, 0x5b, 0x6d, 0xd2, 0x6d, 0x44, 0xab, 0xb2, 0x40, 0x66, 0x68, 0x32, - 0x99, 0xe8, 0xa0, 0xd6, 0x26, 0xdd, 0x66, 0xb4, 0x2a, 0xd9, 0x53, 0x68, 0xc6, 0x4a, 0xa2, 0xb6, - 0x17, 0x25, 0x5e, 0x6f, 0x93, 0xee, 0x5e, 0xb4, 0xd9, 0xec, 0xbc, 0x87, 0xd6, 0x64, 0x79, 0xd5, - 0xb9, 0xbc, 0xd2, 0x28, 0x26, 0x88, 0x66, 0x2c, 0x32, 0xf6, 0x18, 0x76, 0xa5, 0x13, 0x62, 0x73, - 0x27, 0xb4, 0x11, 0xdd, 0xd7, 0x8c, 0x41, 0x3d, 0x93, 0x57, 0xba, 0x94, 0xe2, 0xce, 0x9d, 0x17, - 0x50, 0x1b, 0xc6, 0x53, 0xf6, 0x0c, 0x7c, 0x34, 0x26, 0x31, 0xa5, 0xb9, 0xc3, 0x4d, 0x73, 0xa7, - 0x05, 0x14, 0x2d, 0x19, 0x9d, 0xb7, 0xe0, 0x4f, 0x5c, 0x5a, 0xcf, 0xc1, 0x77, 0xb1, 0x95, 0x33, - 0xc7, 0x9b, 0x33, 0x8e, 0xe3, 0xa2, 0x58, 0xb2, 0x7a, 0x6f, 0xe0, 0xe1, 0x3f, 0x21, 0xb1, 0x7d, - 0x80, 0xf3, 0xa9, 0x4c, 0x2f, 0xd0, 0xc8, 0x2f, 0x39, 0xf5, 0xd8, 0x01, 0x34, 0x37, 0xdc, 0x50, - 0xd2, 0xfb, 0x49, 0xc0, 0x77, 0xeb, 0xd9, 0x2e, 0xd4, 0xcf, 0x6e, 0x94, 0xa2, 0x5e, 0x31, 0xf6, - 0x49, 0xe3, 0x6d, 0x8a, 0xb1, 0x45, 0x41, 0x09, 0x7b, 0x04, 0x6c, 0xac, 0x67, 0x5c, 0x49, 0x51, - 0x59, 0x40, 0xb7, 0xd8, 0x11, 0x1c, 0xac, 0x79, 0x65, 0x5a, 0xb4, 0xc6, 0x02, 0x68, 0xad, 0xb7, - 0x9e, 0x25, 0x76, 0xa8, 0x54, 0xf2, 0x0d, 0x05, 0xad, 0xb3, 0x16, 0xd0, 0x11, 0x72, 0xa1, 0xa4, - 0xc6, 0xd3, 0xdb, 0x18, 0x51, 0xa0, 0xa0, 0x3e, 0x3b, 0x86, 0xc3, 0xb1, 0x8e, 0x93, 0xaf, 0x29, - 0xb7, 0xf2, 0x52, 0x61, 0xf9, 0x05, 0xe8, 0x76, 0x71, 0x7f, 0x15, 0x70, 0x8e, 0xe9, 0x4e, 0xef, - 0x08, 0xf6, 0xee, 0xcd, 0x17, 0xaa, 0x47, 0xd1, 0xe4, 0x84, 0x7a, 0xef, 0x46, 0xbf, 0xe6, 0x21, - 0xb9, 0x9b, 0x87, 0xe4, 0xcf, 0x3c, 0x24, 0xdf, 0x17, 0xa1, 0x77, 0xb7, 0x08, 0xbd, 0xdf, 0x8b, - 0xd0, 0xfb, 0xdc, 0xfb, 0xff, 0x3f, 0xf7, 0x72, 0xdb, 0xbd, 0x5e, 0xff, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0xe2, 0xfa, 0x40, 0x67, 0xee, 0x02, 0x00, 0x00, +type PayloadSignedPeerIds struct { + state protoimpl.MessageState `protogen:"open.v1"` + // account identity + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + // sign of (localPeerId + remotePeerId) + Sign []byte `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Credentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *PayloadSignedPeerIds) Reset() { + *x = PayloadSignedPeerIds{} + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Credentials) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *PayloadSignedPeerIds) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Credentials) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClientVersion) > 0 { - i -= len(m.ClientVersion) - copy(dAtA[i:], m.ClientVersion) - i = encodeVarintHandshake(dAtA, i, uint64(len(m.ClientVersion))) - i-- - dAtA[i] = 0x22 - } - if m.Version != 0 { - i = encodeVarintHandshake(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x18 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintHandshake(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintHandshake(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} +func (*PayloadSignedPeerIds) ProtoMessage() {} -func (m *PayloadSignedPeerIds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *PayloadSignedPeerIds) ProtoReflect() protoreflect.Message { + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *PayloadSignedPeerIds) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use PayloadSignedPeerIds.ProtoReflect.Descriptor instead. +func (*PayloadSignedPeerIds) Descriptor() ([]byte, []int) { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{1} } -func (m *PayloadSignedPeerIds) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sign) > 0 { - i -= len(m.Sign) - copy(dAtA[i:], m.Sign) - i = encodeVarintHandshake(dAtA, i, uint64(len(m.Sign))) - i-- - dAtA[i] = 0x12 +func (x *PayloadSignedPeerIds) GetIdentity() []byte { + if x != nil { + return x.Identity } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintHandshake(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return nil } -func (m *Ack) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *PayloadSignedPeerIds) GetSign() []byte { + if x != nil { + return x.Sign } - return dAtA[:n], nil + return nil } -func (m *Ack) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type Ack struct { + state protoimpl.MessageState `protogen:"open.v1"` + Error Error `protobuf:"varint,1,opt,name=error,proto3,enum=anyHandshake.Error" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != 0 { - i = encodeVarintHandshake(dAtA, i, uint64(m.Error)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +func (x *Ack) Reset() { + *x = Ack{} + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Proto) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *Ack) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Proto) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*Ack) ProtoMessage() {} -func (m *Proto) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proto != 0 { - i = encodeVarintHandshake(dAtA, i, uint64(m.Proto)) - i-- - dAtA[i] = 0x8 +func (x *Ack) ProtoReflect() protoreflect.Message { + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func encodeVarintHandshake(dAtA []byte, offset int, v uint64) int { - offset -= sovHandshake(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Credentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovHandshake(uint64(m.Type)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovHandshake(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovHandshake(uint64(m.Version)) - } - l = len(m.ClientVersion) - if l > 0 { - n += 1 + l + sovHandshake(uint64(l)) - } - return n +// Deprecated: Use Ack.ProtoReflect.Descriptor instead. +func (*Ack) Descriptor() ([]byte, []int) { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{2} } -func (m *PayloadSignedPeerIds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovHandshake(uint64(l)) +func (x *Ack) GetError() Error { + if x != nil { + return x.Error } - l = len(m.Sign) - if l > 0 { - n += 1 + l + sovHandshake(uint64(l)) - } - return n + return Error_Null } -func (m *Ack) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Error != 0 { - n += 1 + sovHandshake(uint64(m.Error)) - } - return n +type Proto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Proto ProtoType `protobuf:"varint,1,opt,name=proto,proto3,enum=anyHandshake.ProtoType" json:"proto,omitempty"` + Encodings []Encoding `protobuf:"varint,2,rep,packed,name=encodings,proto3,enum=anyHandshake.Encoding" json:"encodings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Proto) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proto != 0 { - n += 1 + sovHandshake(uint64(m.Proto)) - } - return n +func (x *Proto) Reset() { + *x = Proto{} + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func sovHandshake(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHandshake(x uint64) (n int) { - return sovHandshake(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func (x *Proto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Credentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Credentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Credentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= CredentialsType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthHandshake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthHandshake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandshake - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandshake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHandshake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHandshake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayloadSignedPeerIds) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayloadSignedPeerIds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayloadSignedPeerIds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthHandshake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthHandshake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) - if m.Identity == nil { - m.Identity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sign", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthHandshake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthHandshake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sign = append(m.Sign[:0], dAtA[iNdEx:postIndex]...) - if m.Sign == nil { - m.Sign = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHandshake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHandshake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy +func (*Proto) ProtoMessage() {} + +func (x *Proto) ProtoReflect() protoreflect.Message { + mi := &file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } + return mi.MessageOf(x) +} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +// Deprecated: Use Proto.ProtoReflect.Descriptor instead. +func (*Proto) Descriptor() ([]byte, []int) { + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP(), []int{3} } -func (m *Ack) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Ack: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - m.Error = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Error |= Error(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHandshake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHandshake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *Proto) GetProto() ProtoType { + if x != nil { + return x.Proto } - return nil + return ProtoType_DRPC } -func (m *Proto) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Proto: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Proto: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType) - } - m.Proto = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandshake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Proto |= ProtoType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHandshake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHandshake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *Proto) GetEncodings() []Encoding { + if x != nil { + return x.Encodings } return nil } -func skipHandshake(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHandshake - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHandshake - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHandshake - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHandshake - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHandshake - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthHandshake - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} + +var File_net_secureservice_handshake_handshakeproto_protos_handshake_proto protoreflect.FileDescriptor + +var file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDesc = string([]byte{ + 0x0a, 0x41, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2f, 0x68, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x6e, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, + 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x61, 0x6e, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x46, + 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, + 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x30, 0x0a, 0x03, 0x41, 0x63, 0x6b, 0x12, 0x29, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x61, + 0x6e, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x6c, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x17, 0x2e, 0x61, 0x6e, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x34, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x6e, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, + 0x6b, 0x65, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2a, 0x34, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x6b, 0x69, + 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x64, 0x73, 0x10, 0x01, 0x2a, 0xb0, 0x01, 0x0a, + 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, + 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x01, + 0x12, 0x16, 0x0a, 0x12, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x6e, 0x65, 0x78, + 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x03, 0x12, + 0x18, 0x0a, 0x14, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4e, 0x6f, 0x74, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x61, + 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x05, 0x12, + 0x17, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x10, 0x07, 0x2a, + 0x15, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0x44, 0x52, 0x50, 0x43, 0x10, 0x00, 0x2a, 0x20, 0x0a, 0x08, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x6e, 0x61, 0x70, 0x70, 0x79, 0x10, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x6e, 0x65, 0x74, 0x2f, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x68, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x2f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, + 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( - ErrInvalidLengthHandshake = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHandshake = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHandshake = fmt.Errorf("proto: unexpected end of group") + file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescOnce sync.Once + file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescData []byte ) + +func file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescGZIP() []byte { + file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescOnce.Do(func() { + file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDesc), len(file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDesc))) + }) + return file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDescData +} + +var file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_goTypes = []any{ + (CredentialsType)(0), // 0: anyHandshake.CredentialsType + (Error)(0), // 1: anyHandshake.Error + (ProtoType)(0), // 2: anyHandshake.ProtoType + (Encoding)(0), // 3: anyHandshake.Encoding + (*Credentials)(nil), // 4: anyHandshake.Credentials + (*PayloadSignedPeerIds)(nil), // 5: anyHandshake.PayloadSignedPeerIds + (*Ack)(nil), // 6: anyHandshake.Ack + (*Proto)(nil), // 7: anyHandshake.Proto +} +var file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_depIdxs = []int32{ + 0, // 0: anyHandshake.Credentials.type:type_name -> anyHandshake.CredentialsType + 1, // 1: anyHandshake.Ack.error:type_name -> anyHandshake.Error + 2, // 2: anyHandshake.Proto.proto:type_name -> anyHandshake.ProtoType + 3, // 3: anyHandshake.Proto.encodings:type_name -> anyHandshake.Encoding + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_init() } +func file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_init() { + if File_net_secureservice_handshake_handshakeproto_protos_handshake_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDesc), len(file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_rawDesc)), + NumEnums: 4, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_goTypes, + DependencyIndexes: file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_depIdxs, + EnumInfos: file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_enumTypes, + MessageInfos: file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_msgTypes, + }.Build() + File_net_secureservice_handshake_handshakeproto_protos_handshake_proto = out.File + file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_goTypes = nil + file_net_secureservice_handshake_handshakeproto_protos_handshake_proto_depIdxs = nil +} diff --git a/net/secureservice/handshake/handshakeproto/handshake_vtproto.pb.go b/net/secureservice/handshake/handshakeproto/handshake_vtproto.pb.go new file mode 100644 index 000000000..0e7fdb146 --- /dev/null +++ b/net/secureservice/handshake/handshakeproto/handshake_vtproto.pb.go @@ -0,0 +1,779 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: net/secureservice/handshake/handshakeproto/protos/handshake.proto + +package handshakeproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Credentials) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Credentials) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Credentials) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClientVersion) > 0 { + i -= len(m.ClientVersion) + copy(dAtA[i:], m.ClientVersion) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClientVersion))) + i-- + dAtA[i] = 0x22 + } + if m.Version != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x18 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PayloadSignedPeerIds) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PayloadSignedPeerIds) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PayloadSignedPeerIds) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Sign) > 0 { + i -= len(m.Sign) + copy(dAtA[i:], m.Sign) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sign))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Ack) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Ack) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Ack) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Error)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Proto) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Proto) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Proto) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Encodings) > 0 { + var pksize2 int + for _, num := range m.Encodings { + pksize2 += protohelpers.SizeOfVarint(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range m.Encodings { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x12 + } + if m.Proto != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Proto)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Credentials) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Version != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Version)) + } + l = len(m.ClientVersion) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *PayloadSignedPeerIds) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Sign) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Ack) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Error)) + } + n += len(m.unknownFields) + return n +} + +func (m *Proto) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proto != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Proto)) + } + if len(m.Encodings) > 0 { + l = 0 + for _, e := range m.Encodings { + l += protohelpers.SizeOfVarint(uint64(e)) + } + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l + } + n += len(m.unknownFields) + return n +} + +func (m *Credentials) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Credentials: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credentials: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= CredentialsType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PayloadSignedPeerIds) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PayloadSignedPeerIds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PayloadSignedPeerIds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sign", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sign = append(m.Sign[:0], dAtA[iNdEx:postIndex]...) + if m.Sign == nil { + m.Sign = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Ack) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ack: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + m.Error = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Error |= Error(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Proto) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Proto: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proto: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType) + } + m.Proto = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Proto |= ProtoType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType == 0 { + var v Encoding + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Encoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Encodings = append(m.Encodings, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Encodings) == 0 { + m.Encodings = make([]Encoding, 0, elementCount) + } + for iNdEx < postIndex { + var v Encoding + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Encoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Encodings = append(m.Encodings, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Encodings", wireType) + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/net/secureservice/handshake/handshakeproto/protos/handshake.proto b/net/secureservice/handshake/handshakeproto/protos/handshake.proto index 87189e245..624a13512 100644 --- a/net/secureservice/handshake/handshakeproto/protos/handshake.proto +++ b/net/secureservice/handshake/handshakeproto/protos/handshake.proto @@ -83,8 +83,14 @@ PROTO HANDSHAKE message Proto { ProtoType proto = 1; + repeated Encoding encodings = 2; } enum ProtoType { DRPC = 0; +} + +enum Encoding { + None = 0; + Snappy = 1; } \ No newline at end of file diff --git a/net/secureservice/handshake/proto.go b/net/secureservice/handshake/proto.go index 6cd821103..e4a703e69 100644 --- a/net/secureservice/handshake/proto.go +++ b/net/secureservice/handshake/proto.go @@ -2,83 +2,96 @@ package handshake import ( "context" - "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" - "golang.org/x/exp/slices" "net" + + "golang.org/x/exp/slices" + + "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" ) type ProtoChecker struct { - AllowedProtoTypes []handshakeproto.ProtoType + AllowedProtoTypes []handshakeproto.ProtoType + SupportedEncodings []handshakeproto.Encoding } -func OutgoingProtoHandshake(ctx context.Context, conn net.Conn, pt handshakeproto.ProtoType) error { +func OutgoingProtoHandshake(ctx context.Context, conn net.Conn, proto *handshakeproto.Proto) (remoteProto *handshakeproto.Proto, err error) { if ctx == nil { ctx = context.Background() } h := newHandshake() done := make(chan struct{}) - var err error go func() { defer close(done) - err = outgoingProtoHandshake(h, conn, pt) + remoteProto, err = outgoingProtoHandshake(h, conn, proto) }() select { case <-done: - return err + return case <-ctx.Done(): _ = conn.Close() - return ctx.Err() + return nil, ctx.Err() } } -func outgoingProtoHandshake(h *handshake, conn net.Conn, pt handshakeproto.ProtoType) (err error) { +var noEncodings = []handshakeproto.Encoding{handshakeproto.Encoding_None} + +func outgoingProtoHandshake(h *handshake, conn net.Conn, proto *handshakeproto.Proto) (remoteProto *handshakeproto.Proto, err error) { defer h.release() h.conn = conn - localProto := &handshakeproto.Proto{ - Proto: pt, - } + localProto := proto if err = h.writeProto(localProto); err != nil { h.tryWriteErrAndClose(err) return } - msg, err := h.readMsg(msgTypeAck) + msg, err := h.readMsg(msgTypeAck, msgTypeProto) if err != nil { h.tryWriteErrAndClose(err) return } - if msg.ack.Error == handshakeproto.Error_IncompatibleProto { - return ErrRemoteIncompatibleProto - } - if msg.ack.Error == handshakeproto.Error_Null { - return nil + // old clients with unsupported encodings will answer ack instead of proto + if msg.ack != nil { + if msg.ack.Error == handshakeproto.Error_IncompatibleProto { + return nil, ErrRemoteIncompatibleProto + } + if msg.ack.Error == handshakeproto.Error_Null { + return &handshakeproto.Proto{ + Proto: proto.Proto, + Encodings: noEncodings, + }, nil + } else { + return nil, HandshakeError{e: msg.ack.Error} + } + } else if msg.proto != nil { + return copyProto(msg.proto), nil + } else { + return nil, ErrUnexpectedPayload } - return HandshakeError{e: msg.ack.Error} } -func IncomingProtoHandshake(ctx context.Context, conn net.Conn, pt ProtoChecker) (handshakeproto.ProtoType, error) { +func IncomingProtoHandshake(ctx context.Context, conn net.Conn, pt ProtoChecker) (*handshakeproto.Proto, error) { if ctx == nil { ctx = context.Background() } h := newHandshake() done := make(chan struct{}) var ( - protoType handshakeproto.ProtoType - err error + proto *handshakeproto.Proto + err error ) go func() { defer close(done) - protoType, err = incomingProtoHandshake(h, conn, pt) + proto, err = incomingProtoHandshake(h, conn, pt) }() select { case <-done: - return protoType, err + return proto, err case <-ctx.Done(): _ = conn.Close() - return 0, ctx.Err() + return nil, ctx.Err() } } -func incomingProtoHandshake(h *handshake, conn net.Conn, pt ProtoChecker) (protoType handshakeproto.ProtoType, err error) { +func incomingProtoHandshake(h *handshake, conn net.Conn, pt ProtoChecker) (proto *handshakeproto.Proto, err error) { defer h.release() h.conn = conn @@ -93,10 +106,46 @@ func incomingProtoHandshake(h *handshake, conn net.Conn, pt ProtoChecker) (proto return } - if err = h.writeAck(handshakeproto.Error_Null); err != nil { - h.tryWriteErrAndClose(err) - return 0, err + // write ack for old clients without encodings support + if len(msg.proto.Encodings) == 0 { + if err = h.writeAck(handshakeproto.Error_Null); err != nil { + h.tryWriteErrAndClose(err) + return + } else { + return copyProto(msg.proto), nil + } } else { - return msg.proto.Proto, nil + enc := chooseEncoding(msg.proto.Encodings, pt.SupportedEncodings) + if err = h.writeProto(&handshakeproto.Proto{ + Proto: pt.AllowedProtoTypes[0], + Encodings: enc, + }); err != nil { + h.tryWriteErrAndClose(err) + return + } else { + return &handshakeproto.Proto{ + Proto: msg.proto.Proto, + Encodings: enc, + }, nil + } + } +} + +func chooseEncoding(remoteEncodings, localEncodings []handshakeproto.Encoding) (encodings []handshakeproto.Encoding) { + for _, rEnc := range remoteEncodings { + if slices.Contains(localEncodings, rEnc) { + encodings = append(encodings, rEnc) + return encodings + } + } + return noEncodings +} + +func copyProto(proto *handshakeproto.Proto) *handshakeproto.Proto { + res := &handshakeproto.Proto{ + Proto: proto.Proto, + Encodings: make([]handshakeproto.Encoding, len(proto.Encodings)), } + copy(res.Encodings, proto.Encodings) + return res } diff --git a/net/secureservice/handshake/proto_test.go b/net/secureservice/handshake/proto_test.go index f689e372a..fd50fd7aa 100644 --- a/net/secureservice/handshake/proto_test.go +++ b/net/secureservice/handshake/proto_test.go @@ -1,16 +1,18 @@ package handshake import ( - "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" ) type protoRes struct { - protoType handshakeproto.ProtoType - err error + proto *handshakeproto.Proto + err error } func newProtoChecker(types ...handshakeproto.ProtoType) ProtoChecker { @@ -21,27 +23,52 @@ func TestIncomingProtoHandshake(t *testing.T) { c1, c2 := newConnPair(t) var protoResCh = make(chan protoRes, 1) go func() { - protoType, err := IncomingProtoHandshake(nil, c1, newProtoChecker(1)) - protoResCh <- protoRes{protoType: protoType, err: err} + proto, err := IncomingProtoHandshake(nil, c1, newProtoChecker(1)) + protoResCh <- protoRes{proto: proto, err: err} }() h := newHandshake() h.conn = c2 // write desired proto - require.NoError(t, h.writeProto(&handshakeproto.Proto{Proto: handshakeproto.ProtoType(1)})) + require.NoError(t, h.writeProto(&handshakeproto.Proto{Proto: 1})) msg, err := h.readMsg(msgTypeAck) require.NoError(t, err) assert.Equal(t, handshakeproto.Error_Null, msg.ack.Error) res := <-protoResCh require.NoError(t, res.err) - assert.Equal(t, handshakeproto.ProtoType(1), res.protoType) + assert.Equal(t, handshakeproto.ProtoType(1), res.proto.Proto) + }) + t.Run("success encoding", func(t *testing.T) { + c1, c2 := newConnPair(t) + var protoResCh = make(chan protoRes, 1) + var encodings = []handshakeproto.Encoding{handshakeproto.Encoding_Snappy, handshakeproto.Encoding_None} + go func() { + pt := newProtoChecker(1) + pt.SupportedEncodings = encodings + proto, err := IncomingProtoHandshake(nil, c1, pt) + protoResCh <- protoRes{proto: proto, err: err} + }() + h := newHandshake() + h.conn = c2 + + // write desired proto + require.NoError(t, h.writeProto(&handshakeproto.Proto{Proto: 1, Encodings: encodings})) + msg, err := h.readMsg(msgTypeProto) + require.NoError(t, err) + assert.Equal(t, handshakeproto.ProtoType(1), msg.proto.Proto) + assert.Equal(t, handshakeproto.Encoding_Snappy, msg.proto.Encodings[0]) + + res := <-protoResCh + require.NoError(t, res.err) + assert.Equal(t, handshakeproto.ProtoType(1), res.proto.Proto) + assert.Equal(t, handshakeproto.Encoding_Snappy, res.proto.Encodings[0]) }) t.Run("incompatible", func(t *testing.T) { c1, c2 := newConnPair(t) var protoResCh = make(chan protoRes, 1) go func() { - protoType, err := IncomingProtoHandshake(nil, c1, newProtoChecker(1)) - protoResCh <- protoRes{protoType: protoType, err: err} + proto, err := IncomingProtoHandshake(nil, c1, newProtoChecker(1)) + protoResCh <- protoRes{proto: proto, err: err} }() h := newHandshake() h.conn = c2 @@ -61,8 +88,8 @@ func TestOutgoingProtoHandshake(t *testing.T) { c1, c2 := newConnPair(t) var protoResCh = make(chan protoRes, 1) go func() { - err := OutgoingProtoHandshake(nil, c1, 1) - protoResCh <- protoRes{err: err} + proto, err := OutgoingProtoHandshake(nil, c1, &handshakeproto.Proto{Proto: 1}) + protoResCh <- protoRes{err: err, proto: proto} }() h := newHandshake() h.conn = c2 @@ -75,12 +102,34 @@ func TestOutgoingProtoHandshake(t *testing.T) { res := <-protoResCh assert.NoError(t, res.err) }) + t.Run("success encoding", func(t *testing.T) { + c1, c2 := newConnPair(t) + var protoResCh = make(chan protoRes, 1) + var encodings = []handshakeproto.Encoding{handshakeproto.Encoding_Snappy, handshakeproto.Encoding_None} + go func() { + proto, err := OutgoingProtoHandshake(nil, c1, &handshakeproto.Proto{Proto: 1, Encodings: encodings}) + protoResCh <- protoRes{err: err, proto: proto} + }() + h := newHandshake() + h.conn = c2 + + msg, err := h.readMsg(msgTypeProto) + require.NoError(t, err) + assert.Equal(t, handshakeproto.ProtoType(1), msg.proto.Proto) + assert.Equal(t, handshakeproto.Encoding_Snappy, msg.proto.Encodings[0]) + require.NoError(t, h.writeProto(msg.proto)) + + res := <-protoResCh + assert.Equal(t, handshakeproto.ProtoType(1), res.proto.Proto) + assert.Equal(t, handshakeproto.Encoding_Snappy, res.proto.Encodings[0]) + assert.NoError(t, res.err) + }) t.Run("incompatible", func(t *testing.T) { c1, c2 := newConnPair(t) var protoResCh = make(chan protoRes, 1) go func() { - err := OutgoingProtoHandshake(nil, c1, 1) - protoResCh <- protoRes{err: err} + proto, err := OutgoingProtoHandshake(nil, c1, &handshakeproto.Proto{Proto: 1}) + protoResCh <- protoRes{err: err, proto: proto} }() h := newHandshake() h.conn = c2 @@ -96,26 +145,59 @@ func TestOutgoingProtoHandshake(t *testing.T) { } func TestEndToEndProto(t *testing.T) { - c1, c2 := newConnPair(t) - var ( - inResCh = make(chan protoRes, 1) - outResCh = make(chan protoRes, 1) - ) - st := time.Now() - go func() { - err := OutgoingProtoHandshake(nil, c1, 0) - outResCh <- protoRes{err: err} - }() - go func() { - protoType, err := IncomingProtoHandshake(nil, c2, newProtoChecker(0, 1)) - inResCh <- protoRes{protoType: protoType, err: err} - }() - - outRes := <-outResCh - assert.NoError(t, outRes.err) - - inRes := <-inResCh - assert.NoError(t, inRes.err) - assert.Equal(t, handshakeproto.ProtoType(0), inRes.protoType) - t.Log("dur", time.Since(st)) + t.Run("no encoding", func(t *testing.T) { + c1, c2 := newConnPair(t) + var ( + inResCh = make(chan protoRes, 1) + outResCh = make(chan protoRes, 1) + ) + st := time.Now() + go func() { + proto, err := OutgoingProtoHandshake(nil, c1, &handshakeproto.Proto{Proto: 0}) + outResCh <- protoRes{err: err, proto: proto} + }() + go func() { + proto, err := IncomingProtoHandshake(nil, c2, newProtoChecker(0, 1)) + inResCh <- protoRes{proto: proto, err: err} + }() + + outRes := <-outResCh + assert.NoError(t, outRes.err) + + inRes := <-inResCh + assert.NoError(t, inRes.err) + assert.Equal(t, handshakeproto.ProtoType(0), inRes.proto.Proto) + t.Log("dur", time.Since(st)) + }) + t.Run("encoding", func(t *testing.T) { + c1, c2 := newConnPair(t) + var ( + inResCh = make(chan protoRes, 1) + outResCh = make(chan protoRes, 1) + encodings = []handshakeproto.Encoding{handshakeproto.Encoding_Snappy, handshakeproto.Encoding_None} + ) + st := time.Now() + go func() { + proto, err := OutgoingProtoHandshake(nil, c1, &handshakeproto.Proto{Proto: 0, Encodings: encodings}) + outResCh <- protoRes{err: err, proto: proto} + }() + go func() { + pt := newProtoChecker(0, 1) + pt.SupportedEncodings = encodings + proto, err := IncomingProtoHandshake(nil, c2, pt) + inResCh <- protoRes{proto: proto, err: err} + }() + + outRes := <-outResCh + assert.NoError(t, outRes.err) + assert.Equal(t, handshakeproto.ProtoType(0), outRes.proto.Proto) + assert.Equal(t, handshakeproto.Encoding_Snappy, outRes.proto.Encodings[0]) + + inRes := <-inResCh + assert.NoError(t, inRes.err) + assert.Equal(t, handshakeproto.ProtoType(0), inRes.proto.Proto) + assert.Equal(t, handshakeproto.Encoding_Snappy, inRes.proto.Encodings[0]) + + t.Log("dur", time.Since(st)) + }) } diff --git a/net/streampool/encoding.go b/net/streampool/encoding.go deleted file mode 100644 index f0f5d8dda..000000000 --- a/net/streampool/encoding.go +++ /dev/null @@ -1,81 +0,0 @@ -package streampool - -import ( - "errors" - - "github.com/anyproto/protobuf/proto" - "storj.io/drpc" -) - -var ( - // EncodingProto drpc.Encoding implementation for gogo protobuf - EncodingProto drpc.Encoding = protoEncoding{} -) - -var ( - errNotAProtoMsg = errors.New("encoding: not a proto message") -) - -type ProtoMessageGettable interface { - ProtoMessage() (proto.Message, error) -} - -type ProtoMessageSettable interface { - ProtoMessageGettable - SetProtoMessage(proto.Message) error -} - -type protoEncoding struct{} - -func (p protoEncoding) Marshal(msg drpc.Message) (res []byte, err error) { - pmsg, ok := msg.(proto.Message) - if !ok { - if pmg, ok := msg.(ProtoMessageGettable); ok { - pmsg, err = pmg.ProtoMessage() - if err != nil { - return nil, err - } - } else { - return nil, errNotAProtoMsg - } - } - return proto.Marshal(pmsg) -} - -func (p protoEncoding) MarshalAppend(buf []byte, msg drpc.Message) (res []byte, err error) { - pmsg, ok := msg.(proto.Message) - if !ok { - if pmg, ok := msg.(ProtoMessageGettable); ok { - pmsg, err = pmg.ProtoMessage() - if err != nil { - return nil, err - } - } else { - return nil, errNotAProtoMsg - } - } - return proto.MarshalAppend(buf, pmsg) -} - -func (p protoEncoding) Unmarshal(buf []byte, msg drpc.Message) (err error) { - var pms ProtoMessageSettable - pmsg, ok := msg.(proto.Message) - if !ok { - if pms, ok = msg.(ProtoMessageSettable); ok { - pmsg, err = pms.ProtoMessage() - if err != nil { - return err - } - } else { - return errNotAProtoMsg - } - } - err = proto.Unmarshal(buf, pmsg) - if err != nil { - return err - } - if pms != nil { - err = pms.SetProtoMessage(pmsg) - } - return -} diff --git a/net/streampool/encoding_test.go b/net/streampool/encoding_test.go deleted file mode 100644 index 694aae174..000000000 --- a/net/streampool/encoding_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package streampool - -import ( - "crypto/rand" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/anyproto/any-sync/net/streampool/testservice" -) - -func TestProtoEncoding(t *testing.T) { - t.Run("not a proto err", func(t *testing.T) { - _, err := EncodingProto.Marshal("string") - assert.Error(t, err) - err = EncodingProto.Unmarshal(nil, "sss") - assert.Error(t, err) - }) - t.Run("encode marshal", func(t *testing.T) { - data, err := EncodingProto.Marshal(&testservice.StreamMessage{ReqData: "1"}) - require.NoError(t, err) - msg := &testservice.StreamMessage{} - require.NoError(t, EncodingProto.Unmarshal(data, msg)) - assert.Equal(t, "1", msg.ReqData) - }) - t.Run("encode marshal append empty buf", func(t *testing.T) { - data, err := EncodingProto.(protoEncoding).MarshalAppend(nil, &testservice.StreamMessage{ReqData: "1"}) - require.NoError(t, err) - msg := &testservice.StreamMessage{} - require.NoError(t, EncodingProto.Unmarshal(data, msg)) - assert.Equal(t, "1", msg.ReqData) - }) - t.Run("encode marshal append non-empty buf", func(t *testing.T) { - buf := make([]byte, 150) - _, err := rand.Read(buf) - require.NoError(t, err) - data, err := EncodingProto.(protoEncoding).MarshalAppend(buf, &testservice.StreamMessage{ReqData: "1"}) - require.NoError(t, err) - msg := &testservice.StreamMessage{} - require.NoError(t, EncodingProto.Unmarshal(data[150:], msg)) - require.Equal(t, buf, data[:150]) - assert.Equal(t, "1", msg.ReqData) - }) -} diff --git a/net/streampool/stream.go b/net/streampool/stream.go index da6ceb5a2..1adf70cd5 100644 --- a/net/streampool/stream.go +++ b/net/streampool/stream.go @@ -50,7 +50,7 @@ func (sr *stream) readLoop() error { sr.l.Debug("stream read started") for { msg := sr.pool.handler.NewReadMessage() - if err := sr.stream.MsgRecv(msg, EncodingProto); err != nil { + if err := sr.stream.MsgRecv(msg, nil); err != nil { sr.l.Info("msg receive error", zap.Error(err)) return err } @@ -72,7 +72,7 @@ func (sr *stream) writeLoop() { } return } - if err := sr.stream.MsgSend(msg, EncodingProto); err != nil { + if err := sr.stream.MsgSend(msg, nil); err != nil { sr.l.Warn("msg send error", zap.Error(err)) sr.streamClose() return diff --git a/net/streampool/streampool_test.go b/net/streampool/streampool_test.go index b0a60f565..f54efffdd 100644 --- a/net/streampool/streampool_test.go +++ b/net/streampool/streampool_test.go @@ -271,7 +271,7 @@ func (t *testHandler) HandleMessage(ctx context.Context, peerId string, msg drpc } func (t *testHandler) DRPCEncoding() drpc.Encoding { - return EncodingProto + return nil } func (t *testHandler) NewReadMessage() drpc.Message { diff --git a/net/streampool/testservice/testservice.pb.go b/net/streampool/testservice/testservice.pb.go index 96128ff23..c8a3ebe78 100644 --- a/net/streampool/testservice/testservice.pb.go +++ b/net/streampool/testservice/testservice.pb.go @@ -1,325 +1,136 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: net/streampool/testservice/protos/testservice.proto package testservice import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type StreamMessage struct { - ReqData string `protobuf:"bytes,1,opt,name=reqData,proto3" json:"reqData,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ReqData string `protobuf:"bytes,1,opt,name=reqData,proto3" json:"reqData,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *StreamMessage) Reset() { *m = StreamMessage{} } -func (m *StreamMessage) String() string { return proto.CompactTextString(m) } -func (*StreamMessage) ProtoMessage() {} -func (*StreamMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_1c28d5a3a78be18f, []int{0} -} -func (m *StreamMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StreamMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StreamMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StreamMessage) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *StreamMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamMessage.Merge(m, src) -} -func (m *StreamMessage) XXX_Size() int { - return m.Size() +func (x *StreamMessage) Reset() { + *x = StreamMessage{} + mi := &file_net_streampool_testservice_protos_testservice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *StreamMessage) XXX_DiscardUnknown() { - xxx_messageInfo_StreamMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_StreamMessage proto.InternalMessageInfo -func (m *StreamMessage) GetReqData() string { - if m != nil { - return m.ReqData - } - return "" +func (x *StreamMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -func init() { - proto.RegisterType((*StreamMessage)(nil), "testService.StreamMessage") -} +func (*StreamMessage) ProtoMessage() {} -func init() { - proto.RegisterFile("net/streampool/testservice/protos/testservice.proto", fileDescriptor_1c28d5a3a78be18f) +func (x *StreamMessage) ProtoReflect() protoreflect.Message { + mi := &file_net_streampool_testservice_protos_testservice_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var fileDescriptor_1c28d5a3a78be18f = []byte{ - // 173 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xce, 0x4b, 0x2d, 0xd1, - 0x2f, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0x2d, 0xc8, 0xcf, 0xcf, 0xd1, 0x2f, 0x49, 0x2d, 0x2e, 0x29, - 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0x46, 0x16, 0xd2, - 0x03, 0x0b, 0x09, 0x71, 0x83, 0x84, 0x82, 0x21, 0x42, 0x4a, 0x9a, 0x5c, 0xbc, 0xc1, 0x60, 0xfd, - 0xbe, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x42, 0x12, 0x5c, 0xec, 0x45, 0xa9, 0x85, 0x2e, 0x89, - 0x25, 0x89, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x51, 0x00, 0x17, 0x4b, 0x48, - 0x6a, 0x71, 0x89, 0x90, 0x07, 0x17, 0x17, 0x88, 0x86, 0x68, 0x13, 0x92, 0xd2, 0x43, 0x32, 0x4e, - 0x0f, 0xc5, 0x2c, 0x29, 0x3c, 0x72, 0x1a, 0x8c, 0x06, 0x8c, 0x4e, 0x26, 0x27, 0x1e, 0xc9, 0x31, - 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, - 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x25, 0x85, 0xdb, 0x63, 0x49, 0x6c, 0x60, 0x6f, 0x18, 0x03, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x59, 0x8d, 0x93, 0xfd, 0x00, 0x00, 0x00, +// Deprecated: Use StreamMessage.ProtoReflect.Descriptor instead. +func (*StreamMessage) Descriptor() ([]byte, []int) { + return file_net_streampool_testservice_protos_testservice_proto_rawDescGZIP(), []int{0} } -func (m *StreamMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *StreamMessage) GetReqData() string { + if x != nil { + return x.ReqData } - return dAtA[:n], nil + return "" } -func (m *StreamMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +var File_net_streampool_testservice_protos_testservice_proto protoreflect.FileDescriptor + +var file_net_streampool_testservice_protos_testservice_proto_rawDesc = string([]byte{ + 0x0a, 0x33, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, + 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x44, 0x61, 0x74, 0x61, 0x32, 0x50, 0x0a, + 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, + 0x1c, 0x5a, 0x1a, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x70, 0x6f, 0x6f, + 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *StreamMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ReqData) > 0 { - i -= len(m.ReqData) - copy(dAtA[i:], m.ReqData) - i = encodeVarintTestservice(dAtA, i, uint64(len(m.ReqData))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +var ( + file_net_streampool_testservice_protos_testservice_proto_rawDescOnce sync.Once + file_net_streampool_testservice_protos_testservice_proto_rawDescData []byte +) -func encodeVarintTestservice(dAtA []byte, offset int, v uint64) int { - offset -= sovTestservice(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StreamMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ReqData) - if l > 0 { - n += 1 + l + sovTestservice(uint64(l)) - } - return n +func file_net_streampool_testservice_protos_testservice_proto_rawDescGZIP() []byte { + file_net_streampool_testservice_protos_testservice_proto_rawDescOnce.Do(func() { + file_net_streampool_testservice_protos_testservice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_net_streampool_testservice_protos_testservice_proto_rawDesc), len(file_net_streampool_testservice_protos_testservice_proto_rawDesc))) + }) + return file_net_streampool_testservice_protos_testservice_proto_rawDescData } -func sovTestservice(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +var file_net_streampool_testservice_protos_testservice_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_net_streampool_testservice_protos_testservice_proto_goTypes = []any{ + (*StreamMessage)(nil), // 0: testService.StreamMessage } -func sozTestservice(x uint64) (n int) { - return sovTestservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +var file_net_streampool_testservice_protos_testservice_proto_depIdxs = []int32{ + 0, // 0: testService.Test.TestStream:input_type -> testService.StreamMessage + 0, // 1: testService.Test.TestStream:output_type -> testService.StreamMessage + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } -func (m *StreamMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTestservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StreamMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StreamMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReqData", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTestservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTestservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTestservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReqData = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTestservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTestservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTestservice(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTestservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTestservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTestservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTestservice - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTestservice - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTestservice - } - if depth == 0 { - return iNdEx, nil - } +func init() { file_net_streampool_testservice_protos_testservice_proto_init() } +func file_net_streampool_testservice_protos_testservice_proto_init() { + if File_net_streampool_testservice_protos_testservice_proto != nil { + return } - return 0, io.ErrUnexpectedEOF + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_net_streampool_testservice_protos_testservice_proto_rawDesc), len(file_net_streampool_testservice_protos_testservice_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_net_streampool_testservice_protos_testservice_proto_goTypes, + DependencyIndexes: file_net_streampool_testservice_protos_testservice_proto_depIdxs, + MessageInfos: file_net_streampool_testservice_protos_testservice_proto_msgTypes, + }.Build() + File_net_streampool_testservice_protos_testservice_proto = out.File + file_net_streampool_testservice_protos_testservice_proto_goTypes = nil + file_net_streampool_testservice_protos_testservice_proto_depIdxs = nil } - -var ( - ErrInvalidLengthTestservice = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTestservice = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTestservice = fmt.Errorf("proto: unexpected end of group") -) diff --git a/net/streampool/testservice/testservice_drpc.pb.go b/net/streampool/testservice/testservice_drpc.pb.go index 84e1feff2..f24b98d5e 100644 --- a/net/streampool/testservice/testservice_drpc.pb.go +++ b/net/streampool/testservice/testservice_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: net/streampool/testservice/protos/testservice.proto package testservice import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_net_streampool_testservice_protos_testservice_proto struct{} func (drpcEncoding_File_net_streampool_testservice_protos_testservice_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_net_streampool_testservice_protos_testservice_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_net_streampool_testservice_protos_testservice_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_net_streampool_testservice_protos_testservice_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCTestClient interface { diff --git a/net/streampool/testservice/testservice_vtproto.pb.go b/net/streampool/testservice/testservice_vtproto.pb.go new file mode 100644 index 000000000..8ba85a590 --- /dev/null +++ b/net/streampool/testservice/testservice_vtproto.pb.go @@ -0,0 +1,157 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: net/streampool/testservice/protos/testservice.proto + +package testservice + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *StreamMessage) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamMessage) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StreamMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ReqData) > 0 { + i -= len(m.ReqData) + copy(dAtA[i:], m.ReqData) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ReqData))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StreamMessage) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ReqData) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StreamMessage) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StreamMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StreamMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReqData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReqData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/net/transport/mock_transport/mock_transport.go b/net/transport/mock_transport/mock_transport.go index f416394fb..8c1be96ae 100644 --- a/net/transport/mock_transport/mock_transport.go +++ b/net/transport/mock_transport/mock_transport.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_transport/mock_transport.go github.com/anyproto/any-sync/net/transport Transport,MultiConn // + // Package mock_transport is a generated GoMock package. package mock_transport @@ -21,6 +22,7 @@ import ( type MockTransport struct { ctrl *gomock.Controller recorder *MockTransportMockRecorder + isgomock struct{} } // MockTransportMockRecorder is the mock recorder for MockTransport. @@ -41,36 +43,37 @@ func (m *MockTransport) EXPECT() *MockTransportMockRecorder { } // Dial mocks base method. -func (m *MockTransport) Dial(arg0 context.Context, arg1 string) (transport.MultiConn, error) { +func (m *MockTransport) Dial(ctx context.Context, addr string) (transport.MultiConn, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Dial", arg0, arg1) + ret := m.ctrl.Call(m, "Dial", ctx, addr) ret0, _ := ret[0].(transport.MultiConn) ret1, _ := ret[1].(error) return ret0, ret1 } // Dial indicates an expected call of Dial. -func (mr *MockTransportMockRecorder) Dial(arg0, arg1 any) *gomock.Call { +func (mr *MockTransportMockRecorder) Dial(ctx, addr any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dial", reflect.TypeOf((*MockTransport)(nil).Dial), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dial", reflect.TypeOf((*MockTransport)(nil).Dial), ctx, addr) } // SetAccepter mocks base method. -func (m *MockTransport) SetAccepter(arg0 transport.Accepter) { +func (m *MockTransport) SetAccepter(accepter transport.Accepter) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetAccepter", arg0) + m.ctrl.Call(m, "SetAccepter", accepter) } // SetAccepter indicates an expected call of SetAccepter. -func (mr *MockTransportMockRecorder) SetAccepter(arg0 any) *gomock.Call { +func (mr *MockTransportMockRecorder) SetAccepter(accepter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccepter", reflect.TypeOf((*MockTransport)(nil).SetAccepter), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccepter", reflect.TypeOf((*MockTransport)(nil).SetAccepter), accepter) } // MockMultiConn is a mock of MultiConn interface. type MockMultiConn struct { ctrl *gomock.Controller recorder *MockMultiConnMockRecorder + isgomock struct{} } // MockMultiConnMockRecorder is the mock recorder for MockMultiConn. @@ -176,16 +179,16 @@ func (mr *MockMultiConnMockRecorder) IsClosed() *gomock.Call { } // Open mocks base method. -func (m *MockMultiConn) Open(arg0 context.Context) (net.Conn, error) { +func (m *MockMultiConn) Open(ctx context.Context) (net.Conn, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Open", arg0) + ret := m.ctrl.Call(m, "Open", ctx) ret0, _ := ret[0].(net.Conn) ret1, _ := ret[1].(error) return ret0, ret1 } // Open indicates an expected call of Open. -func (mr *MockMultiConnMockRecorder) Open(arg0 any) *gomock.Call { +func (mr *MockMultiConnMockRecorder) Open(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockMultiConn)(nil).Open), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockMultiConn)(nil).Open), ctx) } diff --git a/node/nodeclient/mock_nodeclient/mock_nodeclient.go b/node/nodeclient/mock_nodeclient/mock_nodeclient.go index b908059f0..09b033415 100644 --- a/node/nodeclient/mock_nodeclient/mock_nodeclient.go +++ b/node/nodeclient/mock_nodeclient/mock_nodeclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_nodeclient/mock_nodeclient.go github.com/anyproto/any-sync/node/nodeclient NodeClient // + // Package mock_nodeclient is a generated GoMock package. package mock_nodeclient @@ -21,6 +22,7 @@ import ( type MockNodeClient struct { ctrl *gomock.Controller recorder *MockNodeClientMockRecorder + isgomock struct{} } // MockNodeClientMockRecorder is the mock recorder for MockNodeClient. @@ -41,47 +43,47 @@ func (m *MockNodeClient) EXPECT() *MockNodeClientMockRecorder { } // AclAddRecord mocks base method. -func (m *MockNodeClient) AclAddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { +func (m *MockNodeClient) AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclAddRecord", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AclAddRecord", ctx, spaceId, rec) ret0, _ := ret[0].(*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AclAddRecord indicates an expected call of AclAddRecord. -func (mr *MockNodeClientMockRecorder) AclAddRecord(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeClientMockRecorder) AclAddRecord(ctx, spaceId, rec any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockNodeClient)(nil).AclAddRecord), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockNodeClient)(nil).AclAddRecord), ctx, spaceId, rec) } // AclGetRecords mocks base method. -func (m *MockNodeClient) AclGetRecords(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { +func (m *MockNodeClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AclGetRecords", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AclGetRecords", ctx, spaceId, aclHead) ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AclGetRecords indicates an expected call of AclGetRecords. -func (mr *MockNodeClientMockRecorder) AclGetRecords(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNodeClientMockRecorder) AclGetRecords(ctx, spaceId, aclHead any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockNodeClient)(nil).AclGetRecords), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockNodeClient)(nil).AclGetRecords), ctx, spaceId, aclHead) } // Init mocks base method. -func (m *MockNodeClient) Init(arg0 *app.App) error { +func (m *MockNodeClient) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockNodeClientMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockNodeClientMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockNodeClient)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockNodeClient)(nil).Init), a) } // Name mocks base method. diff --git a/node/nodeclient/nodeclient.go b/node/nodeclient/nodeclient.go index 72bdca87c..9831c79b5 100644 --- a/node/nodeclient/nodeclient.go +++ b/node/nodeclient/nodeclient.go @@ -53,7 +53,7 @@ func (c *nodeClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) recs = make([]*consensusproto.RawRecordWithId, len(resp.Records)) for i, rec := range resp.Records { recs[i] = &consensusproto.RawRecordWithId{} - if err = recs[i].Unmarshal(rec); err != nil { + if err = recs[i].UnmarshalVT(rec); err != nil { return err } } @@ -63,7 +63,7 @@ func (c *nodeClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) } func (c *nodeClient) AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (recWithId *consensusproto.RawRecordWithId, err error) { - data, err := rec.Marshal() + data, err := rec.MarshalVT() if err != nil { return } diff --git a/node/nodeclient/nodeclient_test.go b/node/nodeclient/nodeclient_test.go index 408dc4e54..f95a6a1ca 100644 --- a/node/nodeclient/nodeclient_test.go +++ b/node/nodeclient/nodeclient_test.go @@ -51,7 +51,7 @@ func TestNodeClient_AclGetRecords(t *testing.T) { expectedRecs = append(expectedRecs, &consensusproto.RawRecordWithId{ Id: fmt.Sprint(i), }) - marshalled, err := expectedRecs[i].Marshal() + marshalled, err := expectedRecs[i].MarshalVT() require.NoError(t, err) expectedByteRecs = append(expectedByteRecs, marshalled) } @@ -76,7 +76,7 @@ func TestNodeClient_AclAddRecords(t *testing.T) { sendRec := &consensusproto.RawRecord{ AcceptorTimestamp: 10, } - data, err := sendRec.Marshal() + data, err := sendRec.MarshalVT() require.NoError(t, err) expectedRec := &consensusproto.RawRecordWithId{ Id: "recId", diff --git a/nodeconf/mock_nodeconf/mock_nodeconf.go b/nodeconf/mock_nodeconf/mock_nodeconf.go index 2f6b26a46..459f654d0 100644 --- a/nodeconf/mock_nodeconf/mock_nodeconf.go +++ b/nodeconf/mock_nodeconf/mock_nodeconf.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_nodeconf/mock_nodeconf.go github.com/anyproto/any-sync/nodeconf Service // + // Package mock_nodeconf is a generated GoMock package. package mock_nodeconf @@ -22,6 +23,7 @@ import ( type MockService struct { ctrl *gomock.Controller recorder *MockServiceMockRecorder + isgomock struct{} } // MockServiceMockRecorder is the mock recorder for MockService. @@ -56,17 +58,17 @@ func (mr *MockServiceMockRecorder) CHash() *gomock.Call { } // Close mocks base method. -func (m *MockService) Close(arg0 context.Context) error { +func (m *MockService) Close(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0) + ret := m.ctrl.Call(m, "Close", ctx) ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close. -func (mr *MockServiceMockRecorder) Close(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Close(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), ctx) } // Configuration mocks base method. @@ -140,31 +142,31 @@ func (mr *MockServiceMockRecorder) Id() *gomock.Call { } // Init mocks base method. -func (m *MockService) Init(arg0 *app.App) error { +func (m *MockService) Init(a *app.App) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) + ret := m.ctrl.Call(m, "Init", a) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. -func (mr *MockServiceMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockService)(nil).Init), a) } // IsResponsible mocks base method. -func (m *MockService) IsResponsible(arg0 string) bool { +func (m *MockService) IsResponsible(spaceId string) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsResponsible", arg0) + ret := m.ctrl.Call(m, "IsResponsible", spaceId) ret0, _ := ret[0].(bool) return ret0 } // IsResponsible indicates an expected call of IsResponsible. -func (mr *MockServiceMockRecorder) IsResponsible(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) IsResponsible(spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsResponsible", reflect.TypeOf((*MockService)(nil).IsResponsible), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsResponsible", reflect.TypeOf((*MockService)(nil).IsResponsible), spaceId) } // Name mocks base method. @@ -210,45 +212,45 @@ func (mr *MockServiceMockRecorder) NetworkCompatibilityStatus() *gomock.Call { } // NodeIds mocks base method. -func (m *MockService) NodeIds(arg0 string) []string { +func (m *MockService) NodeIds(spaceId string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NodeIds", arg0) + ret := m.ctrl.Call(m, "NodeIds", spaceId) ret0, _ := ret[0].([]string) return ret0 } // NodeIds indicates an expected call of NodeIds. -func (mr *MockServiceMockRecorder) NodeIds(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) NodeIds(spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeIds", reflect.TypeOf((*MockService)(nil).NodeIds), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeIds", reflect.TypeOf((*MockService)(nil).NodeIds), spaceId) } // NodeTypes mocks base method. -func (m *MockService) NodeTypes(arg0 string) []nodeconf.NodeType { +func (m *MockService) NodeTypes(nodeId string) []nodeconf.NodeType { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NodeTypes", arg0) + ret := m.ctrl.Call(m, "NodeTypes", nodeId) ret0, _ := ret[0].([]nodeconf.NodeType) return ret0 } // NodeTypes indicates an expected call of NodeTypes. -func (mr *MockServiceMockRecorder) NodeTypes(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) NodeTypes(nodeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeTypes", reflect.TypeOf((*MockService)(nil).NodeTypes), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeTypes", reflect.TypeOf((*MockService)(nil).NodeTypes), nodeId) } // Partition mocks base method. -func (m *MockService) Partition(arg0 string) int { +func (m *MockService) Partition(spaceId string) int { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Partition", arg0) + ret := m.ctrl.Call(m, "Partition", spaceId) ret0, _ := ret[0].(int) return ret0 } // Partition indicates an expected call of Partition. -func (mr *MockServiceMockRecorder) Partition(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Partition(spaceId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Partition", reflect.TypeOf((*MockService)(nil).Partition), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Partition", reflect.TypeOf((*MockService)(nil).Partition), spaceId) } // PaymentProcessingNodePeers mocks base method. @@ -266,30 +268,30 @@ func (mr *MockServiceMockRecorder) PaymentProcessingNodePeers() *gomock.Call { } // PeerAddresses mocks base method. -func (m *MockService) PeerAddresses(arg0 string) ([]string, bool) { +func (m *MockService) PeerAddresses(peerId string) ([]string, bool) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PeerAddresses", arg0) + ret := m.ctrl.Call(m, "PeerAddresses", peerId) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(bool) return ret0, ret1 } // PeerAddresses indicates an expected call of PeerAddresses. -func (mr *MockServiceMockRecorder) PeerAddresses(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) PeerAddresses(peerId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerAddresses", reflect.TypeOf((*MockService)(nil).PeerAddresses), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerAddresses", reflect.TypeOf((*MockService)(nil).PeerAddresses), peerId) } // Run mocks base method. -func (m *MockService) Run(arg0 context.Context) error { +func (m *MockService) Run(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", arg0) + ret := m.ctrl.Call(m, "Run", ctx) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. -func (mr *MockServiceMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockServiceMockRecorder) Run(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockService)(nil).Run), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockService)(nil).Run), ctx) } diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 82d56ccf6..bc489a9fb 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: paymentservice/paymentserviceproto/protos/paymentservice.proto package paymentserviceproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // TODO: // later we will have an interface to enumerate all available tiers @@ -42,34 +41,55 @@ const ( SubscriptionTier_TierAnytypeTeam SubscriptionTier = 7 ) -var SubscriptionTier_name = map[int32]string{ - 0: "TierUnknown", - 1: "TierExplorer", - 2: "TierBuilder1WeekTEST", - 3: "TierCoCreator1WeekTEST", - 4: "TierBuilder1Year", - 5: "TierCoCreator1Year", - 6: "TierBuilderPlus", - 7: "TierAnytypeTeam", -} +// Enum value maps for SubscriptionTier. +var ( + SubscriptionTier_name = map[int32]string{ + 0: "TierUnknown", + 1: "TierExplorer", + 2: "TierBuilder1WeekTEST", + 3: "TierCoCreator1WeekTEST", + 4: "TierBuilder1Year", + 5: "TierCoCreator1Year", + 6: "TierBuilderPlus", + 7: "TierAnytypeTeam", + } + SubscriptionTier_value = map[string]int32{ + "TierUnknown": 0, + "TierExplorer": 1, + "TierBuilder1WeekTEST": 2, + "TierCoCreator1WeekTEST": 3, + "TierBuilder1Year": 4, + "TierCoCreator1Year": 5, + "TierBuilderPlus": 6, + "TierAnytypeTeam": 7, + } +) -var SubscriptionTier_value = map[string]int32{ - "TierUnknown": 0, - "TierExplorer": 1, - "TierBuilder1WeekTEST": 2, - "TierCoCreator1WeekTEST": 3, - "TierBuilder1Year": 4, - "TierCoCreator1Year": 5, - "TierBuilderPlus": 6, - "TierAnytypeTeam": 7, +func (x SubscriptionTier) Enum() *SubscriptionTier { + p := new(SubscriptionTier) + *p = x + return p } func (x SubscriptionTier) String() string { - return proto.EnumName(SubscriptionTier_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubscriptionTier) Descriptor() protoreflect.EnumDescriptor { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[0].Descriptor() +} + +func (SubscriptionTier) Type() protoreflect.EnumType { + return &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[0] +} + +func (x SubscriptionTier) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use SubscriptionTier.Descriptor instead. func (SubscriptionTier) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{0} + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{0} } type SubscriptionStatus int32 @@ -87,26 +107,47 @@ const ( SubscriptionStatus_StatusPendingRequiresFinalization SubscriptionStatus = 3 ) -var SubscriptionStatus_name = map[int32]string{ - 0: "StatusUnknown", - 1: "StatusPending", - 2: "StatusActive", - 3: "StatusPendingRequiresFinalization", -} +// Enum value maps for SubscriptionStatus. +var ( + SubscriptionStatus_name = map[int32]string{ + 0: "StatusUnknown", + 1: "StatusPending", + 2: "StatusActive", + 3: "StatusPendingRequiresFinalization", + } + SubscriptionStatus_value = map[string]int32{ + "StatusUnknown": 0, + "StatusPending": 1, + "StatusActive": 2, + "StatusPendingRequiresFinalization": 3, + } +) -var SubscriptionStatus_value = map[string]int32{ - "StatusUnknown": 0, - "StatusPending": 1, - "StatusActive": 2, - "StatusPendingRequiresFinalization": 3, +func (x SubscriptionStatus) Enum() *SubscriptionStatus { + p := new(SubscriptionStatus) + *p = x + return p } func (x SubscriptionStatus) String() string { - return proto.EnumName(SubscriptionStatus_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubscriptionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[1].Descriptor() +} + +func (SubscriptionStatus) Type() protoreflect.EnumType { + return &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[1] +} + +func (x SubscriptionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use SubscriptionStatus.Descriptor instead. func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{1} + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{1} } type PaymentMethod int32 @@ -121,32 +162,53 @@ const ( PaymentMethod_MethodNone PaymentMethod = 6 ) -var PaymentMethod_name = map[int32]string{ - 0: "MethodCard", - 1: "MethodCrypto", - 2: "MethodApplePay", - 3: "MethodGooglePay", - 4: "MethodAppleInapp", - 5: "MethodGoogleInapp", - 6: "MethodNone", -} +// Enum value maps for PaymentMethod. +var ( + PaymentMethod_name = map[int32]string{ + 0: "MethodCard", + 1: "MethodCrypto", + 2: "MethodApplePay", + 3: "MethodGooglePay", + 4: "MethodAppleInapp", + 5: "MethodGoogleInapp", + 6: "MethodNone", + } + PaymentMethod_value = map[string]int32{ + "MethodCard": 0, + "MethodCrypto": 1, + "MethodApplePay": 2, + "MethodGooglePay": 3, + "MethodAppleInapp": 4, + "MethodGoogleInapp": 5, + "MethodNone": 6, + } +) -var PaymentMethod_value = map[string]int32{ - "MethodCard": 0, - "MethodCrypto": 1, - "MethodApplePay": 2, - "MethodGooglePay": 3, - "MethodAppleInapp": 4, - "MethodGoogleInapp": 5, - "MethodNone": 6, +func (x PaymentMethod) Enum() *PaymentMethod { + p := new(PaymentMethod) + *p = x + return p } func (x PaymentMethod) String() string { - return proto.EnumName(PaymentMethod_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PaymentMethod) Descriptor() protoreflect.EnumDescriptor { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[2].Descriptor() +} + +func (PaymentMethod) Type() protoreflect.EnumType { + return &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[2] +} + +func (x PaymentMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use PaymentMethod.Descriptor instead. func (PaymentMethod) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{2} + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{2} } type ErrorCodes int32 @@ -176,62 +238,83 @@ const ( ErrorCodes_ErrorOffset ErrorCodes = 600 ) -var ErrorCodes_name = map[int32]string{ - 0: "Unexpected", - 1: "EthAddressEmpty", - 2: "InvalidSignature", - 3: "TierWrong", - 4: "TierNotFound", - 5: "TierInactive", - 6: "PaymentMethodWrong", - 7: "BadAnyName", - 8: "Unknown", - 9: "SubsAlreadyActive", - 10: "SubsNotFound", - 11: "SubsWrongState", - 12: "EmailWrongFormat", - 13: "EmailAlreadyVerified", - 14: "EmailAlreadySent", - 15: "EmailFailedToSend", - 16: "EmailExpired", - 17: "EmailWrongCode", - 18: "AppleInvalidReceipt", - 19: "ApplePurchaseRegistration", - 20: "AppleSubscriptionRenew", - 600: "ErrorOffset", -} - -var ErrorCodes_value = map[string]int32{ - "Unexpected": 0, - "EthAddressEmpty": 1, - "InvalidSignature": 2, - "TierWrong": 3, - "TierNotFound": 4, - "TierInactive": 5, - "PaymentMethodWrong": 6, - "BadAnyName": 7, - "Unknown": 8, - "SubsAlreadyActive": 9, - "SubsNotFound": 10, - "SubsWrongState": 11, - "EmailWrongFormat": 12, - "EmailAlreadyVerified": 13, - "EmailAlreadySent": 14, - "EmailFailedToSend": 15, - "EmailExpired": 16, - "EmailWrongCode": 17, - "AppleInvalidReceipt": 18, - "ApplePurchaseRegistration": 19, - "AppleSubscriptionRenew": 20, - "ErrorOffset": 600, +// Enum value maps for ErrorCodes. +var ( + ErrorCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "EthAddressEmpty", + 2: "InvalidSignature", + 3: "TierWrong", + 4: "TierNotFound", + 5: "TierInactive", + 6: "PaymentMethodWrong", + 7: "BadAnyName", + 8: "Unknown", + 9: "SubsAlreadyActive", + 10: "SubsNotFound", + 11: "SubsWrongState", + 12: "EmailWrongFormat", + 13: "EmailAlreadyVerified", + 14: "EmailAlreadySent", + 15: "EmailFailedToSend", + 16: "EmailExpired", + 17: "EmailWrongCode", + 18: "AppleInvalidReceipt", + 19: "ApplePurchaseRegistration", + 20: "AppleSubscriptionRenew", + 600: "ErrorOffset", + } + ErrorCodes_value = map[string]int32{ + "Unexpected": 0, + "EthAddressEmpty": 1, + "InvalidSignature": 2, + "TierWrong": 3, + "TierNotFound": 4, + "TierInactive": 5, + "PaymentMethodWrong": 6, + "BadAnyName": 7, + "Unknown": 8, + "SubsAlreadyActive": 9, + "SubsNotFound": 10, + "SubsWrongState": 11, + "EmailWrongFormat": 12, + "EmailAlreadyVerified": 13, + "EmailAlreadySent": 14, + "EmailFailedToSend": 15, + "EmailExpired": 16, + "EmailWrongCode": 17, + "AppleInvalidReceipt": 18, + "ApplePurchaseRegistration": 19, + "AppleSubscriptionRenew": 20, + "ErrorOffset": 600, + } +) + +func (x ErrorCodes) Enum() *ErrorCodes { + p := new(ErrorCodes) + *p = x + return p } func (x ErrorCodes) String() string { - return proto.EnumName(ErrorCodes_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCodes) Descriptor() protoreflect.EnumDescriptor { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[3].Descriptor() +} + +func (ErrorCodes) Type() protoreflect.EnumType { + return &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[3] +} + +func (x ErrorCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use ErrorCodes.Descriptor instead. func (ErrorCodes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{3} + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{3} } type IsNameValidResponse_Code int32 @@ -246,151 +329,157 @@ const ( IsNameValidResponse_CanNotReserve IsNameValidResponse_Code = 6 ) -var IsNameValidResponse_Code_name = map[int32]string{ - 0: "Valid", - 1: "NoDotAny", - 2: "TooShort", - 3: "TooLong", - 4: "HasInvalidChars", - 5: "TierFeatureNoName", - 6: "CanNotReserve", -} +// Enum value maps for IsNameValidResponse_Code. +var ( + IsNameValidResponse_Code_name = map[int32]string{ + 0: "Valid", + 1: "NoDotAny", + 2: "TooShort", + 3: "TooLong", + 4: "HasInvalidChars", + 5: "TierFeatureNoName", + 6: "CanNotReserve", + } + IsNameValidResponse_Code_value = map[string]int32{ + "Valid": 0, + "NoDotAny": 1, + "TooShort": 2, + "TooLong": 3, + "HasInvalidChars": 4, + "TierFeatureNoName": 5, + "CanNotReserve": 6, + } +) -var IsNameValidResponse_Code_value = map[string]int32{ - "Valid": 0, - "NoDotAny": 1, - "TooShort": 2, - "TooLong": 3, - "HasInvalidChars": 4, - "TierFeatureNoName": 5, - "CanNotReserve": 6, +func (x IsNameValidResponse_Code) Enum() *IsNameValidResponse_Code { + p := new(IsNameValidResponse_Code) + *p = x + return p } func (x IsNameValidResponse_Code) String() string { - return proto.EnumName(IsNameValidResponse_Code_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IsNameValidResponse_Code) Descriptor() protoreflect.EnumDescriptor { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[4].Descriptor() +} + +func (IsNameValidResponse_Code) Type() protoreflect.EnumType { + return &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes[4] +} + +func (x IsNameValidResponse_Code) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use IsNameValidResponse_Code.Descriptor instead. func (IsNameValidResponse_Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{19, 0} + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{19, 0} } type GetSubscriptionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() - OwnerAnyID string `protobuf:"bytes,1,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` + OwnerAnyID string `protobuf:"bytes,1,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionRequest) Reset() { *m = GetSubscriptionRequest{} } -func (m *GetSubscriptionRequest) String() string { return proto.CompactTextString(m) } -func (*GetSubscriptionRequest) ProtoMessage() {} -func (*GetSubscriptionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{0} -} -func (m *GetSubscriptionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSubscriptionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *GetSubscriptionRequest) Reset() { + *x = GetSubscriptionRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetSubscriptionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSubscriptionRequest.Merge(m, src) -} -func (m *GetSubscriptionRequest) XXX_Size() int { - return m.Size() + +func (x *GetSubscriptionRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetSubscriptionRequest.DiscardUnknown(m) + +func (*GetSubscriptionRequest) ProtoMessage() {} + +func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetSubscriptionRequest proto.InternalMessageInfo +// Deprecated: Use GetSubscriptionRequest.ProtoReflect.Descriptor instead. +func (*GetSubscriptionRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{0} +} -func (m *GetSubscriptionRequest) GetOwnerAnyID() string { - if m != nil { - return m.OwnerAnyID +func (x *GetSubscriptionRequest) GetOwnerAnyID() string { + if x != nil { + return x.OwnerAnyID } return "" } type GetSubscriptionRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // GetSubscriptionRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionRequestSigned) Reset() { *m = GetSubscriptionRequestSigned{} } -func (m *GetSubscriptionRequestSigned) String() string { return proto.CompactTextString(m) } -func (*GetSubscriptionRequestSigned) ProtoMessage() {} -func (*GetSubscriptionRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{1} -} -func (m *GetSubscriptionRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSubscriptionRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetSubscriptionRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetSubscriptionRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSubscriptionRequestSigned.Merge(m, src) +func (x *GetSubscriptionRequestSigned) Reset() { + *x = GetSubscriptionRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionRequestSigned) XXX_Size() int { - return m.Size() + +func (x *GetSubscriptionRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_GetSubscriptionRequestSigned.DiscardUnknown(m) + +func (*GetSubscriptionRequestSigned) ProtoMessage() {} + +func (x *GetSubscriptionRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetSubscriptionRequestSigned proto.InternalMessageInfo +// Deprecated: Use GetSubscriptionRequestSigned.ProtoReflect.Descriptor instead. +func (*GetSubscriptionRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{1} +} -func (m *GetSubscriptionRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *GetSubscriptionRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *GetSubscriptionRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *GetSubscriptionRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type GetSubscriptionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers Tier uint32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"` @@ -402,113 +491,105 @@ type GetSubscriptionResponse struct { // if user verified her email OR provided it while buying a subscription, it will be here UserEmail string `protobuf:"bytes,8,opt,name=userEmail,proto3" json:"userEmail,omitempty"` SubscribeToNewsletter bool `protobuf:"varint,9,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } -func (m *GetSubscriptionResponse) String() string { return proto.CompactTextString(m) } -func (*GetSubscriptionResponse) ProtoMessage() {} -func (*GetSubscriptionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{2} -} -func (m *GetSubscriptionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSubscriptionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetSubscriptionResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *GetSubscriptionResponse) Reset() { + *x = GetSubscriptionResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSubscriptionResponse.Merge(m, src) -} -func (m *GetSubscriptionResponse) XXX_Size() int { - return m.Size() + +func (x *GetSubscriptionResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetSubscriptionResponse.DiscardUnknown(m) + +func (*GetSubscriptionResponse) ProtoMessage() {} + +func (x *GetSubscriptionResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetSubscriptionResponse proto.InternalMessageInfo +// Deprecated: Use GetSubscriptionResponse.ProtoReflect.Descriptor instead. +func (*GetSubscriptionResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{2} +} -func (m *GetSubscriptionResponse) GetTier() uint32 { - if m != nil { - return m.Tier +func (x *GetSubscriptionResponse) GetTier() uint32 { + if x != nil { + return x.Tier } return 0 } -func (m *GetSubscriptionResponse) GetStatus() SubscriptionStatus { - if m != nil { - return m.Status +func (x *GetSubscriptionResponse) GetStatus() SubscriptionStatus { + if x != nil { + return x.Status } return SubscriptionStatus_StatusUnknown } -func (m *GetSubscriptionResponse) GetDateStarted() uint64 { - if m != nil { - return m.DateStarted +func (x *GetSubscriptionResponse) GetDateStarted() uint64 { + if x != nil { + return x.DateStarted } return 0 } -func (m *GetSubscriptionResponse) GetDateEnds() uint64 { - if m != nil { - return m.DateEnds +func (x *GetSubscriptionResponse) GetDateEnds() uint64 { + if x != nil { + return x.DateEnds } return 0 } -func (m *GetSubscriptionResponse) GetIsAutoRenew() bool { - if m != nil { - return m.IsAutoRenew +func (x *GetSubscriptionResponse) GetIsAutoRenew() bool { + if x != nil { + return x.IsAutoRenew } return false } -func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod { - if m != nil { - return m.PaymentMethod +func (x *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod { + if x != nil { + return x.PaymentMethod } return PaymentMethod_MethodCard } -func (m *GetSubscriptionResponse) GetRequestedAnyName() string { - if m != nil { - return m.RequestedAnyName +func (x *GetSubscriptionResponse) GetRequestedAnyName() string { + if x != nil { + return x.RequestedAnyName } return "" } -func (m *GetSubscriptionResponse) GetUserEmail() string { - if m != nil { - return m.UserEmail +func (x *GetSubscriptionResponse) GetUserEmail() string { + if x != nil { + return x.UserEmail } return "" } -func (m *GetSubscriptionResponse) GetSubscribeToNewsletter() bool { - if m != nil { - return m.SubscribeToNewsletter +func (x *GetSubscriptionResponse) GetSubscribeToNewsletter() bool { + if x != nil { + return x.SubscribeToNewsletter } return false } type BuySubscriptionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` @@ -524,218 +605,194 @@ type BuySubscriptionRequest struct { // if non-empty - PP node will register that name on behalf of the user RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` // for some payment methods we need to know the user's email - UserEmail string `protobuf:"bytes,6,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + UserEmail string `protobuf:"bytes,6,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BuySubscriptionRequest) Reset() { *m = BuySubscriptionRequest{} } -func (m *BuySubscriptionRequest) String() string { return proto.CompactTextString(m) } -func (*BuySubscriptionRequest) ProtoMessage() {} -func (*BuySubscriptionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{3} -} -func (m *BuySubscriptionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BuySubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BuySubscriptionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BuySubscriptionRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BuySubscriptionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuySubscriptionRequest.Merge(m, src) +func (x *BuySubscriptionRequest) Reset() { + *x = BuySubscriptionRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BuySubscriptionRequest) XXX_Size() int { - return m.Size() + +func (x *BuySubscriptionRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BuySubscriptionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BuySubscriptionRequest.DiscardUnknown(m) + +func (*BuySubscriptionRequest) ProtoMessage() {} + +func (x *BuySubscriptionRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BuySubscriptionRequest proto.InternalMessageInfo +// Deprecated: Use BuySubscriptionRequest.ProtoReflect.Descriptor instead. +func (*BuySubscriptionRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{3} +} -func (m *BuySubscriptionRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId +func (x *BuySubscriptionRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } return "" } -func (m *BuySubscriptionRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *BuySubscriptionRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *BuySubscriptionRequest) GetRequestedTier() uint32 { - if m != nil { - return m.RequestedTier +func (x *BuySubscriptionRequest) GetRequestedTier() uint32 { + if x != nil { + return x.RequestedTier } return 0 } -func (m *BuySubscriptionRequest) GetPaymentMethod() PaymentMethod { - if m != nil { - return m.PaymentMethod +func (x *BuySubscriptionRequest) GetPaymentMethod() PaymentMethod { + if x != nil { + return x.PaymentMethod } return PaymentMethod_MethodCard } -func (m *BuySubscriptionRequest) GetRequestedAnyName() string { - if m != nil { - return m.RequestedAnyName +func (x *BuySubscriptionRequest) GetRequestedAnyName() string { + if x != nil { + return x.RequestedAnyName } return "" } -func (m *BuySubscriptionRequest) GetUserEmail() string { - if m != nil { - return m.UserEmail +func (x *BuySubscriptionRequest) GetUserEmail() string { + if x != nil { + return x.UserEmail } return "" } type BuySubscriptionRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // BuySubscriptionRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BuySubscriptionRequestSigned) Reset() { *m = BuySubscriptionRequestSigned{} } -func (m *BuySubscriptionRequestSigned) String() string { return proto.CompactTextString(m) } -func (*BuySubscriptionRequestSigned) ProtoMessage() {} -func (*BuySubscriptionRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{4} -} -func (m *BuySubscriptionRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BuySubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BuySubscriptionRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *BuySubscriptionRequestSigned) Reset() { + *x = BuySubscriptionRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BuySubscriptionRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BuySubscriptionRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuySubscriptionRequestSigned.Merge(m, src) -} -func (m *BuySubscriptionRequestSigned) XXX_Size() int { - return m.Size() + +func (x *BuySubscriptionRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BuySubscriptionRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_BuySubscriptionRequestSigned.DiscardUnknown(m) + +func (*BuySubscriptionRequestSigned) ProtoMessage() {} + +func (x *BuySubscriptionRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BuySubscriptionRequestSigned proto.InternalMessageInfo +// Deprecated: Use BuySubscriptionRequestSigned.ProtoReflect.Descriptor instead. +func (*BuySubscriptionRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{4} +} -func (m *BuySubscriptionRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *BuySubscriptionRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *BuySubscriptionRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *BuySubscriptionRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type BuySubscriptionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` // will feature current billing ID // stripe.com/?client_reference_id=1234 PaymentUrl string `protobuf:"bytes,1,opt,name=paymentUrl,proto3" json:"paymentUrl,omitempty"` // billingID is passed via mobile client to payment platform - BillingID string `protobuf:"bytes,2,opt,name=billingID,proto3" json:"billingID,omitempty"` + BillingID string `protobuf:"bytes,2,opt,name=billingID,proto3" json:"billingID,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BuySubscriptionResponse) Reset() { *m = BuySubscriptionResponse{} } -func (m *BuySubscriptionResponse) String() string { return proto.CompactTextString(m) } -func (*BuySubscriptionResponse) ProtoMessage() {} -func (*BuySubscriptionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{5} -} -func (m *BuySubscriptionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BuySubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BuySubscriptionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BuySubscriptionResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *BuySubscriptionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BuySubscriptionResponse.Merge(m, src) +func (x *BuySubscriptionResponse) Reset() { + *x = BuySubscriptionResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BuySubscriptionResponse) XXX_Size() int { - return m.Size() + +func (x *BuySubscriptionResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BuySubscriptionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BuySubscriptionResponse.DiscardUnknown(m) + +func (*BuySubscriptionResponse) ProtoMessage() {} + +func (x *BuySubscriptionResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BuySubscriptionResponse proto.InternalMessageInfo +// Deprecated: Use BuySubscriptionResponse.ProtoReflect.Descriptor instead. +func (*BuySubscriptionResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{5} +} -func (m *BuySubscriptionResponse) GetPaymentUrl() string { - if m != nil { - return m.PaymentUrl +func (x *BuySubscriptionResponse) GetPaymentUrl() string { + if x != nil { + return x.PaymentUrl } return "" } -func (m *BuySubscriptionResponse) GetBillingID() string { - if m != nil { - return m.BillingID +func (x *BuySubscriptionResponse) GetBillingID() string { + if x != nil { + return x.BillingID } return "" } type FinalizeSubscriptionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` @@ -746,347 +803,297 @@ type FinalizeSubscriptionRequest struct { OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // if empty - then no name requested RequestedAnyName string `protobuf:"bytes,3,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FinalizeSubscriptionRequest) Reset() { *m = FinalizeSubscriptionRequest{} } -func (m *FinalizeSubscriptionRequest) String() string { return proto.CompactTextString(m) } -func (*FinalizeSubscriptionRequest) ProtoMessage() {} -func (*FinalizeSubscriptionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{6} -} -func (m *FinalizeSubscriptionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FinalizeSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FinalizeSubscriptionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FinalizeSubscriptionRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *FinalizeSubscriptionRequest) Reset() { + *x = FinalizeSubscriptionRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FinalizeSubscriptionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FinalizeSubscriptionRequest.Merge(m, src) -} -func (m *FinalizeSubscriptionRequest) XXX_Size() int { - return m.Size() + +func (x *FinalizeSubscriptionRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FinalizeSubscriptionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FinalizeSubscriptionRequest.DiscardUnknown(m) + +func (*FinalizeSubscriptionRequest) ProtoMessage() {} + +func (x *FinalizeSubscriptionRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_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) } -var xxx_messageInfo_FinalizeSubscriptionRequest proto.InternalMessageInfo +// Deprecated: Use FinalizeSubscriptionRequest.ProtoReflect.Descriptor instead. +func (*FinalizeSubscriptionRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{6} +} -func (m *FinalizeSubscriptionRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId +func (x *FinalizeSubscriptionRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } return "" } -func (m *FinalizeSubscriptionRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress +func (x *FinalizeSubscriptionRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } return "" } -func (m *FinalizeSubscriptionRequest) GetRequestedAnyName() string { - if m != nil { - return m.RequestedAnyName +func (x *FinalizeSubscriptionRequest) GetRequestedAnyName() string { + if x != nil { + return x.RequestedAnyName } return "" } type FinalizeSubscriptionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FinalizeSubscriptionResponse) Reset() { *m = FinalizeSubscriptionResponse{} } -func (m *FinalizeSubscriptionResponse) String() string { return proto.CompactTextString(m) } -func (*FinalizeSubscriptionResponse) ProtoMessage() {} -func (*FinalizeSubscriptionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{7} -} -func (m *FinalizeSubscriptionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FinalizeSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FinalizeSubscriptionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FinalizeSubscriptionResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *FinalizeSubscriptionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FinalizeSubscriptionResponse.Merge(m, src) +func (x *FinalizeSubscriptionResponse) Reset() { + *x = FinalizeSubscriptionResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FinalizeSubscriptionResponse) XXX_Size() int { - return m.Size() + +func (x *FinalizeSubscriptionResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FinalizeSubscriptionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FinalizeSubscriptionResponse.DiscardUnknown(m) + +func (*FinalizeSubscriptionResponse) ProtoMessage() {} + +func (x *FinalizeSubscriptionResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FinalizeSubscriptionResponse proto.InternalMessageInfo +// Deprecated: Use FinalizeSubscriptionResponse.ProtoReflect.Descriptor instead. +func (*FinalizeSubscriptionResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{7} +} type FinalizeSubscriptionRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // VerifyEmailRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *FinalizeSubscriptionRequestSigned) Reset() { *m = FinalizeSubscriptionRequestSigned{} } -func (m *FinalizeSubscriptionRequestSigned) String() string { return proto.CompactTextString(m) } -func (*FinalizeSubscriptionRequestSigned) ProtoMessage() {} -func (*FinalizeSubscriptionRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{8} -} -func (m *FinalizeSubscriptionRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FinalizeSubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FinalizeSubscriptionRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *FinalizeSubscriptionRequestSigned) Reset() { + *x = FinalizeSubscriptionRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *FinalizeSubscriptionRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *FinalizeSubscriptionRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_FinalizeSubscriptionRequestSigned.Merge(m, src) -} -func (m *FinalizeSubscriptionRequestSigned) XXX_Size() int { - return m.Size() + +func (x *FinalizeSubscriptionRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FinalizeSubscriptionRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_FinalizeSubscriptionRequestSigned.DiscardUnknown(m) + +func (*FinalizeSubscriptionRequestSigned) ProtoMessage() {} + +func (x *FinalizeSubscriptionRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FinalizeSubscriptionRequestSigned proto.InternalMessageInfo +// Deprecated: Use FinalizeSubscriptionRequestSigned.ProtoReflect.Descriptor instead. +func (*FinalizeSubscriptionRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{8} +} -func (m *FinalizeSubscriptionRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *FinalizeSubscriptionRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *FinalizeSubscriptionRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *FinalizeSubscriptionRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type GetSubscriptionPortalLinkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() - OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionPortalLinkRequest) Reset() { *m = GetSubscriptionPortalLinkRequest{} } -func (m *GetSubscriptionPortalLinkRequest) String() string { return proto.CompactTextString(m) } -func (*GetSubscriptionPortalLinkRequest) ProtoMessage() {} -func (*GetSubscriptionPortalLinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{9} -} -func (m *GetSubscriptionPortalLinkRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSubscriptionPortalLinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSubscriptionPortalLinkRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetSubscriptionPortalLinkRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *GetSubscriptionPortalLinkRequest) Reset() { + *x = GetSubscriptionPortalLinkRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionPortalLinkRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSubscriptionPortalLinkRequest.Merge(m, src) -} -func (m *GetSubscriptionPortalLinkRequest) XXX_Size() int { - return m.Size() + +func (x *GetSubscriptionPortalLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionPortalLinkRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetSubscriptionPortalLinkRequest.DiscardUnknown(m) + +func (*GetSubscriptionPortalLinkRequest) ProtoMessage() {} + +func (x *GetSubscriptionPortalLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetSubscriptionPortalLinkRequest proto.InternalMessageInfo +// Deprecated: Use GetSubscriptionPortalLinkRequest.ProtoReflect.Descriptor instead. +func (*GetSubscriptionPortalLinkRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{9} +} -func (m *GetSubscriptionPortalLinkRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId +func (x *GetSubscriptionPortalLinkRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } return "" } type GetSubscriptionPortalLinkRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // GetSubscriptionPortalLinkRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionPortalLinkRequestSigned) Reset() { - *m = GetSubscriptionPortalLinkRequestSigned{} +func (x *GetSubscriptionPortalLinkRequestSigned) Reset() { + *x = GetSubscriptionPortalLinkRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionPortalLinkRequestSigned) String() string { return proto.CompactTextString(m) } -func (*GetSubscriptionPortalLinkRequestSigned) ProtoMessage() {} -func (*GetSubscriptionPortalLinkRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{10} -} -func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + +func (x *GetSubscriptionPortalLinkRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionPortalLinkRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*GetSubscriptionPortalLinkRequestSigned) ProtoMessage() {} + +func (x *GetSubscriptionPortalLinkRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return b, nil -} -func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.Merge(m, src) -} -func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Size() int { - return m.Size() -} -func (m *GetSubscriptionPortalLinkRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned proto.InternalMessageInfo +// Deprecated: Use GetSubscriptionPortalLinkRequestSigned.ProtoReflect.Descriptor instead. +func (*GetSubscriptionPortalLinkRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{10} +} -func (m *GetSubscriptionPortalLinkRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *GetSubscriptionPortalLinkRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *GetSubscriptionPortalLinkRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *GetSubscriptionPortalLinkRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type GetSubscriptionPortalLinkResponse struct { - PortalUrl string `protobuf:"bytes,1,opt,name=portalUrl,proto3" json:"portalUrl,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + PortalUrl string `protobuf:"bytes,1,opt,name=portalUrl,proto3" json:"portalUrl,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionPortalLinkResponse) Reset() { *m = GetSubscriptionPortalLinkResponse{} } -func (m *GetSubscriptionPortalLinkResponse) String() string { return proto.CompactTextString(m) } -func (*GetSubscriptionPortalLinkResponse) ProtoMessage() {} -func (*GetSubscriptionPortalLinkResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{11} -} -func (m *GetSubscriptionPortalLinkResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSubscriptionPortalLinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSubscriptionPortalLinkResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetSubscriptionPortalLinkResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetSubscriptionPortalLinkResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSubscriptionPortalLinkResponse.Merge(m, src) +func (x *GetSubscriptionPortalLinkResponse) Reset() { + *x = GetSubscriptionPortalLinkResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionPortalLinkResponse) XXX_Size() int { - return m.Size() + +func (x *GetSubscriptionPortalLinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionPortalLinkResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetSubscriptionPortalLinkResponse.DiscardUnknown(m) + +func (*GetSubscriptionPortalLinkResponse) ProtoMessage() {} + +func (x *GetSubscriptionPortalLinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetSubscriptionPortalLinkResponse proto.InternalMessageInfo +// Deprecated: Use GetSubscriptionPortalLinkResponse.ProtoReflect.Descriptor instead. +func (*GetSubscriptionPortalLinkResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{11} +} -func (m *GetSubscriptionPortalLinkResponse) GetPortalUrl() string { - if m != nil { - return m.PortalUrl +func (x *GetSubscriptionPortalLinkResponse) GetPortalUrl() string { + if x != nil { + return x.PortalUrl } return "" } type GetVerificationEmailRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` @@ -1095,191 +1102,167 @@ type GetVerificationEmailRequest struct { InsiderTipsAndTutorials bool `protobuf:"varint,4,opt,name=insiderTipsAndTutorials,proto3" json:"insiderTipsAndTutorials,omitempty"` // if we are coming from the onboarding screen IsOnboardingList bool `protobuf:"varint,5,opt,name=isOnboardingList,proto3" json:"isOnboardingList,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetVerificationEmailRequest) Reset() { *m = GetVerificationEmailRequest{} } -func (m *GetVerificationEmailRequest) String() string { return proto.CompactTextString(m) } -func (*GetVerificationEmailRequest) ProtoMessage() {} -func (*GetVerificationEmailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{12} -} -func (m *GetVerificationEmailRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetVerificationEmailRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetVerificationEmailRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x *GetVerificationEmailRequest) Reset() { + *x = GetVerificationEmailRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetVerificationEmailRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetVerificationEmailRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVerificationEmailRequest.Merge(m, src) -} -func (m *GetVerificationEmailRequest) XXX_Size() int { - return m.Size() + +func (x *GetVerificationEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetVerificationEmailRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetVerificationEmailRequest.DiscardUnknown(m) + +func (*GetVerificationEmailRequest) ProtoMessage() {} + +func (x *GetVerificationEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetVerificationEmailRequest proto.InternalMessageInfo +// Deprecated: Use GetVerificationEmailRequest.ProtoReflect.Descriptor instead. +func (*GetVerificationEmailRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{12} +} -func (m *GetVerificationEmailRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId +func (x *GetVerificationEmailRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } return "" } -func (m *GetVerificationEmailRequest) GetEmail() string { - if m != nil { - return m.Email +func (x *GetVerificationEmailRequest) GetEmail() string { + if x != nil { + return x.Email } return "" } -func (m *GetVerificationEmailRequest) GetSubscribeToNewsletter() bool { - if m != nil { - return m.SubscribeToNewsletter +func (x *GetVerificationEmailRequest) GetSubscribeToNewsletter() bool { + if x != nil { + return x.SubscribeToNewsletter } return false } -func (m *GetVerificationEmailRequest) GetInsiderTipsAndTutorials() bool { - if m != nil { - return m.InsiderTipsAndTutorials +func (x *GetVerificationEmailRequest) GetInsiderTipsAndTutorials() bool { + if x != nil { + return x.InsiderTipsAndTutorials } return false } -func (m *GetVerificationEmailRequest) GetIsOnboardingList() bool { - if m != nil { - return m.IsOnboardingList +func (x *GetVerificationEmailRequest) GetIsOnboardingList() bool { + if x != nil { + return x.IsOnboardingList } return false } type GetVerificationEmailResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetVerificationEmailResponse) Reset() { *m = GetVerificationEmailResponse{} } -func (m *GetVerificationEmailResponse) String() string { return proto.CompactTextString(m) } -func (*GetVerificationEmailResponse) ProtoMessage() {} -func (*GetVerificationEmailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{13} -} -func (m *GetVerificationEmailResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetVerificationEmailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetVerificationEmailResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetVerificationEmailResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetVerificationEmailResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVerificationEmailResponse.Merge(m, src) +func (x *GetVerificationEmailResponse) Reset() { + *x = GetVerificationEmailResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetVerificationEmailResponse) XXX_Size() int { - return m.Size() + +func (x *GetVerificationEmailResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetVerificationEmailResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetVerificationEmailResponse.DiscardUnknown(m) + +func (*GetVerificationEmailResponse) ProtoMessage() {} + +func (x *GetVerificationEmailResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetVerificationEmailResponse proto.InternalMessageInfo +// Deprecated: Use GetVerificationEmailResponse.ProtoReflect.Descriptor instead. +func (*GetVerificationEmailResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{13} +} type GetVerificationEmailRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // GetVerificationEmailRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetVerificationEmailRequestSigned) Reset() { *m = GetVerificationEmailRequestSigned{} } -func (m *GetVerificationEmailRequestSigned) String() string { return proto.CompactTextString(m) } -func (*GetVerificationEmailRequestSigned) ProtoMessage() {} -func (*GetVerificationEmailRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{14} -} -func (m *GetVerificationEmailRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetVerificationEmailRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetVerificationEmailRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetVerificationEmailRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil +func (x *GetVerificationEmailRequestSigned) Reset() { + *x = GetVerificationEmailRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetVerificationEmailRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVerificationEmailRequestSigned.Merge(m, src) -} -func (m *GetVerificationEmailRequestSigned) XXX_Size() int { - return m.Size() + +func (x *GetVerificationEmailRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetVerificationEmailRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_GetVerificationEmailRequestSigned.DiscardUnknown(m) + +func (*GetVerificationEmailRequestSigned) ProtoMessage() {} + +func (x *GetVerificationEmailRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetVerificationEmailRequestSigned proto.InternalMessageInfo +// Deprecated: Use GetVerificationEmailRequestSigned.ProtoReflect.Descriptor instead. +func (*GetVerificationEmailRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{14} +} -func (m *GetVerificationEmailRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *GetVerificationEmailRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *GetVerificationEmailRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *GetVerificationEmailRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type VerifyEmailRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` @@ -1289,4653 +1272,795 @@ type VerifyEmailRequest struct { // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // code received in the email - Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *VerifyEmailRequest) Reset() { *m = VerifyEmailRequest{} } -func (m *VerifyEmailRequest) String() string { return proto.CompactTextString(m) } -func (*VerifyEmailRequest) ProtoMessage() {} -func (*VerifyEmailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{15} -} -func (m *VerifyEmailRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifyEmailRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifyEmailRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VerifyEmailRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *VerifyEmailRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyEmailRequest.Merge(m, src) +func (x *VerifyEmailRequest) Reset() { + *x = VerifyEmailRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *VerifyEmailRequest) XXX_Size() int { - return m.Size() -} -func (m *VerifyEmailRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyEmailRequest.DiscardUnknown(m) + +func (x *VerifyEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_VerifyEmailRequest proto.InternalMessageInfo +func (*VerifyEmailRequest) ProtoMessage() {} -func (m *VerifyEmailRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId - } - return "" -} - -func (m *VerifyEmailRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress - } - return "" -} - -func (m *VerifyEmailRequest) GetCode() string { - if m != nil { - return m.Code - } - return "" -} - -type VerifyEmailResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *VerifyEmailResponse) Reset() { *m = VerifyEmailResponse{} } -func (m *VerifyEmailResponse) String() string { return proto.CompactTextString(m) } -func (*VerifyEmailResponse) ProtoMessage() {} -func (*VerifyEmailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{16} -} -func (m *VerifyEmailResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifyEmailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifyEmailResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VerifyEmailResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *VerifyEmailResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyEmailResponse.Merge(m, src) -} -func (m *VerifyEmailResponse) XXX_Size() int { - return m.Size() -} -func (m *VerifyEmailResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyEmailResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifyEmailResponse proto.InternalMessageInfo - -func (m *VerifyEmailResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -type VerifyEmailRequestSigned struct { - // VerifyEmailRequest - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *VerifyEmailRequestSigned) Reset() { *m = VerifyEmailRequestSigned{} } -func (m *VerifyEmailRequestSigned) String() string { return proto.CompactTextString(m) } -func (*VerifyEmailRequestSigned) ProtoMessage() {} -func (*VerifyEmailRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{17} -} -func (m *VerifyEmailRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifyEmailRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifyEmailRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *VerifyEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *VerifyEmailRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *VerifyEmailRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyEmailRequestSigned.Merge(m, src) -} -func (m *VerifyEmailRequestSigned) XXX_Size() int { - return m.Size() -} -func (m *VerifyEmailRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyEmailRequestSigned.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifyEmailRequestSigned proto.InternalMessageInfo - -func (m *VerifyEmailRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (m *VerifyEmailRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature + return ms } - return nil + return mi.MessageOf(x) } -type IsNameValidRequest struct { - RequestedTier uint32 `protobuf:"varint,1,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` - RequestedAnyName string `protobuf:"bytes,2,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` +// Deprecated: Use VerifyEmailRequest.ProtoReflect.Descriptor instead. +func (*VerifyEmailRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{15} } -func (m *IsNameValidRequest) Reset() { *m = IsNameValidRequest{} } -func (m *IsNameValidRequest) String() string { return proto.CompactTextString(m) } -func (*IsNameValidRequest) ProtoMessage() {} -func (*IsNameValidRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{18} -} -func (m *IsNameValidRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IsNameValidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IsNameValidRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IsNameValidRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *VerifyEmailRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } - return b, nil -} -func (m *IsNameValidRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsNameValidRequest.Merge(m, src) -} -func (m *IsNameValidRequest) XXX_Size() int { - return m.Size() -} -func (m *IsNameValidRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IsNameValidRequest.DiscardUnknown(m) + return "" } -var xxx_messageInfo_IsNameValidRequest proto.InternalMessageInfo - -func (m *IsNameValidRequest) GetRequestedTier() uint32 { - if m != nil { - return m.RequestedTier +func (x *VerifyEmailRequest) GetOwnerEthAddress() string { + if x != nil { + return x.OwnerEthAddress } - return 0 + return "" } -func (m *IsNameValidRequest) GetRequestedAnyName() string { - if m != nil { - return m.RequestedAnyName +func (x *VerifyEmailRequest) GetCode() string { + if x != nil { + return x.Code } return "" } -type IsNameValidResponse struct { - Code IsNameValidResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=IsNameValidResponse_Code" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *IsNameValidResponse) Reset() { *m = IsNameValidResponse{} } -func (m *IsNameValidResponse) String() string { return proto.CompactTextString(m) } -func (*IsNameValidResponse) ProtoMessage() {} -func (*IsNameValidResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{19} -} -func (m *IsNameValidResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IsNameValidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IsNameValidResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IsNameValidResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *IsNameValidResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsNameValidResponse.Merge(m, src) -} -func (m *IsNameValidResponse) XXX_Size() int { - return m.Size() -} -func (m *IsNameValidResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IsNameValidResponse.DiscardUnknown(m) +type VerifyEmailResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -var xxx_messageInfo_IsNameValidResponse proto.InternalMessageInfo - -func (m *IsNameValidResponse) GetCode() IsNameValidResponse_Code { - if m != nil { - return m.Code - } - return IsNameValidResponse_Valid +func (x *VerifyEmailResponse) Reset() { + *x = VerifyEmailResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *IsNameValidResponse) GetDescription() string { - if m != nil { - return m.Description - } - return "" +func (x *VerifyEmailResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -type VerifyAppStoreReceiptRequest struct { - // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" - // you can get it with Account().SignKey.GetPublic().Account() - OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` - // receipt is a JWT-encoded information about subscription purchase - Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` -} +func (*VerifyEmailResponse) ProtoMessage() {} -func (m *VerifyAppStoreReceiptRequest) Reset() { *m = VerifyAppStoreReceiptRequest{} } -func (m *VerifyAppStoreReceiptRequest) String() string { return proto.CompactTextString(m) } -func (*VerifyAppStoreReceiptRequest) ProtoMessage() {} -func (*VerifyAppStoreReceiptRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{20} -} -func (m *VerifyAppStoreReceiptRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifyAppStoreReceiptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifyAppStoreReceiptRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *VerifyEmailResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *VerifyAppStoreReceiptRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *VerifyAppStoreReceiptRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyAppStoreReceiptRequest.Merge(m, src) -} -func (m *VerifyAppStoreReceiptRequest) XXX_Size() int { - return m.Size() -} -func (m *VerifyAppStoreReceiptRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyAppStoreReceiptRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifyAppStoreReceiptRequest proto.InternalMessageInfo -func (m *VerifyAppStoreReceiptRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId - } - return "" +// Deprecated: Use VerifyEmailResponse.ProtoReflect.Descriptor instead. +func (*VerifyEmailResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{16} } -func (m *VerifyAppStoreReceiptRequest) GetReceipt() string { - if m != nil { - return m.Receipt +func (x *VerifyEmailResponse) GetSuccess() bool { + if x != nil { + return x.Success } - return "" + return false } -type VerifyAppStoreReceiptRequestSigned struct { - // VerifyAppStoreReceiptRequest +type VerifyEmailRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` + // VerifyEmailRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *VerifyAppStoreReceiptRequestSigned) Reset() { *m = VerifyAppStoreReceiptRequestSigned{} } -func (m *VerifyAppStoreReceiptRequestSigned) String() string { return proto.CompactTextString(m) } -func (*VerifyAppStoreReceiptRequestSigned) ProtoMessage() {} -func (*VerifyAppStoreReceiptRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{21} -} -func (m *VerifyAppStoreReceiptRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifyAppStoreReceiptRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifyAppStoreReceiptRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VerifyAppStoreReceiptRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *VerifyAppStoreReceiptRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyAppStoreReceiptRequestSigned.Merge(m, src) -} -func (m *VerifyAppStoreReceiptRequestSigned) XXX_Size() int { - return m.Size() + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *VerifyAppStoreReceiptRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyAppStoreReceiptRequestSigned.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifyAppStoreReceiptRequestSigned proto.InternalMessageInfo -func (m *VerifyAppStoreReceiptRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil +func (x *VerifyEmailRequestSigned) Reset() { + *x = VerifyEmailRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *VerifyAppStoreReceiptRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil +func (x *VerifyEmailRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -type VerifyAppStoreReceiptResponse struct { -} +func (*VerifyEmailRequestSigned) ProtoMessage() {} -func (m *VerifyAppStoreReceiptResponse) Reset() { *m = VerifyAppStoreReceiptResponse{} } -func (m *VerifyAppStoreReceiptResponse) String() string { return proto.CompactTextString(m) } -func (*VerifyAppStoreReceiptResponse) ProtoMessage() {} -func (*VerifyAppStoreReceiptResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{22} -} -func (m *VerifyAppStoreReceiptResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifyAppStoreReceiptResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifyAppStoreReceiptResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *VerifyEmailRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *VerifyAppStoreReceiptResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *VerifyAppStoreReceiptResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyAppStoreReceiptResponse.Merge(m, src) -} -func (m *VerifyAppStoreReceiptResponse) XXX_Size() int { - return m.Size() -} -func (m *VerifyAppStoreReceiptResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyAppStoreReceiptResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifyAppStoreReceiptResponse proto.InternalMessageInfo - -func init() { - proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) - proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) - proto.RegisterEnum("PaymentMethod", PaymentMethod_name, PaymentMethod_value) - proto.RegisterEnum("ErrorCodes", ErrorCodes_name, ErrorCodes_value) - proto.RegisterEnum("IsNameValidResponse_Code", IsNameValidResponse_Code_name, IsNameValidResponse_Code_value) - proto.RegisterType((*GetSubscriptionRequest)(nil), "GetSubscriptionRequest") - proto.RegisterType((*GetSubscriptionRequestSigned)(nil), "GetSubscriptionRequestSigned") - proto.RegisterType((*GetSubscriptionResponse)(nil), "GetSubscriptionResponse") - proto.RegisterType((*BuySubscriptionRequest)(nil), "BuySubscriptionRequest") - proto.RegisterType((*BuySubscriptionRequestSigned)(nil), "BuySubscriptionRequestSigned") - proto.RegisterType((*BuySubscriptionResponse)(nil), "BuySubscriptionResponse") - proto.RegisterType((*FinalizeSubscriptionRequest)(nil), "FinalizeSubscriptionRequest") - proto.RegisterType((*FinalizeSubscriptionResponse)(nil), "FinalizeSubscriptionResponse") - proto.RegisterType((*FinalizeSubscriptionRequestSigned)(nil), "FinalizeSubscriptionRequestSigned") - proto.RegisterType((*GetSubscriptionPortalLinkRequest)(nil), "GetSubscriptionPortalLinkRequest") - proto.RegisterType((*GetSubscriptionPortalLinkRequestSigned)(nil), "GetSubscriptionPortalLinkRequestSigned") - proto.RegisterType((*GetSubscriptionPortalLinkResponse)(nil), "GetSubscriptionPortalLinkResponse") - proto.RegisterType((*GetVerificationEmailRequest)(nil), "GetVerificationEmailRequest") - proto.RegisterType((*GetVerificationEmailResponse)(nil), "GetVerificationEmailResponse") - proto.RegisterType((*GetVerificationEmailRequestSigned)(nil), "GetVerificationEmailRequestSigned") - proto.RegisterType((*VerifyEmailRequest)(nil), "VerifyEmailRequest") - proto.RegisterType((*VerifyEmailResponse)(nil), "VerifyEmailResponse") - proto.RegisterType((*VerifyEmailRequestSigned)(nil), "VerifyEmailRequestSigned") - proto.RegisterType((*IsNameValidRequest)(nil), "IsNameValidRequest") - proto.RegisterType((*IsNameValidResponse)(nil), "IsNameValidResponse") - proto.RegisterType((*VerifyAppStoreReceiptRequest)(nil), "VerifyAppStoreReceiptRequest") - proto.RegisterType((*VerifyAppStoreReceiptRequestSigned)(nil), "VerifyAppStoreReceiptRequestSigned") - proto.RegisterType((*VerifyAppStoreReceiptResponse)(nil), "VerifyAppStoreReceiptResponse") -} - -func init() { - proto.RegisterFile("paymentservice/paymentserviceproto/protos/paymentservice.proto", fileDescriptor_4feb29dcc5ba50f6) -} - -var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1536 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x6f, 0x23, 0x4b, - 0x15, 0x76, 0xfb, 0x95, 0xf8, 0xe4, 0x55, 0x29, 0x3b, 0x49, 0xc7, 0x37, 0x31, 0x99, 0xe6, 0x15, - 0x05, 0xd1, 0x23, 0x2e, 0x77, 0x71, 0x85, 0x10, 0xc2, 0x49, 0x9c, 0x10, 0x29, 0xe4, 0x46, 0x6d, - 0xcf, 0x0c, 0x30, 0x08, 0xe8, 0xb8, 0x4f, 0x9c, 0x66, 0x3a, 0x55, 0x4d, 0x55, 0x39, 0x19, 0xf3, - 0x0b, 0x58, 0x22, 0xb1, 0xe0, 0x07, 0xb1, 0x61, 0x39, 0x1b, 0xa4, 0x59, 0xc2, 0xcc, 0x0f, 0x80, - 0x25, 0x4b, 0x54, 0xd5, 0xed, 0xd8, 0x8e, 0x1f, 0x09, 0x13, 0xdd, 0xcd, 0xa4, 0xeb, 0xab, 0x3a, - 0xa7, 0xce, 0xf9, 0xce, 0xa3, 0x8e, 0x07, 0x7e, 0x12, 0xfb, 0xbd, 0x6b, 0x64, 0x4a, 0xa2, 0xb8, - 0x09, 0xdb, 0xf8, 0x7c, 0x74, 0x19, 0x0b, 0xae, 0xf8, 0x73, 0xf3, 0xaf, 0xbc, 0xb7, 0xe5, 0x1a, - 0xb4, 0x7a, 0xf8, 0xa9, 0xf2, 0xbf, 0x55, 0x21, 0x0a, 0x99, 0x68, 0x71, 0xbe, 0x84, 0xf5, 0x63, - 0x54, 0xcd, 0xee, 0x85, 0x6c, 0x8b, 0x30, 0x56, 0x21, 0x67, 0x1e, 0xfe, 0xa1, 0x8b, 0x52, 0xd1, - 0x1a, 0x00, 0xbf, 0x65, 0x28, 0xea, 0xac, 0x77, 0x72, 0x68, 0x5b, 0x3b, 0xd6, 0x6e, 0xc9, 0x1b, - 0x42, 0x9c, 0x97, 0xb0, 0x35, 0x59, 0xb2, 0x19, 0x76, 0x18, 0x06, 0xd4, 0x86, 0xb9, 0xd8, 0xef, - 0x45, 0xdc, 0x0f, 0x8c, 0xf0, 0xa2, 0xd7, 0x5f, 0xd2, 0x2d, 0x28, 0xc9, 0xb0, 0xc3, 0x7c, 0xd5, - 0x15, 0x68, 0x67, 0xcd, 0xde, 0x00, 0x70, 0xfe, 0x93, 0x85, 0x8d, 0x31, 0xc5, 0x32, 0xe6, 0x4c, - 0x22, 0xa5, 0x90, 0xd7, 0xc6, 0x1b, 0x85, 0x4b, 0x9e, 0xf9, 0xa6, 0xdf, 0x83, 0xa2, 0x54, 0xbe, - 0xea, 0x4a, 0xa3, 0x6a, 0xf9, 0xf3, 0xb2, 0x3b, 0x2c, 0xda, 0x34, 0x5b, 0x5e, 0x7a, 0x84, 0xee, - 0xc0, 0x42, 0xe0, 0x2b, 0x6c, 0x2a, 0x5f, 0x28, 0x0c, 0xec, 0xdc, 0x8e, 0xb5, 0x9b, 0xf7, 0x86, - 0x21, 0x5a, 0x85, 0x79, 0xbd, 0x6c, 0xb0, 0x40, 0xda, 0x79, 0xb3, 0x7d, 0xb7, 0xd6, 0xd2, 0xa1, - 0xac, 0x77, 0x15, 0xf7, 0x90, 0xe1, 0xad, 0x5d, 0xd8, 0xb1, 0x76, 0xe7, 0xbd, 0x61, 0x88, 0x7e, - 0x01, 0x4b, 0x29, 0xd9, 0x3f, 0x47, 0x75, 0xc5, 0x03, 0xbb, 0x68, 0x6c, 0x5a, 0x76, 0xcf, 0x87, - 0x51, 0x6f, 0xf4, 0x10, 0xdd, 0x03, 0x22, 0x12, 0xee, 0x30, 0xa8, 0xb3, 0xde, 0x99, 0x7f, 0x8d, - 0xf6, 0x9c, 0x21, 0x7c, 0x0c, 0xd7, 0xe4, 0x75, 0x25, 0x8a, 0xc6, 0xb5, 0x1f, 0x46, 0xf6, 0xbc, - 0x39, 0x34, 0x00, 0xe8, 0x17, 0xb0, 0x26, 0x13, 0xef, 0x2f, 0xb0, 0xc5, 0xcf, 0xf0, 0x56, 0x46, - 0xa8, 0x14, 0x0a, 0xbb, 0x64, 0x6c, 0x9d, 0xbc, 0xe9, 0xfc, 0x29, 0x0b, 0xeb, 0xfb, 0xdd, 0xde, - 0x43, 0x59, 0x10, 0x8c, 0x65, 0x41, 0x40, 0x77, 0x61, 0xc5, 0xac, 0x1a, 0xea, 0xaa, 0x1e, 0x04, - 0x02, 0x65, 0x12, 0x86, 0x92, 0x77, 0x1f, 0xa6, 0xdf, 0x82, 0xa5, 0x3b, 0x67, 0x5a, 0x3a, 0x88, - 0x39, 0x13, 0xc4, 0x51, 0x70, 0x9c, 0xc0, 0xfc, 0xa7, 0x12, 0x58, 0x78, 0x0c, 0x81, 0xc5, 0x7b, - 0x04, 0xea, 0xac, 0x9e, 0xcc, 0xc4, 0x13, 0xb3, 0xfa, 0x15, 0x6c, 0x8c, 0xe9, 0x4d, 0x93, 0xba, - 0x06, 0x90, 0x7a, 0xf3, 0x42, 0x44, 0x7d, 0x8a, 0x07, 0x88, 0x56, 0x7c, 0x11, 0x46, 0x51, 0xc8, - 0x3a, 0x27, 0x87, 0x29, 0xb9, 0x03, 0xc0, 0xf9, 0x8b, 0x05, 0x9f, 0x1d, 0x85, 0xcc, 0x8f, 0xc2, - 0x3f, 0xe2, 0xd7, 0x1b, 0xc0, 0x49, 0x24, 0xe7, 0x26, 0x93, 0xec, 0xd4, 0x60, 0x6b, 0xb2, 0x51, - 0x89, 0xcf, 0xce, 0x6b, 0x78, 0x36, 0xc3, 0xe8, 0x27, 0x72, 0xbd, 0x0f, 0x3b, 0xf7, 0x1a, 0xc8, - 0x39, 0x17, 0xca, 0x8f, 0x4e, 0x43, 0xf6, 0xe6, 0x91, 0xb4, 0x38, 0xbf, 0x83, 0xef, 0x3c, 0xa4, - 0xe3, 0x89, 0x56, 0xd6, 0xe1, 0xd9, 0x8c, 0x1b, 0xd2, 0xdc, 0xd8, 0x82, 0x52, 0x6c, 0xd0, 0x41, - 0x6a, 0x0c, 0x00, 0xe7, 0xdf, 0x16, 0x7c, 0x76, 0x8c, 0xea, 0x25, 0x8a, 0xf0, 0x32, 0x6c, 0xfb, - 0x5a, 0x87, 0xc9, 0xe2, 0xc7, 0xc6, 0xbe, 0x02, 0x05, 0x34, 0x65, 0x90, 0x44, 0x3c, 0x59, 0x4c, - 0xef, 0x21, 0xb9, 0x19, 0x3d, 0x84, 0x7e, 0x09, 0x1b, 0x21, 0x93, 0x61, 0x80, 0xa2, 0x15, 0xc6, - 0xb2, 0xce, 0x82, 0x56, 0x57, 0x71, 0x11, 0xfa, 0x51, 0xd2, 0x46, 0xe7, 0xbd, 0x69, 0xdb, 0x3a, - 0xaf, 0x42, 0xf9, 0x15, 0xbb, 0xe0, 0xbe, 0x08, 0x42, 0xd6, 0x39, 0x0d, 0xa5, 0x4a, 0x5b, 0xeb, - 0x18, 0xae, 0xf3, 0x6a, 0xb2, 0xc3, 0x83, 0xbc, 0x9a, 0x41, 0xc8, 0x13, 0x23, 0x26, 0x80, 0x1a, - 0xcd, 0xbd, 0xff, 0x8b, 0xe4, 0xc7, 0x17, 0x18, 0x85, 0x7c, 0x9b, 0x07, 0xfd, 0xa2, 0x32, 0xdf, - 0xce, 0x73, 0x28, 0x8f, 0xdc, 0x99, 0xe6, 0x85, 0x0d, 0x73, 0xb2, 0xdb, 0x6e, 0x6b, 0x65, 0x96, - 0xa1, 0xaa, 0xbf, 0x74, 0x3c, 0xb0, 0xc7, 0x8d, 0x7c, 0xa2, 0xe3, 0x97, 0x40, 0x4f, 0xa4, 0xae, - 0xeb, 0x97, 0x7e, 0x14, 0x06, 0x7d, 0xc7, 0xc7, 0x1a, 0xba, 0x35, 0xa9, 0xa1, 0x4f, 0xea, 0x1a, - 0xd9, 0x29, 0x5d, 0xe3, 0x5f, 0x16, 0x94, 0x47, 0x2e, 0x4a, 0xbd, 0xfd, 0x7e, 0x4a, 0x8c, 0x65, - 0xde, 0x82, 0x4d, 0x77, 0xc2, 0x19, 0xf7, 0x80, 0x07, 0x98, 0x70, 0x66, 0x1e, 0x79, 0xbc, 0xab, - 0xaa, 0xf4, 0xb6, 0x61, 0xc8, 0xe9, 0x41, 0x5e, 0x9f, 0xa7, 0x25, 0x28, 0x18, 0x2d, 0x24, 0x43, - 0x17, 0x61, 0xfe, 0x8c, 0x1f, 0x72, 0x55, 0x67, 0x3d, 0x62, 0xe9, 0x55, 0x8b, 0xf3, 0xe6, 0x15, - 0x17, 0x8a, 0x64, 0xe9, 0x02, 0xcc, 0xb5, 0x38, 0x3f, 0xe5, 0xac, 0x43, 0x72, 0xb4, 0x0c, 0x2b, - 0x3f, 0xf3, 0xe5, 0x09, 0xbb, 0xd1, 0x82, 0x07, 0x57, 0xbe, 0x90, 0x24, 0x4f, 0xd7, 0x60, 0x55, - 0x7b, 0x7b, 0x84, 0x86, 0xb0, 0x33, 0xae, 0xed, 0x23, 0x05, 0xba, 0x0a, 0x4b, 0x07, 0x3e, 0x3b, - 0xe3, 0xca, 0x43, 0x3d, 0x7c, 0x21, 0x29, 0x3a, 0xbf, 0x80, 0xad, 0x24, 0x3e, 0xf5, 0x38, 0x6e, - 0x2a, 0x2e, 0xd0, 0xc3, 0x36, 0x86, 0xb1, 0x7a, 0x6c, 0x3a, 0xd9, 0x30, 0x27, 0x12, 0x89, 0xd4, - 0xb1, 0xfe, 0xd2, 0xf9, 0x35, 0x38, 0xb3, 0x34, 0x3f, 0x31, 0x07, 0xbe, 0x01, 0xdb, 0x53, 0xb4, - 0x27, 0x01, 0xd8, 0xfb, 0x9b, 0x05, 0x64, 0xb8, 0x9b, 0x99, 0xe8, 0xaf, 0xc0, 0x82, 0xfe, 0xfb, - 0x82, 0xbd, 0x61, 0xfc, 0x96, 0x91, 0x0c, 0x25, 0xb0, 0xa8, 0x81, 0xc6, 0xdb, 0x38, 0xe2, 0x02, - 0x05, 0xb1, 0xa8, 0x0d, 0x15, 0x8d, 0xec, 0x77, 0xc3, 0x28, 0x40, 0xf1, 0x83, 0x57, 0x88, 0x6f, - 0x5a, 0x8d, 0x66, 0x8b, 0x64, 0x69, 0x15, 0xd6, 0xf5, 0xce, 0x01, 0x3f, 0x10, 0xe8, 0x2b, 0x3e, - 0xb4, 0x97, 0xa3, 0x15, 0x20, 0xc3, 0x52, 0xbf, 0x44, 0x5f, 0x90, 0x3c, 0x5d, 0x07, 0x3a, 0x2a, - 0x61, 0xf0, 0x82, 0x8e, 0xd9, 0xd0, 0xe9, 0xf3, 0xa8, 0x2b, 0x49, 0xb1, 0x0f, 0xd6, 0x59, 0x4f, - 0xf5, 0x62, 0x6c, 0xa1, 0x7f, 0x4d, 0xe6, 0xf6, 0x24, 0xd0, 0xf1, 0xf1, 0x51, 0xc7, 0x31, 0xf9, - 0x1a, 0x38, 0x72, 0x07, 0x9d, 0x23, 0xd3, 0xed, 0x89, 0x58, 0xda, 0xb7, 0x04, 0xaa, 0xb7, 0x55, - 0x78, 0x83, 0x24, 0x4b, 0xbf, 0x0d, 0xcf, 0x46, 0x0e, 0xe9, 0x50, 0x84, 0x02, 0x65, 0xfa, 0xf6, - 0x99, 0x06, 0x45, 0x72, 0x7b, 0x7f, 0xb5, 0x60, 0x69, 0x64, 0xbe, 0xa1, 0xcb, 0x00, 0xc9, 0xd7, - 0x81, 0x2f, 0x82, 0x84, 0xb6, 0x74, 0x2d, 0x7a, 0xb1, 0xe2, 0xc4, 0xa2, 0x14, 0x96, 0x13, 0xa4, - 0x1e, 0xc7, 0x11, 0x9e, 0xfb, 0x3d, 0x92, 0xd5, 0x1e, 0x25, 0xd8, 0x31, 0xe7, 0x9d, 0x04, 0x34, - 0x4c, 0x0d, 0x1d, 0x3c, 0x61, 0x7e, 0x1c, 0x27, 0x09, 0x3b, 0x7c, 0x34, 0x81, 0x0b, 0x83, 0x7b, - 0xcf, 0x38, 0x43, 0x52, 0xdc, 0xfb, 0x47, 0x0e, 0xa0, 0x21, 0x04, 0x17, 0xba, 0x5c, 0xa4, 0xde, - 0x7e, 0xc1, 0xf0, 0x6d, 0x8c, 0x6d, 0x85, 0xda, 0xac, 0x32, 0xac, 0x0c, 0xfa, 0x57, 0xe3, 0x3a, - 0x56, 0xba, 0x76, 0x2a, 0x40, 0xd2, 0xea, 0x68, 0xf6, 0xb3, 0x87, 0x64, 0xe9, 0x12, 0x94, 0x34, - 0xdb, 0xaf, 0x44, 0x52, 0x45, 0x69, 0x1e, 0x9c, 0x71, 0x75, 0xc4, 0xbb, 0x2c, 0x20, 0xf9, 0x3e, - 0x72, 0xc2, 0xfc, 0x84, 0xbd, 0x82, 0x8e, 0xe6, 0x08, 0x2b, 0x89, 0x6c, 0x51, 0x5b, 0xb1, 0xef, - 0xf7, 0x9b, 0x06, 0x99, 0xd3, 0xe5, 0xd9, 0x8f, 0xcb, 0xbc, 0x76, 0x4c, 0x07, 0xb0, 0x1e, 0x09, - 0xf4, 0x83, 0x5e, 0x1a, 0x89, 0x92, 0x89, 0x4d, 0xf7, 0x42, 0xde, 0xdd, 0x07, 0x9a, 0x40, 0x8d, - 0x18, 0xa5, 0x3a, 0x48, 0x48, 0x16, 0xb4, 0xe9, 0xa6, 0x6d, 0x1a, 0xf0, 0x88, 0x8b, 0x6b, 0x5f, - 0x91, 0x45, 0x9d, 0xa1, 0x06, 0x4d, 0x75, 0x26, 0xaf, 0x0b, 0x06, 0x64, 0xe9, 0xee, 0x7c, 0xba, - 0xd3, 0x44, 0xa6, 0xc8, 0xb2, 0x36, 0xc1, 0xa0, 0x47, 0x7e, 0x18, 0x61, 0xd0, 0xe2, 0x4d, 0x64, - 0x01, 0x59, 0xd1, 0x26, 0x18, 0xb8, 0xf1, 0x36, 0x0e, 0x05, 0x06, 0x84, 0x68, 0x13, 0x06, 0xd7, - 0x69, 0x86, 0xc9, 0x2a, 0xdd, 0x80, 0x72, 0x1a, 0xa8, 0x9b, 0xa4, 0xbf, 0x99, 0x2a, 0x23, 0x94, - 0x6e, 0xc3, 0x66, 0x12, 0xea, 0xae, 0x68, 0x5f, 0xf9, 0x12, 0x3d, 0xec, 0x84, 0x52, 0x89, 0x24, - 0x87, 0xca, 0xba, 0x58, 0xcc, 0xf6, 0xe8, 0x38, 0xc5, 0xf0, 0x96, 0x54, 0x28, 0x81, 0x05, 0x13, - 0xc4, 0xaf, 0x2e, 0x2f, 0x25, 0x2a, 0xf2, 0x3e, 0xff, 0xf9, 0x7f, 0x0b, 0x50, 0xa9, 0xb3, 0x5e, - 0x4a, 0xef, 0xb9, 0xe0, 0xfa, 0xed, 0x08, 0x59, 0x87, 0x7a, 0xb0, 0x76, 0x6f, 0x2a, 0x49, 0x4b, - 0x60, 0xdb, 0x9d, 0xf5, 0x6b, 0xaf, 0x6a, 0xbb, 0x53, 0x7e, 0xb3, 0x39, 0x19, 0xfa, 0x23, 0x58, - 0x18, 0xea, 0xd8, 0xb4, 0xec, 0x8e, 0x3f, 0x26, 0xd5, 0xca, 0xa4, 0xa6, 0xee, 0x64, 0xe8, 0x29, - 0xac, 0xdc, 0x9b, 0x9b, 0xe9, 0xb6, 0x3b, 0x6b, 0x42, 0xaf, 0xda, 0xee, 0x94, 0x41, 0xdb, 0xc9, - 0xd0, 0xd7, 0x50, 0x99, 0x34, 0x76, 0x52, 0xc7, 0x7d, 0x70, 0x1a, 0xad, 0x6e, 0xbb, 0x33, 0x27, - 0xda, 0x0c, 0xfd, 0x3d, 0x6c, 0x4e, 0x1d, 0xe8, 0xe8, 0x77, 0xdd, 0xc7, 0x8d, 0x93, 0x55, 0xc7, - 0x7d, 0x70, 0x2a, 0x4c, 0x1c, 0x99, 0x34, 0xe7, 0x50, 0x23, 0x3d, 0x7b, 0xfc, 0xa9, 0x6e, 0xbb, - 0x33, 0x47, 0xa8, 0x0c, 0xfd, 0x29, 0x2c, 0x0c, 0x8d, 0x10, 0x74, 0xd3, 0x9d, 0x36, 0x50, 0x54, - 0x2b, 0xee, 0x84, 0xe1, 0x24, 0x89, 0xf8, 0x31, 0xaa, 0x7a, 0x14, 0xe9, 0x8a, 0x96, 0x74, 0x5d, - 0xdf, 0x68, 0x3e, 0x47, 0xc5, 0x57, 0x87, 0xf0, 0x3b, 0xd9, 0xdf, 0xc0, 0xda, 0xc4, 0x87, 0x86, - 0x7e, 0xd3, 0x7d, 0xf8, 0x79, 0xab, 0xd6, 0xdc, 0x99, 0xaf, 0x94, 0x93, 0xd9, 0xff, 0xf1, 0xdf, - 0x3f, 0xd4, 0xac, 0x77, 0x1f, 0x6a, 0xd6, 0x3f, 0x3f, 0xd4, 0xac, 0x3f, 0x7f, 0xac, 0x65, 0xde, - 0x7d, 0xac, 0x65, 0xde, 0x7f, 0xac, 0x65, 0x7e, 0xe5, 0x3c, 0xfc, 0x3f, 0x2a, 0x17, 0x45, 0xf3, - 0xe7, 0x87, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x02, 0x5d, 0xd6, 0x86, 0xbe, 0x11, 0x00, 0x00, -} - -func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *GetSubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use VerifyEmailRequestSigned.ProtoReflect.Descriptor instead. +func (*VerifyEmailRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{17} } -func (m *GetSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OwnerAnyID) > 0 { - i -= len(m.OwnerAnyID) - copy(dAtA[i:], m.OwnerAnyID) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyID))) - i-- - dAtA[i] = 0xa +func (x *VerifyEmailRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } - return len(dAtA) - i, nil + return nil } -func (m *GetSubscriptionRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *VerifyEmailRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } - return dAtA[:n], nil + return nil } -func (m *GetSubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type IsNameValidRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestedTier uint32 `protobuf:"varint,1,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + RequestedAnyName string `protobuf:"bytes,2,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func (x *IsNameValidRequest) Reset() { + *x = IsNameValidRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *IsNameValidRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*IsNameValidRequest) ProtoMessage() {} -func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SubscribeToNewsletter { - i-- - if m.SubscribeToNewsletter { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if len(m.UserEmail) > 0 { - i -= len(m.UserEmail) - copy(dAtA[i:], m.UserEmail) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail))) - i-- - dAtA[i] = 0x42 - } - if len(m.RequestedAnyName) > 0 { - i -= len(m.RequestedAnyName) - copy(dAtA[i:], m.RequestedAnyName) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) - i-- - dAtA[i] = 0x3a - } - if m.PaymentMethod != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) - i-- - dAtA[i] = 0x30 - } - if m.IsAutoRenew { - i-- - if m.IsAutoRenew { - dAtA[i] = 1 - } else { - dAtA[i] = 0 +func (x *IsNameValidRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x28 - } - if m.DateEnds != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.DateEnds)) - i-- - dAtA[i] = 0x20 - } - if m.DateStarted != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.DateStarted)) - i-- - dAtA[i] = 0x18 - } - if m.Status != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x10 - } - if m.Tier != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.Tier)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BuySubscriptionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *BuySubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use IsNameValidRequest.ProtoReflect.Descriptor instead. +func (*IsNameValidRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{18} } -func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UserEmail) > 0 { - i -= len(m.UserEmail) - copy(dAtA[i:], m.UserEmail) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail))) - i-- - dAtA[i] = 0x32 - } - if len(m.RequestedAnyName) > 0 { - i -= len(m.RequestedAnyName) - copy(dAtA[i:], m.RequestedAnyName) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) - i-- - dAtA[i] = 0x2a - } - if m.PaymentMethod != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) - i-- - dAtA[i] = 0x20 - } - if m.RequestedTier != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.RequestedTier)) - i-- - dAtA[i] = 0x18 +func (x *IsNameValidRequest) GetRequestedTier() uint32 { + if x != nil { + return x.RequestedTier } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return 0 } -func (m *BuySubscriptionRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *IsNameValidRequest) GetRequestedAnyName() string { + if x != nil { + return x.RequestedAnyName } - return dAtA[:n], nil -} - -func (m *BuySubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *BuySubscriptionRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type IsNameValidResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code IsNameValidResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=IsNameValidResponse_Code" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *BuySubscriptionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *IsNameValidResponse) Reset() { + *x = IsNameValidResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *BuySubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *IsNameValidResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BillingID) > 0 { - i -= len(m.BillingID) - copy(dAtA[i:], m.BillingID) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.BillingID))) - i-- - dAtA[i] = 0x12 - } - if len(m.PaymentUrl) > 0 { - i -= len(m.PaymentUrl) - copy(dAtA[i:], m.PaymentUrl) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.PaymentUrl))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +func (*IsNameValidResponse) ProtoMessage() {} -func (m *FinalizeSubscriptionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *IsNameValidResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil -} - -func (m *FinalizeSubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *FinalizeSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestedAnyName) > 0 { - i -= len(m.RequestedAnyName) - copy(dAtA[i:], m.RequestedAnyName) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) - i-- - dAtA[i] = 0x1a - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use IsNameValidResponse.ProtoReflect.Descriptor instead. +func (*IsNameValidResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{19} } -func (m *FinalizeSubscriptionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *IsNameValidResponse) GetCode() IsNameValidResponse_Code { + if x != nil { + return x.Code } - return dAtA[:n], nil -} - -func (m *FinalizeSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FinalizeSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil + return IsNameValidResponse_Valid } -func (m *FinalizeSubscriptionRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *IsNameValidResponse) GetDescription() string { + if x != nil { + return x.Description } - return dAtA[:n], nil -} - -func (m *FinalizeSubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return "" } -func (m *FinalizeSubscriptionRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type VerifyAppStoreReceiptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // receipt is a JWT-encoded information about subscription purchase + Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionPortalLinkRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *VerifyAppStoreReceiptRequest) Reset() { + *x = VerifyAppStoreReceiptRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetSubscriptionPortalLinkRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (x *VerifyAppStoreReceiptRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSubscriptionPortalLinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +func (*VerifyAppStoreReceiptRequest) ProtoMessage() {} -func (m *GetSubscriptionPortalLinkRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *VerifyAppStoreReceiptRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *GetSubscriptionPortalLinkRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use VerifyAppStoreReceiptRequest.ProtoReflect.Descriptor instead. +func (*VerifyAppStoreReceiptRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{20} } -func (m *GetSubscriptionPortalLinkRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 +func (x *VerifyAppStoreReceiptRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return "" } -func (m *GetSubscriptionPortalLinkResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *VerifyAppStoreReceiptRequest) GetReceipt() string { + if x != nil { + return x.Receipt } - return dAtA[:n], nil + return "" } -func (m *GetSubscriptionPortalLinkResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type VerifyAppStoreReceiptRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` + // VerifyAppStoreReceiptRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetSubscriptionPortalLinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PortalUrl) > 0 { - i -= len(m.PortalUrl) - copy(dAtA[i:], m.PortalUrl) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.PortalUrl))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func (x *VerifyAppStoreReceiptRequestSigned) Reset() { + *x = VerifyAppStoreReceiptRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetVerificationEmailRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *VerifyAppStoreReceiptRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetVerificationEmailRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*VerifyAppStoreReceiptRequestSigned) ProtoMessage() {} -func (m *GetVerificationEmailRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsOnboardingList { - i-- - if m.IsOnboardingList { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.InsiderTipsAndTutorials { - i-- - if m.InsiderTipsAndTutorials { - dAtA[i] = 1 - } else { - dAtA[i] = 0 +func (x *VerifyAppStoreReceiptRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x20 - } - if m.SubscribeToNewsletter { - i-- - if m.SubscribeToNewsletter { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Email) > 0 { - i -= len(m.Email) - copy(dAtA[i:], m.Email) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Email))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetVerificationEmailResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetVerificationEmailResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetVerificationEmailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GetVerificationEmailRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *GetVerificationEmailRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use VerifyAppStoreReceiptRequestSigned.ProtoReflect.Descriptor instead. +func (*VerifyAppStoreReceiptRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{21} } -func (m *GetVerificationEmailRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa +func (x *VerifyAppStoreReceiptRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } - return len(dAtA) - i, nil + return nil } -func (m *VerifyEmailRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *VerifyAppStoreReceiptRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } - return dAtA[:n], nil + return nil } -func (m *VerifyEmailRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type VerifyAppStoreReceiptResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *VerifyEmailRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Code))) - i-- - dAtA[i] = 0x1a - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func (x *VerifyAppStoreReceiptResponse) Reset() { + *x = VerifyAppStoreReceiptResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *VerifyEmailResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *VerifyAppStoreReceiptResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *VerifyEmailResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*VerifyAppStoreReceiptResponse) ProtoMessage() {} -func (m *VerifyEmailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 +func (x *VerifyAppStoreReceiptResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - i-- - dAtA[i] = 0x8 + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *VerifyEmailRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VerifyEmailRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerifyEmailRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IsNameValidRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsNameValidRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IsNameValidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestedAnyName) > 0 { - i -= len(m.RequestedAnyName) - copy(dAtA[i:], m.RequestedAnyName) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) - i-- - dAtA[i] = 0x12 - } - if m.RequestedTier != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.RequestedTier)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *IsNameValidResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsNameValidResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IsNameValidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} +// Deprecated: Use VerifyAppStoreReceiptResponse.ProtoReflect.Descriptor instead. +func (*VerifyAppStoreReceiptResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP(), []int{22} +} + +var File_paymentservice_paymentserviceproto_protos_paymentservice_proto protoreflect.FileDescriptor + +var file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDesc = string([]byte{ + 0x0a, 0x3e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x44, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x44, + 0x22, 0x56, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x74, 0x69, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6e, + 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x75, 0x74, 0x6f, + 0x52, 0x65, 0x6e, 0x65, 0x77, 0x12, 0x34, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0d, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x54, 0x6f, 0x4e, 0x65, 0x77, 0x73, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, + 0x6f, 0x4e, 0x65, 0x77, 0x73, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x22, 0x88, 0x02, 0x0a, 0x16, + 0x42, 0x75, 0x79, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, + 0x6e, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x69, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x54, 0x69, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0d, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x10, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x56, 0x0a, 0x1c, 0x42, 0x75, 0x79, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x57, + 0x0a, 0x17, 0x42, 0x75, 0x79, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x6c, + 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x22, 0x93, 0x01, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x41, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1e, 0x0a, + 0x1c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x0a, + 0x21, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x42, 0x0a, 0x20, 0x47, 0x65, + 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x22, 0x60, + 0x0a, 0x26, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x22, 0x41, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x55, + 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x55, 0x72, 0x6c, 0x22, 0xef, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x6e, + 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x4e, 0x65, 0x77, 0x73, 0x6c, 0x65, 0x74, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x54, 0x6f, 0x4e, 0x65, 0x77, 0x73, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x12, + 0x38, 0x0a, 0x17, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x54, 0x69, 0x70, 0x73, 0x41, 0x6e, + 0x64, 0x54, 0x75, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x17, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x54, 0x69, 0x70, 0x73, 0x41, 0x6e, 0x64, + 0x54, 0x75, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x73, 0x4f, + 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0x72, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x2f, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0a, 0x18, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x66, 0x0a, 0x12, 0x49, + 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x69, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x54, 0x69, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x13, 0x49, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x49, 0x73, 0x4e, 0x61, + 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x04, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x44, 0x6f, 0x74, 0x41, 0x6e, 0x79, 0x10, 0x01, 0x12, 0x0c, 0x0a, + 0x08, 0x54, 0x6f, 0x6f, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, + 0x6f, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x61, 0x73, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x68, 0x61, 0x72, 0x73, 0x10, 0x04, 0x12, 0x15, 0x0a, + 0x11, 0x54, 0x69, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x6f, 0x4e, 0x61, + 0x6d, 0x65, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x10, 0x06, 0x22, 0x58, 0x0a, 0x1c, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x41, 0x70, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x41, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x22, 0x5c, 0x0a, 0x22, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x70, 0x70, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0x1f, 0x0a, 0x1d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x70, 0x70, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2a, 0xc3, 0x01, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x65, 0x72, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x69, 0x65, 0x72, 0x55, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x69, 0x65, 0x72, 0x45, 0x78, + 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x69, 0x65, 0x72, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x31, 0x57, 0x65, 0x65, 0x6b, 0x54, 0x45, 0x53, 0x54, + 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x31, 0x57, 0x65, 0x65, 0x6b, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x14, + 0x0a, 0x10, 0x54, 0x69, 0x65, 0x72, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x31, 0x59, 0x65, + 0x61, 0x72, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x31, 0x59, 0x65, 0x61, 0x72, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, + 0x54, 0x69, 0x65, 0x72, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x73, 0x10, + 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x69, 0x65, 0x72, 0x41, 0x6e, 0x79, 0x74, 0x79, 0x70, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x10, 0x07, 0x2a, 0x73, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x11, 0x0a, 0x0d, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, + 0x11, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x46, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x2a, 0x97, 0x01, 0x0a, 0x0d, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, + 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x61, 0x72, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x50, 0x61, + 0x79, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x50, 0x61, 0x79, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x61, 0x70, 0x70, 0x10, 0x04, 0x12, 0x15, + 0x0a, 0x11, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x6e, + 0x61, 0x70, 0x70, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, + 0x6f, 0x6e, 0x65, 0x10, 0x06, 0x2a, 0xd5, 0x03, 0x0a, 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x54, 0x69, 0x65, 0x72, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x69, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x04, + 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x69, 0x65, 0x72, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x61, + 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x41, + 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x09, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a, + 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x73, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x57, 0x72, 0x6f, + 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x10, 0x0c, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x53, 0x65, 0x6e, 0x74, 0x10, 0x0e, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x10, + 0x0f, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x57, 0x72, 0x6f, 0x6e, + 0x67, 0x43, 0x6f, 0x64, 0x65, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x65, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x10, 0x12, + 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x13, 0x12, + 0x1a, 0x0a, 0x16, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x10, 0x14, 0x12, 0x10, 0x0a, 0x0b, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x10, 0xd8, 0x04, 0x32, 0xf8, 0x05, + 0x0a, 0x14, 0x41, 0x6e, 0x79, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x52, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x18, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x49, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x49, 0x73, 0x4e, 0x61, + 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x49, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0f, 0x42, 0x75, 0x79, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x75, 0x79, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x18, 0x2e, 0x42, 0x75, 0x79, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x1a, 0x1d, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x27, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x4c, + 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x1d, 0x2e, 0x47, 0x65, 0x74, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x2e, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x14, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x1a, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x41, 0x70, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x12, 0x23, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x70, 0x70, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x1a, 0x1e, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, + 0x70, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x24, 0x5a, 0x22, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) -func (m *VerifyAppStoreReceiptRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +var ( + file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescOnce sync.Once + file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescData []byte +) -func (m *VerifyAppStoreReceiptRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescGZIP() []byte { + file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescOnce.Do(func() { + file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDesc), len(file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDesc))) + }) + return file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDescData +} + +var file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_paymentservice_paymentserviceproto_protos_paymentservice_proto_goTypes = []any{ + (SubscriptionTier)(0), // 0: SubscriptionTier + (SubscriptionStatus)(0), // 1: SubscriptionStatus + (PaymentMethod)(0), // 2: PaymentMethod + (ErrorCodes)(0), // 3: ErrorCodes + (IsNameValidResponse_Code)(0), // 4: IsNameValidResponse.Code + (*GetSubscriptionRequest)(nil), // 5: GetSubscriptionRequest + (*GetSubscriptionRequestSigned)(nil), // 6: GetSubscriptionRequestSigned + (*GetSubscriptionResponse)(nil), // 7: GetSubscriptionResponse + (*BuySubscriptionRequest)(nil), // 8: BuySubscriptionRequest + (*BuySubscriptionRequestSigned)(nil), // 9: BuySubscriptionRequestSigned + (*BuySubscriptionResponse)(nil), // 10: BuySubscriptionResponse + (*FinalizeSubscriptionRequest)(nil), // 11: FinalizeSubscriptionRequest + (*FinalizeSubscriptionResponse)(nil), // 12: FinalizeSubscriptionResponse + (*FinalizeSubscriptionRequestSigned)(nil), // 13: FinalizeSubscriptionRequestSigned + (*GetSubscriptionPortalLinkRequest)(nil), // 14: GetSubscriptionPortalLinkRequest + (*GetSubscriptionPortalLinkRequestSigned)(nil), // 15: GetSubscriptionPortalLinkRequestSigned + (*GetSubscriptionPortalLinkResponse)(nil), // 16: GetSubscriptionPortalLinkResponse + (*GetVerificationEmailRequest)(nil), // 17: GetVerificationEmailRequest + (*GetVerificationEmailResponse)(nil), // 18: GetVerificationEmailResponse + (*GetVerificationEmailRequestSigned)(nil), // 19: GetVerificationEmailRequestSigned + (*VerifyEmailRequest)(nil), // 20: VerifyEmailRequest + (*VerifyEmailResponse)(nil), // 21: VerifyEmailResponse + (*VerifyEmailRequestSigned)(nil), // 22: VerifyEmailRequestSigned + (*IsNameValidRequest)(nil), // 23: IsNameValidRequest + (*IsNameValidResponse)(nil), // 24: IsNameValidResponse + (*VerifyAppStoreReceiptRequest)(nil), // 25: VerifyAppStoreReceiptRequest + (*VerifyAppStoreReceiptRequestSigned)(nil), // 26: VerifyAppStoreReceiptRequestSigned + (*VerifyAppStoreReceiptResponse)(nil), // 27: VerifyAppStoreReceiptResponse + (*GetTiersRequestSigned)(nil), // 28: GetTiersRequestSigned + (*GetTiersResponse)(nil), // 29: GetTiersResponse +} +var file_paymentservice_paymentserviceproto_protos_paymentservice_proto_depIdxs = []int32{ + 1, // 0: GetSubscriptionResponse.status:type_name -> SubscriptionStatus + 2, // 1: GetSubscriptionResponse.paymentMethod:type_name -> PaymentMethod + 2, // 2: BuySubscriptionRequest.paymentMethod:type_name -> PaymentMethod + 4, // 3: IsNameValidResponse.code:type_name -> IsNameValidResponse.Code + 6, // 4: AnyPaymentProcessing.GetSubscriptionStatus:input_type -> GetSubscriptionRequestSigned + 23, // 5: AnyPaymentProcessing.IsNameValid:input_type -> IsNameValidRequest + 9, // 6: AnyPaymentProcessing.BuySubscription:input_type -> BuySubscriptionRequestSigned + 13, // 7: AnyPaymentProcessing.FinalizeSubscription:input_type -> FinalizeSubscriptionRequestSigned + 15, // 8: AnyPaymentProcessing.GetSubscriptionPortalLink:input_type -> GetSubscriptionPortalLinkRequestSigned + 19, // 9: AnyPaymentProcessing.GetVerificationEmail:input_type -> GetVerificationEmailRequestSigned + 22, // 10: AnyPaymentProcessing.VerifyEmail:input_type -> VerifyEmailRequestSigned + 28, // 11: AnyPaymentProcessing.GetAllTiers:input_type -> GetTiersRequestSigned + 26, // 12: AnyPaymentProcessing.VerifyAppStoreReceipt:input_type -> VerifyAppStoreReceiptRequestSigned + 7, // 13: AnyPaymentProcessing.GetSubscriptionStatus:output_type -> GetSubscriptionResponse + 24, // 14: AnyPaymentProcessing.IsNameValid:output_type -> IsNameValidResponse + 10, // 15: AnyPaymentProcessing.BuySubscription:output_type -> BuySubscriptionResponse + 12, // 16: AnyPaymentProcessing.FinalizeSubscription:output_type -> FinalizeSubscriptionResponse + 16, // 17: AnyPaymentProcessing.GetSubscriptionPortalLink:output_type -> GetSubscriptionPortalLinkResponse + 18, // 18: AnyPaymentProcessing.GetVerificationEmail:output_type -> GetVerificationEmailResponse + 21, // 19: AnyPaymentProcessing.VerifyEmail:output_type -> VerifyEmailResponse + 29, // 20: AnyPaymentProcessing.GetAllTiers:output_type -> GetTiersResponse + 27, // 21: AnyPaymentProcessing.VerifyAppStoreReceipt:output_type -> VerifyAppStoreReceiptResponse + 13, // [13:22] is the sub-list for method output_type + 4, // [4:13] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_paymentservice_paymentserviceproto_protos_paymentservice_proto_init() } +func file_paymentservice_paymentserviceproto_protos_paymentservice_proto_init() { + if File_paymentservice_paymentserviceproto_protos_paymentservice_proto != nil { + return + } + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDesc), len(file_paymentservice_paymentserviceproto_protos_paymentservice_proto_rawDesc)), + NumEnums: 5, + NumMessages: 23, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_paymentservice_paymentserviceproto_protos_paymentservice_proto_goTypes, + DependencyIndexes: file_paymentservice_paymentserviceproto_protos_paymentservice_proto_depIdxs, + EnumInfos: file_paymentservice_paymentserviceproto_protos_paymentservice_proto_enumTypes, + MessageInfos: file_paymentservice_paymentserviceproto_protos_paymentservice_proto_msgTypes, + }.Build() + File_paymentservice_paymentserviceproto_protos_paymentservice_proto = out.File + file_paymentservice_paymentserviceproto_protos_paymentservice_proto_goTypes = nil + file_paymentservice_paymentserviceproto_protos_paymentservice_proto_depIdxs = nil } - -func (m *VerifyAppStoreReceiptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Receipt) > 0 { - i -= len(m.Receipt) - copy(dAtA[i:], m.Receipt) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Receipt))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VerifyAppStoreReceiptRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VerifyAppStoreReceiptRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerifyAppStoreReceiptRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VerifyAppStoreReceiptResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VerifyAppStoreReceiptResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerifyAppStoreReceiptResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int { - offset -= sovPaymentservice(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GetSubscriptionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyID) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *GetSubscriptionRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *GetSubscriptionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tier != 0 { - n += 1 + sovPaymentservice(uint64(m.Tier)) - } - if m.Status != 0 { - n += 1 + sovPaymentservice(uint64(m.Status)) - } - if m.DateStarted != 0 { - n += 1 + sovPaymentservice(uint64(m.DateStarted)) - } - if m.DateEnds != 0 { - n += 1 + sovPaymentservice(uint64(m.DateEnds)) - } - if m.IsAutoRenew { - n += 2 - } - if m.PaymentMethod != 0 { - n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) - } - l = len(m.RequestedAnyName) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.UserEmail) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - if m.SubscribeToNewsletter { - n += 2 - } - return n -} - -func (m *BuySubscriptionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - if m.RequestedTier != 0 { - n += 1 + sovPaymentservice(uint64(m.RequestedTier)) - } - if m.PaymentMethod != 0 { - n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) - } - l = len(m.RequestedAnyName) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.UserEmail) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *BuySubscriptionRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *BuySubscriptionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PaymentUrl) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.BillingID) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *FinalizeSubscriptionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.RequestedAnyName) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *FinalizeSubscriptionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *FinalizeSubscriptionRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *GetSubscriptionPortalLinkRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *GetSubscriptionPortalLinkRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *GetSubscriptionPortalLinkResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortalUrl) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *GetVerificationEmailRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Email) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - if m.SubscribeToNewsletter { - n += 2 - } - if m.InsiderTipsAndTutorials { - n += 2 - } - if m.IsOnboardingList { - n += 2 - } - return n -} - -func (m *GetVerificationEmailResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GetVerificationEmailRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *VerifyEmailRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Code) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *VerifyEmailResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - return n -} - -func (m *VerifyEmailRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *IsNameValidRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestedTier != 0 { - n += 1 + sovPaymentservice(uint64(m.RequestedTier)) - } - l = len(m.RequestedAnyName) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *IsNameValidResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovPaymentservice(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *VerifyAppStoreReceiptRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Receipt) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *VerifyAppStoreReceiptRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - return n -} - -func (m *VerifyAppStoreReceiptResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovPaymentservice(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPaymentservice(x uint64) (n int) { - return sovPaymentservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GetSubscriptionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSubscriptionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSubscriptionRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSubscriptionRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSubscriptionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) - } - m.Tier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Tier |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= SubscriptionStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DateStarted", wireType) - } - m.DateStarted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DateStarted |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DateEnds", wireType) - } - m.DateEnds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DateEnds |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsAutoRenew", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsAutoRenew = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) - } - m.PaymentMethod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PaymentMethod |= PaymentMethod(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserEmail = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SubscribeToNewsletter = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuySubscriptionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuySubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) - } - m.RequestedTier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestedTier |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) - } - m.PaymentMethod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PaymentMethod |= PaymentMethod(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserEmail = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuySubscriptionRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuySubscriptionRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuySubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuySubscriptionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuySubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymentUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymentUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BillingID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BillingID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FinalizeSubscriptionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FinalizeSubscriptionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FinalizeSubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FinalizeSubscriptionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FinalizeSubscriptionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FinalizeSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FinalizeSubscriptionRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FinalizeSubscriptionRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FinalizeSubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSubscriptionPortalLinkRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSubscriptionPortalLinkRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSubscriptionPortalLinkResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortalUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortalUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetVerificationEmailRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetVerificationEmailRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetVerificationEmailRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Email = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SubscribeToNewsletter = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InsiderTipsAndTutorials", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InsiderTipsAndTutorials = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsOnboardingList", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsOnboardingList = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetVerificationEmailResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetVerificationEmailResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetVerificationEmailResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetVerificationEmailRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetVerificationEmailRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetVerificationEmailRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifyEmailRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerifyEmailRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyEmailRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Code = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifyEmailResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerifyEmailResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyEmailResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifyEmailRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerifyEmailRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyEmailRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IsNameValidRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsNameValidRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsNameValidRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) - } - m.RequestedTier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestedTier |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IsNameValidResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsNameValidResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsNameValidResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= IsNameValidResponse_Code(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerifyAppStoreReceiptRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyAppStoreReceiptRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receipt = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifyAppStoreReceiptRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerifyAppStoreReceiptRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyAppStoreReceiptRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifyAppStoreReceiptResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerifyAppStoreReceiptResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyAppStoreReceiptResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPaymentservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPaymentservice(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPaymentservice - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPaymentservice - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPaymentservice - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPaymentservice = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPaymentservice = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPaymentservice = fmt.Errorf("proto: unexpected end of group") -) diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index 543db02bf..f1e181a0b 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: paymentservice/paymentserviceproto/protos/paymentservice.proto package paymentserviceproto import ( - bytes "bytes" context "context" errors "errors" - jsonpb "github.com/anyproto/protobuf/jsonpb" - proto "github.com/anyproto/protobuf/proto" + drpc1 "github.com/planetscale/vtprotobuf/codec/drpc" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) @@ -17,24 +15,19 @@ import ( type drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto struct{} func (drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) + return drpc1.Marshal(msg) } func (drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) + return drpc1.Unmarshal(buf, msg) } func (drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil + return drpc1.JSONMarshal(msg) } func (drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) + return drpc1.JSONUnmarshal(buf, msg) } type DRPCAnyPaymentProcessingClient interface { diff --git a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go index 0f5792d09..4f05f8eea 100644 --- a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 // source: paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto package paymentserviceproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type PeriodType int32 @@ -33,209 +32,207 @@ const ( PeriodType_PeriodTypeYears PeriodType = 5 ) -var PeriodType_name = map[int32]string{ - 0: "PeriodTypeUnknown", - 1: "PeriodTypeUnlimited", - 2: "PeriodTypeDays", - 3: "PeriodTypeWeeks", - 4: "PeriodTypeMonths", - 5: "PeriodTypeYears", -} +// Enum value maps for PeriodType. +var ( + PeriodType_name = map[int32]string{ + 0: "PeriodTypeUnknown", + 1: "PeriodTypeUnlimited", + 2: "PeriodTypeDays", + 3: "PeriodTypeWeeks", + 4: "PeriodTypeMonths", + 5: "PeriodTypeYears", + } + PeriodType_value = map[string]int32{ + "PeriodTypeUnknown": 0, + "PeriodTypeUnlimited": 1, + "PeriodTypeDays": 2, + "PeriodTypeWeeks": 3, + "PeriodTypeMonths": 4, + "PeriodTypeYears": 5, + } +) -var PeriodType_value = map[string]int32{ - "PeriodTypeUnknown": 0, - "PeriodTypeUnlimited": 1, - "PeriodTypeDays": 2, - "PeriodTypeWeeks": 3, - "PeriodTypeMonths": 4, - "PeriodTypeYears": 5, +func (x PeriodType) Enum() *PeriodType { + p := new(PeriodType) + *p = x + return p } func (x PeriodType) String() string { - return proto.EnumName(PeriodType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } +func (PeriodType) Descriptor() protoreflect.EnumDescriptor { + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_enumTypes[0].Descriptor() +} + +func (PeriodType) Type() protoreflect.EnumType { + return &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_enumTypes[0] +} + +func (x PeriodType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PeriodType.Descriptor instead. func (PeriodType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_597ac3048c641f44, []int{0} + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP(), []int{0} } type Feature struct { - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *Feature) Reset() { *m = Feature{} } -func (m *Feature) String() string { return proto.CompactTextString(m) } -func (*Feature) ProtoMessage() {} -func (*Feature) Descriptor() ([]byte, []int) { - return fileDescriptor_597ac3048c641f44, []int{0} +func (x *Feature) Reset() { + *x = Feature{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *Feature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *Feature) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Feature.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*Feature) ProtoMessage() {} + +func (x *Feature) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *Feature) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *Feature) XXX_Merge(src proto.Message) { - xxx_messageInfo_Feature.Merge(m, src) -} -func (m *Feature) XXX_Size() int { - return m.Size() -} -func (m *Feature) XXX_DiscardUnknown() { - xxx_messageInfo_Feature.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_Feature proto.InternalMessageInfo +// Deprecated: Use Feature.ProtoReflect.Descriptor instead. +func (*Feature) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP(), []int{0} +} -func (m *Feature) GetDescription() string { - if m != nil { - return m.Description +func (x *Feature) GetDescription() string { + if x != nil { + return x.Description } return "" } type GetTiersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() - OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` - Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"` + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetTiersRequest) Reset() { *m = GetTiersRequest{} } -func (m *GetTiersRequest) String() string { return proto.CompactTextString(m) } -func (*GetTiersRequest) ProtoMessage() {} -func (*GetTiersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_597ac3048c641f44, []int{1} +func (x *GetTiersRequest) Reset() { + *x = GetTiersRequest{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetTiersRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *GetTiersRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetTiersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTiersRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*GetTiersRequest) ProtoMessage() {} + +func (x *GetTiersRequest) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *GetTiersRequest) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *GetTiersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTiersRequest.Merge(m, src) -} -func (m *GetTiersRequest) XXX_Size() int { - return m.Size() -} -func (m *GetTiersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetTiersRequest.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_GetTiersRequest proto.InternalMessageInfo +// Deprecated: Use GetTiersRequest.ProtoReflect.Descriptor instead. +func (*GetTiersRequest) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP(), []int{1} +} -func (m *GetTiersRequest) GetOwnerAnyId() string { - if m != nil { - return m.OwnerAnyId +func (x *GetTiersRequest) GetOwnerAnyId() string { + if x != nil { + return x.OwnerAnyId } return "" } -func (m *GetTiersRequest) GetLocale() string { - if m != nil { - return m.Locale +func (x *GetTiersRequest) GetLocale() string { + if x != nil { + return x.Locale } return "" } type GetTiersRequestSigned struct { + state protoimpl.MessageState `protogen:"open.v1"` // GetTiersRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // this is payload signed with payload.ownerAnyID - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetTiersRequestSigned) Reset() { *m = GetTiersRequestSigned{} } -func (m *GetTiersRequestSigned) String() string { return proto.CompactTextString(m) } -func (*GetTiersRequestSigned) ProtoMessage() {} -func (*GetTiersRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_597ac3048c641f44, []int{2} +func (x *GetTiersRequestSigned) Reset() { + *x = GetTiersRequestSigned{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetTiersRequestSigned) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *GetTiersRequestSigned) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetTiersRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTiersRequestSigned.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*GetTiersRequestSigned) ProtoMessage() {} + +func (x *GetTiersRequestSigned) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *GetTiersRequestSigned) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *GetTiersRequestSigned) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTiersRequestSigned.Merge(m, src) -} -func (m *GetTiersRequestSigned) XXX_Size() int { - return m.Size() -} -func (m *GetTiersRequestSigned) XXX_DiscardUnknown() { - xxx_messageInfo_GetTiersRequestSigned.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_GetTiersRequestSigned proto.InternalMessageInfo +// Deprecated: Use GetTiersRequestSigned.ProtoReflect.Descriptor instead. +func (*GetTiersRequestSigned) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP(), []int{2} +} -func (m *GetTiersRequestSigned) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *GetTiersRequestSigned) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *GetTiersRequestSigned) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *GetTiersRequestSigned) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type TierData struct { + state protoimpl.MessageState `protogen:"open.v1"` // this is a unique ID of the tier // you should hardcode this in your app and provide icon, graphics, etc for each tier // (even for old/historical/inactive/hidden tiers) @@ -276,1836 +273,363 @@ type TierData struct { AndroidProductId string `protobuf:"bytes,18,opt,name=androidProductId,proto3" json:"androidProductId,omitempty"` AndroidManageUrl string `protobuf:"bytes,19,opt,name=androidManageUrl,proto3" json:"androidManageUrl,omitempty"` // something like "limited offer", etc - Offer string `protobuf:"bytes,20,opt,name=offer,proto3" json:"offer,omitempty"` + Offer string `protobuf:"bytes,20,opt,name=offer,proto3" json:"offer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *TierData) Reset() { *m = TierData{} } -func (m *TierData) String() string { return proto.CompactTextString(m) } -func (*TierData) ProtoMessage() {} -func (*TierData) Descriptor() ([]byte, []int) { - return fileDescriptor_597ac3048c641f44, []int{3} +func (x *TierData) Reset() { + *x = TierData{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *TierData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *TierData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TierData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TierData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*TierData) ProtoMessage() {} + +func (x *TierData) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil - } -} -func (m *TierData) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + return ms } - return b, nil -} -func (m *TierData) XXX_Merge(src proto.Message) { - xxx_messageInfo_TierData.Merge(m, src) -} -func (m *TierData) XXX_Size() int { - return m.Size() -} -func (m *TierData) XXX_DiscardUnknown() { - xxx_messageInfo_TierData.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_TierData proto.InternalMessageInfo +// Deprecated: Use TierData.ProtoReflect.Descriptor instead. +func (*TierData) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP(), []int{3} +} -func (m *TierData) GetId() uint32 { - if m != nil { - return m.Id +func (x *TierData) GetId() uint32 { + if x != nil { + return x.Id } return 0 } -func (m *TierData) GetName() string { - if m != nil { - return m.Name +func (x *TierData) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *TierData) GetDescription() string { - if m != nil { - return m.Description +func (x *TierData) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *TierData) GetIsActive() bool { - if m != nil { - return m.IsActive +func (x *TierData) GetIsActive() bool { + if x != nil { + return x.IsActive } return false } -func (m *TierData) GetIsTest() bool { - if m != nil { - return m.IsTest +func (x *TierData) GetIsTest() bool { + if x != nil { + return x.IsTest } return false } -func (m *TierData) GetIsHiddenTier() bool { - if m != nil { - return m.IsHiddenTier +func (x *TierData) GetIsHiddenTier() bool { + if x != nil { + return x.IsHiddenTier } return false } -func (m *TierData) GetPeriodType() PeriodType { - if m != nil { - return m.PeriodType +func (x *TierData) GetPeriodType() PeriodType { + if x != nil { + return x.PeriodType } return PeriodType_PeriodTypeUnknown } -func (m *TierData) GetPeriodValue() uint32 { - if m != nil { - return m.PeriodValue +func (x *TierData) GetPeriodValue() uint32 { + if x != nil { + return x.PeriodValue } return 0 } -func (m *TierData) GetPriceStripeUsdCents() uint32 { - if m != nil { - return m.PriceStripeUsdCents +func (x *TierData) GetPriceStripeUsdCents() uint32 { + if x != nil { + return x.PriceStripeUsdCents } return 0 } -func (m *TierData) GetAnyNamesCountIncluded() uint32 { - if m != nil { - return m.AnyNamesCountIncluded +func (x *TierData) GetAnyNamesCountIncluded() uint32 { + if x != nil { + return x.AnyNamesCountIncluded } return 0 } -func (m *TierData) GetAnyNameMinLength() uint32 { - if m != nil { - return m.AnyNameMinLength +func (x *TierData) GetAnyNameMinLength() uint32 { + if x != nil { + return x.AnyNameMinLength } return 0 } -func (m *TierData) GetFeatures() []*Feature { - if m != nil { - return m.Features +func (x *TierData) GetFeatures() []*Feature { + if x != nil { + return x.Features } return nil } -func (m *TierData) GetColorStr() string { - if m != nil { - return m.ColorStr +func (x *TierData) GetColorStr() string { + if x != nil { + return x.ColorStr } return "" } -func (m *TierData) GetStripeProductId() string { - if m != nil { - return m.StripeProductId +func (x *TierData) GetStripeProductId() string { + if x != nil { + return x.StripeProductId } return "" } -func (m *TierData) GetStripeManageUrl() string { - if m != nil { - return m.StripeManageUrl +func (x *TierData) GetStripeManageUrl() string { + if x != nil { + return x.StripeManageUrl } return "" } -func (m *TierData) GetIosProductId() string { - if m != nil { - return m.IosProductId +func (x *TierData) GetIosProductId() string { + if x != nil { + return x.IosProductId } return "" } -func (m *TierData) GetIosManageUrl() string { - if m != nil { - return m.IosManageUrl +func (x *TierData) GetIosManageUrl() string { + if x != nil { + return x.IosManageUrl } return "" } -func (m *TierData) GetAndroidProductId() string { - if m != nil { - return m.AndroidProductId +func (x *TierData) GetAndroidProductId() string { + if x != nil { + return x.AndroidProductId } return "" } -func (m *TierData) GetAndroidManageUrl() string { - if m != nil { - return m.AndroidManageUrl +func (x *TierData) GetAndroidManageUrl() string { + if x != nil { + return x.AndroidManageUrl } return "" } -func (m *TierData) GetOffer() string { - if m != nil { - return m.Offer +func (x *TierData) GetOffer() string { + if x != nil { + return x.Offer } return "" } type GetTiersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` // list of all available tiers - Tiers []*TierData `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers,omitempty"` -} - -func (m *GetTiersResponse) Reset() { *m = GetTiersResponse{} } -func (m *GetTiersResponse) String() string { return proto.CompactTextString(m) } -func (*GetTiersResponse) ProtoMessage() {} -func (*GetTiersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_597ac3048c641f44, []int{4} -} -func (m *GetTiersResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetTiersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTiersResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetTiersResponse) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *GetTiersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTiersResponse.Merge(m, src) -} -func (m *GetTiersResponse) XXX_Size() int { - return m.Size() -} -func (m *GetTiersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetTiersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetTiersResponse proto.InternalMessageInfo - -func (m *GetTiersResponse) GetTiers() []*TierData { - if m != nil { - return m.Tiers - } - return nil -} - -func init() { - proto.RegisterEnum("PeriodType", PeriodType_name, PeriodType_value) - proto.RegisterType((*Feature)(nil), "Feature") - proto.RegisterType((*GetTiersRequest)(nil), "GetTiersRequest") - proto.RegisterType((*GetTiersRequestSigned)(nil), "GetTiersRequestSigned") - proto.RegisterType((*TierData)(nil), "TierData") - proto.RegisterType((*GetTiersResponse)(nil), "GetTiersResponse") -} - -func init() { - proto.RegisterFile("paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto", fileDescriptor_597ac3048c641f44) -} - -var fileDescriptor_597ac3048c641f44 = []byte{ - // 627 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x5f, 0x4f, 0x1a, 0x4b, - 0x14, 0x67, 0x51, 0x14, 0x0e, 0x08, 0xeb, 0xa0, 0xf7, 0x4e, 0x6e, 0x6e, 0xb8, 0x84, 0xdc, 0x07, - 0xa2, 0x09, 0x36, 0xda, 0xc7, 0xbe, 0x58, 0x4d, 0x5b, 0x92, 0xda, 0x9a, 0x55, 0xdb, 0xb4, 0x2f, - 0xcd, 0x74, 0xe7, 0x88, 0x13, 0x97, 0x99, 0xed, 0xcc, 0xa0, 0xe1, 0x5b, 0xf8, 0xb1, 0xfa, 0xe8, - 0x5b, 0xfb, 0xd8, 0xe8, 0x17, 0x69, 0x76, 0x40, 0x66, 0x41, 0x93, 0xbe, 0x00, 0xbf, 0x3f, 0xe7, - 0x97, 0x73, 0xce, 0x9e, 0x05, 0x0e, 0x53, 0x36, 0x1e, 0xa2, 0xb4, 0x06, 0xf5, 0x95, 0x88, 0x71, - 0x67, 0x1e, 0xa6, 0x5a, 0x59, 0xb5, 0xe3, 0x3e, 0xcd, 0x82, 0xf4, 0xc5, 0x0a, 0xd4, 0xa6, 0xe7, - 0xb4, 0xce, 0x36, 0xac, 0xbe, 0x42, 0x66, 0x47, 0x1a, 0x49, 0x1b, 0xaa, 0x1c, 0x4d, 0xac, 0x45, - 0x6a, 0x85, 0x92, 0x34, 0x68, 0x07, 0xdd, 0x4a, 0x94, 0xa7, 0x3a, 0x7d, 0x68, 0xbc, 0x46, 0x7b, - 0x9a, 0x95, 0x47, 0xf8, 0x6d, 0x84, 0xc6, 0x92, 0x16, 0x80, 0xba, 0x96, 0xa8, 0xf7, 0xe5, 0xb8, - 0xcf, 0xa7, 0x35, 0x39, 0x86, 0xfc, 0x05, 0x2b, 0x89, 0x8a, 0x59, 0x82, 0xb4, 0xe8, 0xb4, 0x29, - 0xea, 0xbc, 0x87, 0xcd, 0x85, 0xa8, 0x13, 0x31, 0x90, 0xc8, 0x09, 0x85, 0xd5, 0x94, 0x8d, 0x13, - 0xc5, 0x26, 0x69, 0xb5, 0xe8, 0x01, 0x92, 0x7f, 0xa1, 0x62, 0xc4, 0x40, 0xba, 0x66, 0x5d, 0x5a, - 0x2d, 0xf2, 0x44, 0xe7, 0x47, 0x09, 0xca, 0x59, 0xdc, 0x21, 0xb3, 0x8c, 0xd4, 0xa1, 0x28, 0x26, - 0xf5, 0x6b, 0x51, 0x51, 0x70, 0x42, 0x60, 0x59, 0xb2, 0xe1, 0x43, 0x0f, 0xee, 0xf7, 0xe2, 0xb8, - 0x4b, 0x8f, 0xc6, 0x25, 0xff, 0x40, 0x59, 0x98, 0xfd, 0xd8, 0x8a, 0x2b, 0xa4, 0xcb, 0xed, 0xa0, - 0x5b, 0x8e, 0x66, 0x38, 0x9b, 0x4b, 0x98, 0x53, 0x34, 0x96, 0x96, 0x9c, 0x32, 0x45, 0xa4, 0x03, - 0x35, 0x61, 0xde, 0x08, 0xce, 0x51, 0x66, 0xdd, 0xd0, 0x15, 0xa7, 0xce, 0x71, 0x64, 0x1b, 0x20, - 0x45, 0x2d, 0x14, 0x3f, 0x1d, 0xa7, 0x48, 0x57, 0xdb, 0x41, 0xb7, 0xbe, 0x5b, 0xed, 0x1d, 0xcf, - 0xa8, 0x28, 0x27, 0x67, 0x6d, 0x4e, 0xd0, 0x07, 0x96, 0x8c, 0x90, 0x96, 0xdd, 0x4c, 0x79, 0x8a, - 0x3c, 0x83, 0x66, 0xaa, 0x45, 0x8c, 0x27, 0x56, 0x8b, 0x14, 0xcf, 0x0c, 0x3f, 0xc8, 0x9e, 0x35, - 0xad, 0x38, 0xe7, 0x53, 0x12, 0x79, 0x0e, 0x9b, 0x4c, 0x8e, 0xdf, 0xb1, 0x21, 0x9a, 0x03, 0x35, - 0x92, 0xb6, 0x2f, 0xe3, 0x64, 0xc4, 0x91, 0x53, 0x70, 0x35, 0x4f, 0x8b, 0x64, 0x0b, 0xc2, 0xa9, - 0x70, 0x24, 0xe4, 0x5b, 0x94, 0x03, 0x7b, 0x41, 0xab, 0xae, 0xe0, 0x11, 0x4f, 0xfe, 0x87, 0xf2, - 0xf9, 0xe4, 0xac, 0x0c, 0xad, 0xb5, 0x97, 0xba, 0xd5, 0xdd, 0x72, 0x6f, 0x7a, 0x67, 0xd1, 0x4c, - 0xc9, 0x16, 0x1c, 0xab, 0x44, 0xe9, 0x13, 0xab, 0xe9, 0x9a, 0xdb, 0xff, 0x0c, 0x93, 0x2e, 0x34, - 0x8c, 0xeb, 0xfa, 0x58, 0x2b, 0x3e, 0x8a, 0x6d, 0x9f, 0xd3, 0xba, 0xb3, 0x2c, 0xd2, 0xde, 0x79, - 0xc4, 0x24, 0x1b, 0xe0, 0x99, 0x4e, 0x68, 0x23, 0xef, 0x9c, 0xd1, 0xee, 0xe1, 0x28, 0xe3, 0x03, - 0x43, 0x67, 0x9b, 0xe3, 0xa6, 0x1e, 0x1f, 0xb5, 0x3e, 0xf3, 0xf8, 0x1c, 0xb7, 0x09, 0xae, 0x95, - 0xe0, 0x3e, 0x8b, 0x38, 0xdf, 0x23, 0x3e, 0xe7, 0xf5, 0x99, 0xcd, 0x39, 0xaf, 0xcf, 0xdd, 0x80, - 0x92, 0x3a, 0x3f, 0x47, 0x4d, 0x37, 0x9c, 0x61, 0x02, 0x3a, 0x7b, 0x10, 0xfa, 0x57, 0xc5, 0xa4, - 0x4a, 0x1a, 0x24, 0xff, 0x41, 0xc9, 0xbd, 0xc5, 0x34, 0x70, 0xcb, 0xad, 0xf4, 0x1e, 0x4e, 0x3f, - 0x9a, 0xf0, 0x5b, 0x37, 0x01, 0x80, 0xbf, 0x28, 0xb2, 0x09, 0xeb, 0x1e, 0x9d, 0xc9, 0x4b, 0xa9, - 0xae, 0x65, 0x58, 0x20, 0x7f, 0x43, 0x33, 0x4f, 0x27, 0x62, 0x28, 0x2c, 0xf2, 0x30, 0x20, 0x04, - 0xea, 0x5e, 0x38, 0x64, 0x63, 0x13, 0x16, 0x49, 0x13, 0x1a, 0x9e, 0xfb, 0x88, 0x78, 0x69, 0xc2, - 0x25, 0xb2, 0x01, 0xa1, 0x27, 0x8f, 0x94, 0xb4, 0x17, 0x26, 0x5c, 0x9e, 0xb7, 0x7e, 0x42, 0xa6, - 0x4d, 0x58, 0x7a, 0xf9, 0xe2, 0xfb, 0x5d, 0x2b, 0xb8, 0xbd, 0x6b, 0x05, 0xbf, 0xee, 0x5a, 0xc1, - 0xcd, 0x7d, 0xab, 0x70, 0x7b, 0xdf, 0x2a, 0xfc, 0xbc, 0x6f, 0x15, 0x3e, 0x77, 0xfe, 0xfc, 0x57, - 0xf6, 0x75, 0xc5, 0x7d, 0xed, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xbe, 0x42, 0x45, 0xf7, - 0x04, 0x00, 0x00, -} - -func (m *Feature) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Feature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Feature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetTiersRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetTiersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTiersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Locale) > 0 { - i -= len(m.Locale) - copy(dAtA[i:], m.Locale) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Locale))) - i-- - dAtA[i] = 0x12 - } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.OwnerAnyId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetTiersRequestSigned) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetTiersRequestSigned) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTiersRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TierData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TierData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TierData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Offer) > 0 { - i -= len(m.Offer) - copy(dAtA[i:], m.Offer) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Offer))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if len(m.AndroidManageUrl) > 0 { - i -= len(m.AndroidManageUrl) - copy(dAtA[i:], m.AndroidManageUrl) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.AndroidManageUrl))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if len(m.AndroidProductId) > 0 { - i -= len(m.AndroidProductId) - copy(dAtA[i:], m.AndroidProductId) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.AndroidProductId))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(m.IosManageUrl) > 0 { - i -= len(m.IosManageUrl) - copy(dAtA[i:], m.IosManageUrl) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.IosManageUrl))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(m.IosProductId) > 0 { - i -= len(m.IosProductId) - copy(dAtA[i:], m.IosProductId) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.IosProductId))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if len(m.StripeManageUrl) > 0 { - i -= len(m.StripeManageUrl) - copy(dAtA[i:], m.StripeManageUrl) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.StripeManageUrl))) - i-- - dAtA[i] = 0x7a - } - if len(m.StripeProductId) > 0 { - i -= len(m.StripeProductId) - copy(dAtA[i:], m.StripeProductId) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.StripeProductId))) - i-- - dAtA[i] = 0x72 - } - if len(m.ColorStr) > 0 { - i -= len(m.ColorStr) - copy(dAtA[i:], m.ColorStr) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.ColorStr))) - i-- - dAtA[i] = 0x6a - } - if len(m.Features) > 0 { - for iNdEx := len(m.Features) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Features[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - } - if m.AnyNameMinLength != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.AnyNameMinLength)) - i-- - dAtA[i] = 0x58 - } - if m.AnyNamesCountIncluded != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.AnyNamesCountIncluded)) - i-- - dAtA[i] = 0x50 - } - if m.PriceStripeUsdCents != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PriceStripeUsdCents)) - i-- - dAtA[i] = 0x48 - } - if m.PeriodValue != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PeriodValue)) - i-- - dAtA[i] = 0x40 - } - if m.PeriodType != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PeriodType)) - i-- - dAtA[i] = 0x38 - } - if m.IsHiddenTier { - i-- - if m.IsHiddenTier { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.IsTest { - i-- - if m.IsTest { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.IsActive { - i-- - if m.IsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetTiersResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetTiersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTiersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Tiers) > 0 { - for iNdEx := len(m.Tiers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tiers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintPaymentserviceTiers(dAtA []byte, offset int, v uint64) int { - offset -= sovPaymentserviceTiers(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Feature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Description) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - return n + Tiers []*TierData `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (m *GetTiersRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OwnerAnyId) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.Locale) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - return n -} - -func (m *GetTiersRequestSigned) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - return n -} - -func (m *TierData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.Id)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - if m.IsActive { - n += 2 - } - if m.IsTest { - n += 2 - } - if m.IsHiddenTier { - n += 2 - } - if m.PeriodType != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.PeriodType)) - } - if m.PeriodValue != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.PeriodValue)) - } - if m.PriceStripeUsdCents != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.PriceStripeUsdCents)) - } - if m.AnyNamesCountIncluded != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.AnyNamesCountIncluded)) - } - if m.AnyNameMinLength != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.AnyNameMinLength)) - } - if len(m.Features) > 0 { - for _, e := range m.Features { - l = e.Size() - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - } - l = len(m.ColorStr) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.StripeProductId) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.StripeManageUrl) - if l > 0 { - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.IosProductId) - if l > 0 { - n += 2 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.IosManageUrl) - if l > 0 { - n += 2 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.AndroidProductId) - if l > 0 { - n += 2 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.AndroidManageUrl) - if l > 0 { - n += 2 + l + sovPaymentserviceTiers(uint64(l)) - } - l = len(m.Offer) - if l > 0 { - n += 2 + l + sovPaymentserviceTiers(uint64(l)) - } - return n +func (x *GetTiersResponse) Reset() { + *x = GetTiersResponse{} + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (m *GetTiersResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Tiers) > 0 { - for _, e := range m.Tiers { - l = e.Size() - n += 1 + l + sovPaymentserviceTiers(uint64(l)) - } - } - return n +func (x *GetTiersResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func sovPaymentserviceTiers(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPaymentserviceTiers(x uint64) (n int) { - return sovPaymentserviceTiers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Feature) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Feature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Feature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*GetTiersResponse) ProtoMessage() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetTiersRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetTiersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetTiersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locale", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Locale = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy +func (x *GetTiersResponse) ProtoReflect() protoreflect.Message { + mi := &file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil + return mi.MessageOf(x) } -func (m *GetTiersRequestSigned) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetTiersRequestSigned: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetTiersRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +// Deprecated: Use GetTiersResponse.ProtoReflect.Descriptor instead. +func (*GetTiersResponse) Descriptor() ([]byte, []int) { + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP(), []int{4} } -func (m *TierData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TierData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TierData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsActive = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsTest", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsTest = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsHiddenTier", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsHiddenTier = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) - } - m.PeriodType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PeriodType |= PeriodType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PeriodValue", wireType) - } - m.PeriodValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PeriodValue |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceStripeUsdCents", wireType) - } - m.PriceStripeUsdCents = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PriceStripeUsdCents |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyNamesCountIncluded", wireType) - } - m.AnyNamesCountIncluded = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AnyNamesCountIncluded |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyNameMinLength", wireType) - } - m.AnyNameMinLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AnyNameMinLength |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Features", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Features = append(m.Features, &Feature{}) - if err := m.Features[len(m.Features)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ColorStr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ColorStr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StripeProductId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StripeProductId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StripeManageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StripeManageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IosProductId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IosProductId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IosManageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IosManageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AndroidProductId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AndroidProductId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AndroidManageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AndroidManageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Offer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Offer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *GetTiersResponse) GetTiers() []*TierData { + if x != nil { + return x.Tiers } return nil } -func (m *GetTiersResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetTiersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetTiersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tiers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tiers = append(m.Tiers, &TierData{}) - if err := m.Tiers[len(m.Tiers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPaymentserviceTiers(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPaymentserviceTiers - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPaymentserviceTiers - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPaymentserviceTiers - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} +var File_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto protoreflect.FileDescriptor + +var file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDesc = string([]byte{ + 0x0a, 0x44, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, + 0x6e, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x41, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x4f, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0xd7, 0x05, 0x0a, 0x08, 0x54, 0x69, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 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, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x69, 0x73, 0x54, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x69, 0x73, 0x54, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x48, 0x69, 0x64, 0x64, + 0x65, 0x6e, 0x54, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, + 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x54, 0x69, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0a, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, + 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x55, 0x73, 0x64, 0x43, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x72, + 0x69, 0x70, 0x65, 0x55, 0x73, 0x64, 0x43, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x61, + 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x61, 0x6e, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x6e, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x69, 0x6e, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x61, 0x6e, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, + 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x08, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x74, 0x72, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x74, 0x72, 0x12, + 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, + 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x72, + 0x69, 0x70, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x55, 0x72, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6f, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6f, 0x73, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6f, 0x73, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, + 0x6f, 0x73, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x61, + 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x6e, 0x64, 0x72, 0x6f, + 0x69, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x22, 0x33, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x54, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, + 0x05, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, + 0x69, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x74, 0x69, 0x65, 0x72, 0x73, 0x2a, 0x90, + 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, + 0x11, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, + 0x70, 0x65, 0x55, 0x6e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x44, 0x61, 0x79, 0x73, 0x10, + 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x57, + 0x65, 0x65, 0x6b, 0x73, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, + 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x59, 0x65, 0x61, 0x72, 0x73, 0x10, + 0x05, 0x42, 0x24, 0x5a, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( - ErrInvalidLengthPaymentserviceTiers = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPaymentserviceTiers = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPaymentserviceTiers = fmt.Errorf("proto: unexpected end of group") + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescOnce sync.Once + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescData []byte ) + +func file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescGZIP() []byte { + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescOnce.Do(func() { + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDesc), len(file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDesc))) + }) + return file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDescData +} + +var file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_goTypes = []any{ + (PeriodType)(0), // 0: PeriodType + (*Feature)(nil), // 1: Feature + (*GetTiersRequest)(nil), // 2: GetTiersRequest + (*GetTiersRequestSigned)(nil), // 3: GetTiersRequestSigned + (*TierData)(nil), // 4: TierData + (*GetTiersResponse)(nil), // 5: GetTiersResponse +} +var file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_depIdxs = []int32{ + 0, // 0: TierData.periodType:type_name -> PeriodType + 1, // 1: TierData.features:type_name -> Feature + 4, // 2: GetTiersResponse.tiers:type_name -> TierData + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_init() } +func file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_init() { + if File_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDesc), len(file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_rawDesc)), + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_goTypes, + DependencyIndexes: file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_depIdxs, + EnumInfos: file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_enumTypes, + MessageInfos: file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_msgTypes, + }.Build() + File_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto = out.File + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_goTypes = nil + file_paymentservice_paymentserviceproto_protos_paymentservice_tiers_proto_depIdxs = nil +} diff --git a/paymentservice/paymentserviceproto/paymentservice_tiers_vtproto.pb.go b/paymentservice/paymentserviceproto/paymentservice_tiers_vtproto.pb.go new file mode 100644 index 000000000..a159d6361 --- /dev/null +++ b/paymentservice/paymentserviceproto/paymentservice_tiers_vtproto.pb.go @@ -0,0 +1,1514 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto + +package paymentserviceproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Feature) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Feature) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Feature) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTiersRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTiersRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetTiersRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Locale) > 0 { + i -= len(m.Locale) + copy(dAtA[i:], m.Locale) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Locale))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTiersRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTiersRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetTiersRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TierData) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TierData) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TierData) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Offer) > 0 { + i -= len(m.Offer) + copy(dAtA[i:], m.Offer) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Offer))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if len(m.AndroidManageUrl) > 0 { + i -= len(m.AndroidManageUrl) + copy(dAtA[i:], m.AndroidManageUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AndroidManageUrl))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if len(m.AndroidProductId) > 0 { + i -= len(m.AndroidProductId) + copy(dAtA[i:], m.AndroidProductId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AndroidProductId))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if len(m.IosManageUrl) > 0 { + i -= len(m.IosManageUrl) + copy(dAtA[i:], m.IosManageUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.IosManageUrl))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if len(m.IosProductId) > 0 { + i -= len(m.IosProductId) + copy(dAtA[i:], m.IosProductId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.IosProductId))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.StripeManageUrl) > 0 { + i -= len(m.StripeManageUrl) + copy(dAtA[i:], m.StripeManageUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StripeManageUrl))) + i-- + dAtA[i] = 0x7a + } + if len(m.StripeProductId) > 0 { + i -= len(m.StripeProductId) + copy(dAtA[i:], m.StripeProductId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StripeProductId))) + i-- + dAtA[i] = 0x72 + } + if len(m.ColorStr) > 0 { + i -= len(m.ColorStr) + copy(dAtA[i:], m.ColorStr) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ColorStr))) + i-- + dAtA[i] = 0x6a + } + if len(m.Features) > 0 { + for iNdEx := len(m.Features) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Features[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + } + if m.AnyNameMinLength != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AnyNameMinLength)) + i-- + dAtA[i] = 0x58 + } + if m.AnyNamesCountIncluded != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AnyNamesCountIncluded)) + i-- + dAtA[i] = 0x50 + } + if m.PriceStripeUsdCents != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PriceStripeUsdCents)) + i-- + dAtA[i] = 0x48 + } + if m.PeriodValue != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PeriodValue)) + i-- + dAtA[i] = 0x40 + } + if m.PeriodType != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PeriodType)) + i-- + dAtA[i] = 0x38 + } + if m.IsHiddenTier { + i-- + if m.IsHiddenTier { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.IsTest { + i-- + if m.IsTest { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.IsActive { + i-- + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetTiersResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTiersResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetTiersResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tiers) > 0 { + for iNdEx := len(m.Tiers) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tiers[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Feature) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Description) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetTiersRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Locale) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetTiersRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TierData) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Id)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsActive { + n += 2 + } + if m.IsTest { + n += 2 + } + if m.IsHiddenTier { + n += 2 + } + if m.PeriodType != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PeriodType)) + } + if m.PeriodValue != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PeriodValue)) + } + if m.PriceStripeUsdCents != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PriceStripeUsdCents)) + } + if m.AnyNamesCountIncluded != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AnyNamesCountIncluded)) + } + if m.AnyNameMinLength != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AnyNameMinLength)) + } + if len(m.Features) > 0 { + for _, e := range m.Features { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ColorStr) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.StripeProductId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.StripeManageUrl) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.IosProductId) + if l > 0 { + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.IosManageUrl) + if l > 0 { + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AndroidProductId) + if l > 0 { + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.AndroidManageUrl) + if l > 0 { + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Offer) + if l > 0 { + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetTiersResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tiers) > 0 { + for _, e := range m.Tiers { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Feature) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Feature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Feature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTiersRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTiersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTiersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Locale", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Locale = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTiersRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTiersRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTiersRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TierData) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TierData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TierData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsActive = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsTest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsTest = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsHiddenTier", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsHiddenTier = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) + } + m.PeriodType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PeriodType |= PeriodType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodValue", wireType) + } + m.PeriodValue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PeriodValue |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceStripeUsdCents", wireType) + } + m.PriceStripeUsdCents = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PriceStripeUsdCents |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyNamesCountIncluded", wireType) + } + m.AnyNamesCountIncluded = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AnyNamesCountIncluded |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyNameMinLength", wireType) + } + m.AnyNameMinLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AnyNameMinLength |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Features", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Features = append(m.Features, &Feature{}) + if err := m.Features[len(m.Features)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ColorStr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ColorStr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StripeProductId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StripeProductId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StripeManageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StripeManageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IosProductId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IosProductId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IosManageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IosManageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AndroidProductId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AndroidProductId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AndroidManageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AndroidManageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Offer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Offer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTiersResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTiersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTiersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tiers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tiers = append(m.Tiers, &TierData{}) + if err := m.Tiers[len(m.Tiers)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/paymentservice/paymentserviceproto/paymentservice_vtproto.pb.go b/paymentservice/paymentserviceproto/paymentservice_vtproto.pb.go new file mode 100644 index 000000000..151abef45 --- /dev/null +++ b/paymentservice/paymentserviceproto/paymentservice_vtproto.pb.go @@ -0,0 +1,4242 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: paymentservice/paymentserviceproto/protos/paymentservice.proto + +package paymentserviceproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *GetSubscriptionRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetSubscriptionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OwnerAnyID) > 0 { + i -= len(m.OwnerAnyID) + copy(dAtA[i:], m.OwnerAnyID) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetSubscriptionRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetSubscriptionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.SubscribeToNewsletter { + i-- + if m.SubscribeToNewsletter { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x42 + } + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x3a + } + if m.PaymentMethod != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PaymentMethod)) + i-- + dAtA[i] = 0x30 + } + if m.IsAutoRenew { + i-- + if m.IsAutoRenew { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.DateEnds != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DateEnds)) + i-- + dAtA[i] = 0x20 + } + if m.DateStarted != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DateStarted)) + i-- + dAtA[i] = 0x18 + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if m.Tier != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BuySubscriptionRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuySubscriptionRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BuySubscriptionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x32 + } + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x2a + } + if m.PaymentMethod != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PaymentMethod)) + i-- + dAtA[i] = 0x20 + } + if m.RequestedTier != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RequestedTier)) + i-- + dAtA[i] = 0x18 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BuySubscriptionRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuySubscriptionRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BuySubscriptionRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BuySubscriptionResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BuySubscriptionResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BuySubscriptionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.BillingID) > 0 { + i -= len(m.BillingID) + copy(dAtA[i:], m.BillingID) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BillingID))) + i-- + dAtA[i] = 0x12 + } + if len(m.PaymentUrl) > 0 { + i -= len(m.PaymentUrl) + copy(dAtA[i:], m.PaymentUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymentUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FinalizeSubscriptionRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FinalizeSubscriptionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FinalizeSubscriptionResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FinalizeSubscriptionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FinalizeSubscriptionRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FinalizeSubscriptionRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionPortalLinkRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSubscriptionPortalLinkResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PortalUrl) > 0 { + i -= len(m.PortalUrl) + copy(dAtA[i:], m.PortalUrl) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PortalUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetVerificationEmailRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetVerificationEmailRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetVerificationEmailRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsOnboardingList { + i-- + if m.IsOnboardingList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.InsiderTipsAndTutorials { + i-- + if m.InsiderTipsAndTutorials { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.SubscribeToNewsletter { + i-- + if m.SubscribeToNewsletter { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Email) > 0 { + i -= len(m.Email) + copy(dAtA[i:], m.Email) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Email))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetVerificationEmailResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetVerificationEmailResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetVerificationEmailResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *GetVerificationEmailRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetVerificationEmailRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetVerificationEmailRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyEmailRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyEmailRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VerifyEmailRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyEmailResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyEmailResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VerifyEmailResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VerifyEmailRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyEmailRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VerifyEmailRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IsNameValidRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IsNameValidRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IsNameValidRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x12 + } + if m.RequestedTier != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RequestedTier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *IsNameValidResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IsNameValidResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IsNameValidResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VerifyAppStoreReceiptRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyAppStoreReceiptRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VerifyAppStoreReceiptRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Receipt) > 0 { + i -= len(m.Receipt) + copy(dAtA[i:], m.Receipt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Receipt))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyAppStoreReceiptRequestSigned) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyAppStoreReceiptRequestSigned) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VerifyAppStoreReceiptRequestSigned) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyAppStoreReceiptResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyAppStoreReceiptResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VerifyAppStoreReceiptResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyID) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetSubscriptionRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetSubscriptionResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tier != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Tier)) + } + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + if m.DateStarted != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DateStarted)) + } + if m.DateEnds != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DateEnds)) + } + if m.IsAutoRenew { + n += 2 + } + if m.PaymentMethod != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PaymentMethod)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.SubscribeToNewsletter { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *BuySubscriptionRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.RequestedTier != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RequestedTier)) + } + if m.PaymentMethod != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PaymentMethod)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BuySubscriptionRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BuySubscriptionResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PaymentUrl) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.BillingID) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *FinalizeSubscriptionRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *FinalizeSubscriptionResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *FinalizeSubscriptionRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetSubscriptionPortalLinkRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetSubscriptionPortalLinkRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetSubscriptionPortalLinkResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortalUrl) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetVerificationEmailRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Email) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.SubscribeToNewsletter { + n += 2 + } + if m.InsiderTipsAndTutorials { + n += 2 + } + if m.IsOnboardingList { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *GetVerificationEmailResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *GetVerificationEmailRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *VerifyEmailRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *VerifyEmailResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *VerifyEmailRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *IsNameValidRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestedTier != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RequestedTier)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *IsNameValidResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *VerifyAppStoreReceiptRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Receipt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *VerifyAppStoreReceiptRequestSigned) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *VerifyAppStoreReceiptResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *GetSubscriptionRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= SubscriptionStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DateStarted", wireType) + } + m.DateStarted = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DateStarted |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DateEnds", wireType) + } + m.DateEnds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DateEnds |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAutoRenew", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAutoRenew = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) + } + m.PaymentMethod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PaymentMethod |= PaymentMethod(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SubscribeToNewsletter = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BuySubscriptionRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuySubscriptionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuySubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) + } + m.RequestedTier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RequestedTier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) + } + m.PaymentMethod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PaymentMethod |= PaymentMethod(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BuySubscriptionRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuySubscriptionRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuySubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BuySubscriptionResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BuySubscriptionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BuySubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymentUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BillingID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BillingID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FinalizeSubscriptionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FinalizeSubscriptionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FinalizeSubscriptionRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortalUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortalUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetVerificationEmailRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetVerificationEmailRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVerificationEmailRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Email = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SubscribeToNewsletter = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InsiderTipsAndTutorials", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.InsiderTipsAndTutorials = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsOnboardingList", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsOnboardingList = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetVerificationEmailResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetVerificationEmailResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVerificationEmailResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetVerificationEmailRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetVerificationEmailRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVerificationEmailRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyEmailRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyEmailRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyEmailRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyEmailResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyEmailResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyEmailResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyEmailRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyEmailRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyEmailRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsNameValidRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IsNameValidRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsNameValidRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) + } + m.RequestedTier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RequestedTier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsNameValidResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IsNameValidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsNameValidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= IsNameValidResponse_Code(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyAppStoreReceiptRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receipt = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyAppStoreReceiptRequestSigned) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyAppStoreReceiptResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyAppStoreReceiptResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyAppStoreReceiptResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto index f4a6f6b45..898e0e7a6 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto @@ -8,7 +8,7 @@ enum PeriodType { PeriodTypeDays = 2; PeriodTypeWeeks = 3; PeriodTypeMonths = 4; - PeriodTypeYears = 5; + PeriodTypeYears = 5; } message Feature { @@ -32,7 +32,7 @@ message GetTiersRequestSigned { message TierData { // this is a unique ID of the tier - // you should hardcode this in your app and provide icon, graphics, etc for each tier + // you should hardcode this in your app and provide icon, graphics, etc for each tier // (even for old/historical/inactive/hidden tiers) uint32 id = 1; // localazied name of the tier @@ -43,7 +43,7 @@ message TierData { // can you buy it (ON ALL PLATFORMS, without clarification)? bool isActive = 4; // is this tier for debugging only? - bool isTest = 5; + bool isTest = 5; // hidden tiers are only visible once user got them bool isHiddenTier = 6; // how long is the period of the subscription @@ -52,7 +52,7 @@ message TierData { uint32 periodValue = 8; // this one is a price we use ONLY on Stripe platform uint32 priceStripeUsdCents = 9; - // number of ANY NS names that this tier includes + // number of ANY NS names that this tier includes // (not counted as a "feature" and not in the features list) uint32 anyNamesCountIncluded = 10; // somename.any - len of 8 diff --git a/protobuf/protobuf.go b/protobuf/protobuf.go new file mode 100644 index 000000000..8c7c5242b --- /dev/null +++ b/protobuf/protobuf.go @@ -0,0 +1,34 @@ +package protobuf + +import ( + "fmt" + "slices" + + "google.golang.org/protobuf/proto" +) + +type Message interface { + SizeVT() (n int) + MarshalVT() (dAtA []byte, err error) + UnmarshalVT(dAtA []byte) error + MarshalToSizedBufferVT(dAtA []byte) (int, error) + proto.Message +} + +func MarshalAppend(buf []byte, pb proto.Message) ([]byte, error) { + if m, ok := pb.(Message); ok { + siz := m.SizeVT() + offset := len(buf) + buf = slices.Grow(buf, offset+siz)[:offset+siz] + return MarshalToSizedBuffer(m, buf, offset) + } + return nil, fmt.Errorf("proto: MarshalAppend not supported by %T", pb) +} + +func MarshalToSizedBuffer(m Message, b []byte, offset int) ([]byte, error) { + _, err := m.MarshalToSizedBufferVT(b[offset:]) + if err != nil { + return nil, err + } + return b, nil +} diff --git a/util/crypto/aes.go b/util/crypto/aes.go index 74fd1ece9..328cc600c 100644 --- a/util/crypto/aes.go +++ b/util/crypto/aes.go @@ -7,7 +7,6 @@ import ( "crypto/subtle" "fmt" "github.com/anyproto/any-sync/util/crypto/cryptoproto" - "github.com/anyproto/protobuf/proto" mbase "github.com/multiformats/go-multibase" ) @@ -65,7 +64,7 @@ func UnmarshallAESKey(k []byte) (*AESKey, error) { // UnmarshallAESKeyProto returns a key by decoding bytes. func UnmarshallAESKeyProto(k []byte) (*AESKey, error) { msg := &cryptoproto.Key{} - err := proto.Unmarshal(k, msg) + err := msg.UnmarshalVT(k) if err != nil { return nil, err } @@ -141,5 +140,5 @@ func (k *AESKey) Marshall() ([]byte, error) { Type: cryptoproto.KeyType_AES, Data: k.raw, } - return msg.Marshal() + return msg.MarshalVT() } diff --git a/util/crypto/cryptoproto/crypto.pb.go b/util/crypto/cryptoproto/crypto.pb.go index bf1d9ccb0..f150f672b 100644 --- a/util/crypto/cryptoproto/crypto.pb.go +++ b/util/crypto/cryptoproto/crypto.pb.go @@ -1,26 +1,25 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: util/crypto/cryptoproto/protos/crypto.proto +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc v5.29.3 +// source: crypto.proto package cryptoproto import ( - fmt "fmt" - proto "github.com/anyproto/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type KeyType int32 @@ -30,363 +29,164 @@ const ( KeyType_AES KeyType = 2 ) -var KeyType_name = map[int32]string{ - 0: "Ed25519Public", - 1: "Ed25519Private", - 2: "AES", -} +// Enum value maps for KeyType. +var ( + KeyType_name = map[int32]string{ + 0: "Ed25519Public", + 1: "Ed25519Private", + 2: "AES", + } + KeyType_value = map[string]int32{ + "Ed25519Public": 0, + "Ed25519Private": 1, + "AES": 2, + } +) -var KeyType_value = map[string]int32{ - "Ed25519Public": 0, - "Ed25519Private": 1, - "AES": 2, +func (x KeyType) Enum() *KeyType { + p := new(KeyType) + *p = x + return p } func (x KeyType) String() string { - return proto.EnumName(KeyType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (KeyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ddfeb19e486561de, []int{0} +func (KeyType) Descriptor() protoreflect.EnumDescriptor { + return file_crypto_proto_enumTypes[0].Descriptor() } -type Key struct { - Type KeyType `protobuf:"varint,1,opt,name=Type,proto3,enum=crypto.KeyType" json:"Type,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` +func (KeyType) Type() protoreflect.EnumType { + return &file_crypto_proto_enumTypes[0] } -func (m *Key) Reset() { *m = Key{} } -func (m *Key) String() string { return proto.CompactTextString(m) } -func (*Key) ProtoMessage() {} -func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_ddfeb19e486561de, []int{0} -} -func (m *Key) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Key.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (x KeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *Key) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) { - b = b[:newLen] - _, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b, nil -} -func (m *Key) XXX_Merge(src proto.Message) { - xxx_messageInfo_Key.Merge(m, src) -} -func (m *Key) XXX_Size() int { - return m.Size() -} -func (m *Key) XXX_DiscardUnknown() { - xxx_messageInfo_Key.DiscardUnknown(m) -} - -var xxx_messageInfo_Key proto.InternalMessageInfo -func (m *Key) GetType() KeyType { - if m != nil { - return m.Type - } - return KeyType_Ed25519Public +// Deprecated: Use KeyType.Descriptor instead. +func (KeyType) EnumDescriptor() ([]byte, []int) { + return file_crypto_proto_rawDescGZIP(), []int{0} } -func (m *Key) GetData() []byte { - if m != nil { - return m.Data - } - return nil +type Key struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type KeyType `protobuf:"varint,1,opt,name=Type,proto3,enum=crypto.KeyType" json:"Type,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func init() { - proto.RegisterEnum("crypto.KeyType", KeyType_name, KeyType_value) - proto.RegisterType((*Key)(nil), "crypto.Key") +func (x *Key) Reset() { + *x = Key{} + mi := &file_crypto_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func init() { - proto.RegisterFile("util/crypto/cryptoproto/protos/crypto.proto", fileDescriptor_ddfeb19e486561de) +func (x *Key) String() string { + return protoimpl.X.MessageStringOf(x) } -var fileDescriptor_ddfeb19e486561de = []byte{ - // 191 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2e, 0x2d, 0xc9, 0xcc, - 0xd1, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0x87, 0x52, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0xfa, 0x60, - 0xb2, 0x18, 0x2a, 0xa4, 0x07, 0xe6, 0x09, 0xb1, 0x41, 0x78, 0x4a, 0x76, 0x5c, 0xcc, 0xde, 0xa9, - 0x95, 0x42, 0xca, 0x5c, 0x2c, 0x21, 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x7c, 0x46, - 0xfc, 0x7a, 0x50, 0xb5, 0xde, 0xa9, 0x95, 0x20, 0xe1, 0x20, 0xb0, 0xa4, 0x90, 0x10, 0x17, 0x8b, - 0x4b, 0x62, 0x49, 0xa2, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x98, 0xad, 0x65, 0xc9, 0xc5, - 0x0e, 0x55, 0x24, 0x24, 0xc8, 0xc5, 0xeb, 0x9a, 0x62, 0x64, 0x6a, 0x6a, 0x68, 0x19, 0x50, 0x9a, - 0x94, 0x93, 0x99, 0x2c, 0xc0, 0x20, 0x24, 0xc4, 0xc5, 0x07, 0x13, 0x2a, 0xca, 0x2c, 0x4b, 0x2c, - 0x49, 0x15, 0x60, 0x14, 0x62, 0xe7, 0x62, 0x76, 0x74, 0x0d, 0x16, 0x60, 0x72, 0x32, 0x3c, 0xf1, - 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, - 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x71, 0x1c, 0x3e, 0x49, 0x62, 0x03, 0x53, - 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x27, 0xb9, 0xba, 0xd8, 0xeb, 0x00, 0x00, 0x00, -} +func (*Key) ProtoMessage() {} -func (m *Key) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *Key) ProtoReflect() protoreflect.Message { + mi := &file_crypto_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil + return mi.MessageOf(x) } -func (m *Key) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// Deprecated: Use Key.ProtoReflect.Descriptor instead. +func (*Key) Descriptor() ([]byte, []int) { + return file_crypto_proto_rawDescGZIP(), []int{0} } -func (m *Key) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintCrypto(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintCrypto(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 +func (x *Key) GetType() KeyType { + if x != nil { + return x.Type } - return len(dAtA) - i, nil + return KeyType_Ed25519Public } -func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { - offset -= sovCrypto(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (x *Key) GetData() []byte { + if x != nil { + return x.Data } - dAtA[offset] = uint8(v) - return base + return nil } -func (m *Key) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovCrypto(uint64(m.Type)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovCrypto(uint64(l)) - } - return n + +var File_crypto_proto protoreflect.FileDescriptor + +var file_crypto_proto_rawDesc = string([]byte{ + 0x0a, 0x0c, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x2a, 0x39, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x45, 0x53, 0x10, + 0x02, 0x42, 0x19, 0x5a, 0x17, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_crypto_proto_rawDescOnce sync.Once + file_crypto_proto_rawDescData []byte +) + +func file_crypto_proto_rawDescGZIP() []byte { + file_crypto_proto_rawDescOnce.Do(func() { + file_crypto_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_crypto_proto_rawDesc), len(file_crypto_proto_rawDesc))) + }) + return file_crypto_proto_rawDescData } -func sovCrypto(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +var file_crypto_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_crypto_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_crypto_proto_goTypes = []any{ + (KeyType)(0), // 0: crypto.KeyType + (*Key)(nil), // 1: crypto.Key } -func sozCrypto(x uint64) (n int) { - return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +var file_crypto_proto_depIdxs = []int32{ + 0, // 0: crypto.Key.Type:type_name -> crypto.KeyType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } -func (m *Key) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCrypto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Key: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCrypto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= KeyType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCrypto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCrypto - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCrypto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCrypto(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCrypto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCrypto(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCrypto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCrypto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCrypto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCrypto - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCrypto - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCrypto - } - if depth == 0 { - return iNdEx, nil - } +func init() { file_crypto_proto_init() } +func file_crypto_proto_init() { + if File_crypto_proto != nil { + return } - return 0, io.ErrUnexpectedEOF + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_crypto_proto_rawDesc), len(file_crypto_proto_rawDesc)), + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_crypto_proto_goTypes, + DependencyIndexes: file_crypto_proto_depIdxs, + EnumInfos: file_crypto_proto_enumTypes, + MessageInfos: file_crypto_proto_msgTypes, + }.Build() + File_crypto_proto = out.File + file_crypto_proto_goTypes = nil + file_crypto_proto_depIdxs = nil } - -var ( - ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCrypto = fmt.Errorf("proto: unexpected end of group") -) diff --git a/util/crypto/cryptoproto/crypto_vtproto.pb.go b/util/crypto/cryptoproto/crypto_vtproto.pb.go new file mode 100644 index 000000000..9dd7f5918 --- /dev/null +++ b/util/crypto/cryptoproto/crypto_vtproto.pb.go @@ -0,0 +1,186 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: (devel) +// source: crypto.proto + +package cryptoproto + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Key) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Key) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Key) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Key) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Key) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Key: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/util/crypto/ed25519.go b/util/crypto/ed25519.go index df86b055e..015a099f4 100644 --- a/util/crypto/ed25519.go +++ b/util/crypto/ed25519.go @@ -9,7 +9,6 @@ import ( "fmt" "github.com/anyproto/any-sync/util/crypto/cryptoproto" "github.com/anyproto/any-sync/util/strkey" - "github.com/anyproto/protobuf/proto" "github.com/libp2p/go-libp2p/core/crypto" "io" "sync" @@ -45,7 +44,7 @@ func NewEd25519PubKey(pubKey ed25519.PublicKey) PubKey { func UnmarshalEd25519PublicKeyProto(bytes []byte) (PubKey, error) { msg := &cryptoproto.Key{} - err := proto.Unmarshal(bytes, msg) + err := msg.UnmarshalVT(bytes) if err != nil { return nil, err } @@ -57,7 +56,7 @@ func UnmarshalEd25519PublicKeyProto(bytes []byte) (PubKey, error) { func UnmarshalEd25519PrivateKeyProto(bytes []byte) (PrivKey, error) { msg := &cryptoproto.Key{} - err := proto.Unmarshal(bytes, msg) + err := msg.UnmarshalVT(bytes) if err != nil { return nil, err } @@ -132,7 +131,7 @@ func (k *Ed25519PrivKey) Marshall() ([]byte, error) { Type: cryptoproto.KeyType_Ed25519Private, Data: k.privKey, } - return msg.Marshal() + return msg.MarshalVT() } // Decrypt decrypts the message @@ -211,7 +210,7 @@ func (k *Ed25519PubKey) Marshall() ([]byte, error) { Type: cryptoproto.KeyType_Ed25519Public, Data: k.pubKey, } - k.marshalled, k.marshallErr = proto.Marshal(msg) + k.marshalled, k.marshallErr = msg.MarshalVT() }) return k.marshalled, k.marshallErr } diff --git a/util/periodicsync/mock_periodicsync/mock_periodicsync.go b/util/periodicsync/mock_periodicsync/mock_periodicsync.go index 4039cda8c..0af9419ff 100644 --- a/util/periodicsync/mock_periodicsync/mock_periodicsync.go +++ b/util/periodicsync/mock_periodicsync/mock_periodicsync.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_periodicsync/mock_periodicsync.go github.com/anyproto/any-sync/util/periodicsync PeriodicSync // + // Package mock_periodicsync is a generated GoMock package. package mock_periodicsync @@ -18,6 +19,7 @@ import ( type MockPeriodicSync struct { ctrl *gomock.Controller recorder *MockPeriodicSyncMockRecorder + isgomock struct{} } // MockPeriodicSyncMockRecorder is the mock recorder for MockPeriodicSync.