From a858e283f64ae6aee57b6c382a7fa8dc0cbfced3 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 17 Jul 2023 16:04:47 +0200 Subject: [PATCH] acl api proto --- .../spacesyncproto/protos/spacesync.proto | 29 + commonspace/spacesyncproto/spacesync.pb.go | 994 ++++++++++++++++-- .../spacesyncproto/spacesync_drpc.pb.go | 82 +- 3 files changed, 1035 insertions(+), 70 deletions(-) diff --git a/commonspace/spacesyncproto/protos/spacesync.proto b/commonspace/spacesyncproto/protos/spacesync.proto index f7f44ae4..939a680c 100644 --- a/commonspace/spacesyncproto/protos/spacesync.proto +++ b/commonspace/spacesyncproto/protos/spacesync.proto @@ -11,6 +11,7 @@ enum ErrCodes { SpaceIsDeleted = 4; PeerIsNotResponsible = 5; ReceiptIsInvalid = 6; + InvalidPayload = 7; ErrorOffset = 100; } @@ -25,6 +26,10 @@ service SpaceSync { rpc ObjectSyncStream(stream ObjectSyncMessage) returns (stream ObjectSyncMessage); // ObjectSync sends object sync message and synchronously gets response message rpc ObjectSync(ObjectSyncMessage) returns (ObjectSyncMessage); + // AclAddRecord adds a new record to acl log. Works only with any-sync-node + rpc AclAddRecord(AclAddRecordRequest) returns (AclAddRecordResponse); + // AclGetRecords gets acl records + rpc AclGetRecords(AclGetRecordsRequest) returns (AclGetRecordsResponse); } // HeadSyncRange presenting a request for one range @@ -157,3 +162,27 @@ message SpaceSubscription { repeated string spaceIds = 1; SpaceSubscriptionAction action = 2; } + +// AclAddRecordRequest contains marshaled consensusproto.RawRecord +message AclAddRecordRequest { + string spaceId = 1; + bytes payload = 2; +} + +// AclAddRecordResponse contains created record id and marshaled consensusproto.RawRecord +message AclAddRecordResponse { + string recordId = 1; + bytes payload = 2; +} + +// AclGetRecordsRequest can optionally contain the last known aclHeal, 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. +message AclGetRecordsRequest { + string spaceId = 1; + string aclHead = 2; +} + +// AclGetRecordsResponse contains list of marshaled consensusproto.RawRecordWithId +message AclGetRecordsResponse { + repeated bytes records = 1; +} \ No newline at end of file diff --git a/commonspace/spacesyncproto/spacesync.pb.go b/commonspace/spacesyncproto/spacesync.pb.go index 80571bf6..1c8e6799 100644 --- a/commonspace/spacesyncproto/spacesync.pb.go +++ b/commonspace/spacesyncproto/spacesync.pb.go @@ -32,6 +32,7 @@ const ( ErrCodes_SpaceIsDeleted ErrCodes = 4 ErrCodes_PeerIsNotResponsible ErrCodes = 5 ErrCodes_ReceiptIsInvalid ErrCodes = 6 + ErrCodes_InvalidPayload ErrCodes = 7 ErrCodes_ErrorOffset ErrCodes = 100 ) @@ -43,6 +44,7 @@ var ErrCodes_name = map[int32]string{ 4: "SpaceIsDeleted", 5: "PeerIsNotResponsible", 6: "ReceiptIsInvalid", + 7: "InvalidPayload", 100: "ErrorOffset", } @@ -54,6 +56,7 @@ var ErrCodes_value = map[string]int32{ "SpaceIsDeleted": 4, "PeerIsNotResponsible": 5, "ReceiptIsInvalid": 6, + "InvalidPayload": 7, "ErrorOffset": 100, } @@ -1224,6 +1227,211 @@ func (m *SpaceSubscription) GetAction() SpaceSubscriptionAction { 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"` +} + +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{20} +} +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_Merge(src proto.Message) { + xxx_messageInfo_AclAddRecordRequest.Merge(m, src) +} +func (m *AclAddRecordRequest) XXX_Size() int { + return m.Size() +} +func (m *AclAddRecordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AclAddRecordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AclAddRecordRequest proto.InternalMessageInfo + +func (m *AclAddRecordRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +func (m *AclAddRecordRequest) GetPayload() []byte { + if m != nil { + return m.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"` +} + +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{21} +} +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_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 (m *AclAddRecordResponse) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +// AclGetRecordsRequest can optionally contain the last known aclHeal, 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 (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{22} +} +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_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) +} + +var xxx_messageInfo_AclGetRecordsRequest proto.InternalMessageInfo + +func (m *AclGetRecordsRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +func (m *AclGetRecordsRequest) GetAclHead() string { + if m != nil { + return m.AclHead + } + return "" +} + +// AclGetRecordsResponse contains list of marshaled consensusproto.RawRecordWithId +type AclGetRecordsResponse struct { + Records [][]byte `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` +} + +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{23} +} +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_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 init() { proto.RegisterEnum("spacesync.ErrCodes", ErrCodes_name, ErrCodes_value) proto.RegisterEnum("spacesync.SpaceSubscriptionAction", SpaceSubscriptionAction_name, SpaceSubscriptionAction_value) @@ -1247,6 +1455,10 @@ func init() { 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") } func init() { @@ -1254,75 +1466,82 @@ func init() { } var fileDescriptor_80e49f1f4ac27799 = []byte{ - // 1083 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0xe9, 0x5f, 0x8d, 0x65, 0x85, 0xd9, 0x28, 0x89, 0xaa, 0x18, 0x8a, 0xb0, 0x28, 0x0a, - 0x23, 0x07, 0x27, 0xb1, 0x8b, 0x02, 0x49, 0xdb, 0x43, 0x62, 0x3b, 0x35, 0x51, 0x24, 0x36, 0x56, - 0x0d, 0x0a, 0x14, 0xc8, 0x61, 0x4d, 0x8e, 0x2d, 0xb6, 0x14, 0xc9, 0x72, 0x57, 0x89, 0x75, 0xec, - 0xa9, 0xd7, 0x9e, 0xdb, 0x07, 0xe8, 0xab, 0xf4, 0x98, 0xde, 0x7a, 0x2c, 0xec, 0xf7, 0x28, 0x8a, - 0x5d, 0x2e, 0x7f, 0x64, 0x51, 0x01, 0x8a, 0x5e, 0xa4, 0xdd, 0x6f, 0x66, 0xbe, 0xf9, 0xdb, 0xdd, - 0x21, 0x3c, 0xf6, 0xe2, 0xf1, 0x38, 0x8e, 0x44, 0xc2, 0x3d, 0x7c, 0xa8, 0x7f, 0xc5, 0x34, 0xf2, - 0x92, 0x34, 0x96, 0xf1, 0x43, 0xfd, 0x2b, 0x4a, 0x74, 0x47, 0x03, 0xa4, 0x59, 0x00, 0xd4, 0x85, - 0xcd, 0x23, 0xe4, 0xfe, 0x70, 0x1a, 0x79, 0x8c, 0x47, 0xe7, 0x48, 0x08, 0x2c, 0x9f, 0xa5, 0xf1, - 0xb8, 0x6b, 0x0d, 0xac, 0xed, 0x65, 0x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, 0xa8, 0xa4, 0xa4, 0xce, 0x45, 0xa0, 0x1b, 0x24, 0xa7, 0xe6, 0xaa, 0x17, 0x7b, - 0x75, 0x0a, 0x65, 0x30, 0x46, 0x21, 0xf9, 0x38, 0xd1, 0xa9, 0x2d, 0xb1, 0x12, 0x50, 0x52, 0xed, - 0xe3, 0x9b, 0x69, 0x82, 0x26, 0xad, 0x12, 0x20, 0x9f, 0x40, 0x5b, 0x1d, 0xca, 0xc0, 0xe3, 0x32, - 0x88, 0xa3, 0xaf, 0x71, 0xaa, 0xb3, 0x59, 0x66, 0xd7, 0x50, 0x75, 0xab, 0x05, 0x62, 0x16, 0x75, - 0x8b, 0xe9, 0x35, 0xd9, 0x01, 0x52, 0x29, 0x71, 0x5e, 0x8d, 0x55, 0xad, 0x51, 0x23, 0xa1, 0x27, - 0xd0, 0x9e, 0x6d, 0x14, 0x19, 0xcc, 0x37, 0xb6, 0x35, 0xdb, 0x37, 0x15, 0x7d, 0x70, 0x1e, 0x71, - 0x39, 0x49, 0xd1, 0xb4, 0xad, 0x04, 0xe8, 0x01, 0x74, 0xea, 0x5a, 0xaf, 0xef, 0x25, 0x7f, 0x37, - 0xc3, 0x5a, 0x02, 0xe6, 0xdc, 0xda, 0xc5, 0xb9, 0xfd, 0xd5, 0x82, 0xce, 0xb0, 0xda, 0x86, 0xfd, - 0x38, 0x92, 0xea, 0x69, 0xfb, 0x12, 0x5a, 0xd9, 0xe5, 0x3b, 0xc0, 0x10, 0x25, 0xd6, 0x1c, 0xe0, - 0xe3, 0x8a, 0xf8, 0xa8, 0xc1, 0x66, 0xd4, 0xc9, 0x53, 0x93, 0x9d, 0xb1, 0xb6, 0xb5, 0xf5, 0x9d, - 0xeb, 0xc7, 0xbf, 0x30, 0xae, 0x2a, 0x3f, 0x5f, 0x83, 0x95, 0xb7, 0x3c, 0x9c, 0x20, 0xed, 0x43, - 0xab, 0xea, 0x64, 0xee, 0xd2, 0xed, 0x99, 0x73, 0x62, 0xc4, 0x1f, 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, 0x57, 0xea, 0xe9, 0xaa, 0xfe, 0xdb, 0xfb, 0x37, 0x00, - 0x00, 0xff, 0xff, 0xb6, 0xe1, 0x84, 0x46, 0xca, 0x0a, 0x00, 0x00, + // 1197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf7, 0x3a, 0xce, 0x8b, 0x9f, 0x6c, 0xdc, 0xed, 0xc4, 0x69, 0xfd, 0x77, 0x23, 0xc7, 0x1a, + 0xfd, 0x85, 0xa2, 0x1e, 0xd2, 0x26, 0x41, 0x48, 0x2d, 0x70, 0x48, 0x93, 0xb4, 0x59, 0xa0, 0x4d, + 0x34, 0xa6, 0x42, 0x42, 0xea, 0x61, 0xb2, 0x3b, 0x89, 0x17, 0xd6, 0xbb, 0xcb, 0xce, 0xb8, 0x8d, + 0x8f, 0x9c, 0xb8, 0x72, 0x86, 0x23, 0x1f, 0x83, 0x2f, 0xc0, 0xb1, 0xdc, 0x38, 0xa2, 0xe4, 0x8b, + 0xa0, 0x99, 0x9d, 0x7d, 0xb3, 0xd7, 0x01, 0xc4, 0xc5, 0xd9, 0xe7, 0xed, 0xf7, 0xbc, 0xce, 0x3c, + 0x13, 0xd8, 0x75, 0xc2, 0xd1, 0x28, 0x0c, 0x78, 0x44, 0x1d, 0xf6, 0x48, 0xfd, 0xf2, 0x49, 0xe0, + 0x44, 0x71, 0x28, 0xc2, 0x47, 0xea, 0x97, 0xe7, 0xdc, 0x1d, 0xc5, 0x40, 0xcd, 0x8c, 0x81, 0x6d, + 0x58, 0x3b, 0x61, 0xd4, 0x1d, 0x4c, 0x02, 0x87, 0xd0, 0xe0, 0x92, 0x21, 0x04, 0x8d, 0x8b, 0x38, + 0x1c, 0x75, 0x8c, 0xbe, 0xb1, 0xdd, 0x20, 0xea, 0x1b, 0xb5, 0xa0, 0x2e, 0xc2, 0x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0x37, + 0xab, 0x85, 0x33, 0x38, 0xbe, 0x5f, 0x85, 0x93, 0x6d, 0xf9, 0x2a, 0x9c, 0xc2, 0x7a, 0x27, 0x60, + 0xe5, 0x0f, 0xa6, 0x81, 0x88, 0x19, 0x1d, 0xa1, 0xcd, 0x99, 0x0b, 0xb2, 0xf0, 0x9a, 0xea, 0xde, + 0x2a, 0xdd, 0x36, 0x1e, 0x1b, 0xe8, 0x04, 0x20, 0x17, 0xfc, 0x17, 0x34, 0x74, 0x0a, 0x66, 0xf1, + 0x18, 0xa1, 0x5e, 0x41, 0xbb, 0xe2, 0xa8, 0x76, 0xb7, 0xe6, 0xca, 0xb3, 0x74, 0xd7, 0x4a, 0xd3, + 0x8f, 0xa6, 0x2c, 0x66, 0xce, 0x58, 0xb7, 0x3f, 0x5f, 0x21, 0xc1, 0x7c, 0xf6, 0xe1, 0x6f, 0xd7, + 0x3d, 0xe3, 0xfd, 0x75, 0xcf, 0xf8, 0xf3, 0xba, 0x67, 0xfc, 0x78, 0xd3, 0xab, 0xbd, 0xbf, 0xe9, + 0xd5, 0xfe, 0xb8, 0xe9, 0xd5, 0xbe, 0xee, 0xce, 0xff, 0xb7, 0xe3, 0x7c, 0x49, 0xfd, 0xd9, 0xff, + 0x2b, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xc2, 0xb9, 0x8a, 0x9b, 0x0c, 0x00, 0x00, } func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) { @@ -2175,6 +2394,149 @@ func (m *SpaceSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 encodeVarintSpacesync(dAtA []byte, offset int, v uint64) int { offset -= sovSpacesync(v) base := offset @@ -2570,6 +2932,72 @@ func (m *SpaceSubscription) Size() (n int) { 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 sovSpacesync(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4977,6 +5405,434 @@ func (m *SpaceSubscription) Unmarshal(dAtA []byte) error { } 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 skipSpacesync(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/commonspace/spacesyncproto/spacesync_drpc.pb.go b/commonspace/spacesyncproto/spacesync_drpc.pb.go index 11e5d715..35109d28 100644 --- a/commonspace/spacesyncproto/spacesync_drpc.pb.go +++ b/commonspace/spacesyncproto/spacesync_drpc.pb.go @@ -45,6 +45,8 @@ type DRPCSpaceSyncClient interface { SpacePull(ctx context.Context, in *SpacePullRequest) (*SpacePullResponse, error) ObjectSyncStream(ctx context.Context) (DRPCSpaceSync_ObjectSyncStreamClient, error) ObjectSync(ctx context.Context, in *ObjectSyncMessage) (*ObjectSyncMessage, error) + AclAddRecord(ctx context.Context, in *AclAddRecordRequest) (*AclAddRecordResponse, error) + AclGetRecords(ctx context.Context, in *AclGetRecordsRequest) (*AclGetRecordsResponse, error) } type drpcSpaceSyncClient struct { @@ -132,12 +134,32 @@ func (c *drpcSpaceSyncClient) ObjectSync(ctx context.Context, in *ObjectSyncMess return out, nil } +func (c *drpcSpaceSyncClient) AclAddRecord(ctx context.Context, in *AclAddRecordRequest) (*AclAddRecordResponse, error) { + out := new(AclAddRecordResponse) + err := c.cc.Invoke(ctx, "/spacesync.SpaceSync/AclAddRecord", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcSpaceSyncClient) AclGetRecords(ctx context.Context, in *AclGetRecordsRequest) (*AclGetRecordsResponse, error) { + out := new(AclGetRecordsResponse) + err := c.cc.Invoke(ctx, "/spacesync.SpaceSync/AclGetRecords", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCSpaceSyncServer interface { HeadSync(context.Context, *HeadSyncRequest) (*HeadSyncResponse, error) SpacePush(context.Context, *SpacePushRequest) (*SpacePushResponse, error) SpacePull(context.Context, *SpacePullRequest) (*SpacePullResponse, error) ObjectSyncStream(DRPCSpaceSync_ObjectSyncStreamStream) error ObjectSync(context.Context, *ObjectSyncMessage) (*ObjectSyncMessage, error) + AclAddRecord(context.Context, *AclAddRecordRequest) (*AclAddRecordResponse, error) + AclGetRecords(context.Context, *AclGetRecordsRequest) (*AclGetRecordsResponse, error) } type DRPCSpaceSyncUnimplementedServer struct{} @@ -162,9 +184,17 @@ func (s *DRPCSpaceSyncUnimplementedServer) ObjectSync(context.Context, *ObjectSy return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCSpaceSyncUnimplementedServer) AclAddRecord(context.Context, *AclAddRecordRequest) (*AclAddRecordResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCSpaceSyncUnimplementedServer) AclGetRecords(context.Context, *AclGetRecordsRequest) (*AclGetRecordsResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCSpaceSyncDescription struct{} -func (DRPCSpaceSyncDescription) NumMethods() int { return 5 } +func (DRPCSpaceSyncDescription) NumMethods() int { return 7 } func (DRPCSpaceSyncDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -212,6 +242,24 @@ func (DRPCSpaceSyncDescription) Method(n int) (string, drpc.Encoding, drpc.Recei in1.(*ObjectSyncMessage), ) }, DRPCSpaceSyncServer.ObjectSync, true + case 5: + return "/spacesync.SpaceSync/AclAddRecord", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCSpaceSyncServer). + AclAddRecord( + ctx, + in1.(*AclAddRecordRequest), + ) + }, DRPCSpaceSyncServer.AclAddRecord, true + case 6: + return "/spacesync.SpaceSync/AclGetRecords", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCSpaceSyncServer). + AclGetRecords( + ctx, + in1.(*AclGetRecordsRequest), + ) + }, DRPCSpaceSyncServer.AclGetRecords, true default: return "", nil, nil, nil, false } @@ -310,3 +358,35 @@ func (x *drpcSpaceSync_ObjectSyncStream) SendAndClose(m *ObjectSyncMessage) erro } return x.CloseSend() } + +type DRPCSpaceSync_AclAddRecordStream interface { + drpc.Stream + SendAndClose(*AclAddRecordResponse) error +} + +type drpcSpaceSync_AclAddRecordStream struct { + drpc.Stream +} + +func (x *drpcSpaceSync_AclAddRecordStream) SendAndClose(m *AclAddRecordResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCSpaceSync_AclGetRecordsStream interface { + drpc.Stream + SendAndClose(*AclGetRecordsResponse) error +} + +type drpcSpaceSync_AclGetRecordsStream struct { + drpc.Stream +} + +func (x *drpcSpaceSync_AclGetRecordsStream) SendAndClose(m *AclGetRecordsResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { + return err + } + return x.CloseSend() +}