diff --git a/go.mod b/go.mod index 61ad4841..e27f9d45 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/fogleman/gg v1.3.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/klauspost/cpuid/v2 v2.0.12 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/libp2p/go-openssl v0.0.7 // indirect @@ -52,6 +53,7 @@ require ( golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect lukechampine.com/blake3 v1.1.6 // indirect diff --git a/go.sum b/go.sum index 3aecda9c..84667305 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 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.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= @@ -178,6 +182,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= diff --git a/pkg/acl/aclchanges/aclpb/aclchanges.pb.go b/pkg/acl/aclchanges/aclpb/aclchanges.pb.go index 4a892fdf..d42f22ba 100644 --- a/pkg/acl/aclchanges/aclpb/aclchanges.pb.go +++ b/pkg/acl/aclchanges/aclpb/aclchanges.pb.go @@ -22,34 +22,34 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ACLChangeUserPermissions int32 +type ACLChange_UserPermissions int32 const ( - ACLChange_Admin ACLChangeUserPermissions = 0 - ACLChange_Writer ACLChangeUserPermissions = 1 - ACLChange_Reader ACLChangeUserPermissions = 2 - ACLChange_Removed ACLChangeUserPermissions = 3 + ACLChange_Admin ACLChange_UserPermissions = 0 + ACLChange_Writer ACLChange_UserPermissions = 1 + ACLChange_Reader ACLChange_UserPermissions = 2 + ACLChange_Removed ACLChange_UserPermissions = 3 ) -var ACLChangeUserPermissions_name = map[int32]string{ +var ACLChange_UserPermissions_name = map[int32]string{ 0: "Admin", 1: "Writer", 2: "Reader", 3: "Removed", } -var ACLChangeUserPermissions_value = map[string]int32{ +var ACLChange_UserPermissions_value = map[string]int32{ "Admin": 0, "Writer": 1, "Reader": 2, "Removed": 3, } -func (x ACLChangeUserPermissions) String() string { - return proto.EnumName(ACLChangeUserPermissions_name, int32(x)) +func (x ACLChange_UserPermissions) String() string { + return proto.EnumName(ACLChange_UserPermissions_name, int32(x)) } -func (ACLChangeUserPermissions) EnumDescriptor() ([]byte, []int) { +func (ACLChange_UserPermissions) EnumDescriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 0} } @@ -115,10 +115,10 @@ func (m *RawChange) GetId() string { // the element of change tree used to store and internal apply smartBlock history type ACLChange struct { - TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"` - AclHeadIds []string `protobuf:"bytes,2,rep,name=aclHeadIds,proto3" json:"aclHeadIds,omitempty"` - SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"` - AclData *ACLChangeACLData `protobuf:"bytes,4,opt,name=aclData,proto3" json:"aclData,omitempty"` + TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"` + AclHeadIds []string `protobuf:"bytes,2,rep,name=aclHeadIds,proto3" json:"aclHeadIds,omitempty"` + SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"` + AclData *ACLChange_ACLData `protobuf:"bytes,4,opt,name=aclData,proto3" json:"aclData,omitempty"` // the data is encoded with read key and should be read in ChangesData format ChangesData []byte `protobuf:"bytes,5,opt,name=changesData,proto3" json:"changesData,omitempty"` CurrentReadKeyHash uint64 `protobuf:"varint,6,opt,name=currentReadKeyHash,proto3" json:"currentReadKeyHash,omitempty"` @@ -180,7 +180,7 @@ func (m *ACLChange) GetSnapshotBaseId() string { return "" } -func (m *ACLChange) GetAclData() *ACLChangeACLData { +func (m *ACLChange) GetAclData() *ACLChange_ACLData { if m != nil { return m.AclData } @@ -215,29 +215,30 @@ func (m *ACLChange) GetIdentity() string { return "" } -type ACLChangeACLContentValue struct { +type ACLChange_ACLContentValue struct { // Types that are valid to be assigned to Value: - // *ACLChangeACLContentValueValueOfUserAdd - // *ACLChangeACLContentValueValueOfUserRemove - // *ACLChangeACLContentValueValueOfUserPermissionChange - // *ACLChangeACLContentValueValueOfUserInvite - // *ACLChangeACLContentValueValueOfUserJoin - // *ACLChangeACLContentValueValueOfUserConfirm - Value IsACLChangeACLContentValueValue `protobuf_oneof:"value"` + // + // *ACLChange_ACLContent_Value_UserAdd + // *ACLChange_ACLContent_Value_UserRemove + // *ACLChange_ACLContent_Value_UserPermissionChange + // *ACLChange_ACLContent_Value_UserInvite + // *ACLChange_ACLContent_Value_UserJoin + // *ACLChange_ACLContent_Value_UserConfirm + Value isACLChange_ACLContent_Value_Value `protobuf_oneof:"value"` } -func (m *ACLChangeACLContentValue) Reset() { *m = ACLChangeACLContentValue{} } -func (m *ACLChangeACLContentValue) String() string { return proto.CompactTextString(m) } -func (*ACLChangeACLContentValue) ProtoMessage() {} -func (*ACLChangeACLContentValue) Descriptor() ([]byte, []int) { +func (m *ACLChange_ACLContentValue) Reset() { *m = ACLChange_ACLContentValue{} } +func (m *ACLChange_ACLContentValue) String() string { return proto.CompactTextString(m) } +func (*ACLChange_ACLContentValue) ProtoMessage() {} +func (*ACLChange_ACLContentValue) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 0} } -func (m *ACLChangeACLContentValue) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_ACLContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeACLContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_ACLContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeACLContentValue.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_ACLContentValue.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -247,128 +248,128 @@ func (m *ACLChangeACLContentValue) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *ACLChangeACLContentValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeACLContentValue.Merge(m, src) +func (m *ACLChange_ACLContentValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_ACLContentValue.Merge(m, src) } -func (m *ACLChangeACLContentValue) XXX_Size() int { +func (m *ACLChange_ACLContentValue) XXX_Size() int { return m.Size() } -func (m *ACLChangeACLContentValue) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeACLContentValue.DiscardUnknown(m) +func (m *ACLChange_ACLContentValue) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_ACLContentValue.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeACLContentValue proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_ACLContentValue proto.InternalMessageInfo -type IsACLChangeACLContentValueValue interface { - IsACLChangeACLContentValueValue() +type isACLChange_ACLContent_Value_Value interface { + isACLChange_ACLContent_Value_Value() MarshalTo([]byte) (int, error) Size() int } -type ACLChangeACLContentValueValueOfUserAdd struct { - UserAdd *ACLChangeUserAdd `protobuf:"bytes,1,opt,name=userAdd,proto3,oneof" json:"userAdd,omitempty"` +type ACLChange_ACLContent_Value_UserAdd struct { + UserAdd *ACLChange_UserAdd `protobuf:"bytes,1,opt,name=userAdd,proto3,oneof" json:"userAdd,omitempty"` } -type ACLChangeACLContentValueValueOfUserRemove struct { - UserRemove *ACLChangeUserRemove `protobuf:"bytes,2,opt,name=userRemove,proto3,oneof" json:"userRemove,omitempty"` +type ACLChange_ACLContent_Value_UserRemove struct { + UserRemove *ACLChange_UserRemove `protobuf:"bytes,2,opt,name=userRemove,proto3,oneof" json:"userRemove,omitempty"` } -type ACLChangeACLContentValueValueOfUserPermissionChange struct { - UserPermissionChange *ACLChangeUserPermissionChange `protobuf:"bytes,3,opt,name=userPermissionChange,proto3,oneof" json:"userPermissionChange,omitempty"` +type ACLChange_ACLContent_Value_UserPermissionChange struct { + UserPermissionChange *ACLChange_UserPermissionChange `protobuf:"bytes,3,opt,name=userPermissionChange,proto3,oneof" json:"userPermissionChange,omitempty"` } -type ACLChangeACLContentValueValueOfUserInvite struct { - UserInvite *ACLChangeUserInvite `protobuf:"bytes,4,opt,name=userInvite,proto3,oneof" json:"userInvite,omitempty"` +type ACLChange_ACLContent_Value_UserInvite struct { + UserInvite *ACLChange_UserInvite `protobuf:"bytes,4,opt,name=userInvite,proto3,oneof" json:"userInvite,omitempty"` } -type ACLChangeACLContentValueValueOfUserJoin struct { - UserJoin *ACLChangeUserJoin `protobuf:"bytes,5,opt,name=userJoin,proto3,oneof" json:"userJoin,omitempty"` +type ACLChange_ACLContent_Value_UserJoin struct { + UserJoin *ACLChange_UserJoin `protobuf:"bytes,5,opt,name=userJoin,proto3,oneof" json:"userJoin,omitempty"` } -type ACLChangeACLContentValueValueOfUserConfirm struct { - UserConfirm *ACLChangeUserConfirm `protobuf:"bytes,6,opt,name=userConfirm,proto3,oneof" json:"userConfirm,omitempty"` +type ACLChange_ACLContent_Value_UserConfirm struct { + UserConfirm *ACLChange_UserConfirm `protobuf:"bytes,6,opt,name=userConfirm,proto3,oneof" json:"userConfirm,omitempty"` } -func (*ACLChangeACLContentValueValueOfUserAdd) IsACLChangeACLContentValueValue() {} -func (*ACLChangeACLContentValueValueOfUserRemove) IsACLChangeACLContentValueValue() {} -func (*ACLChangeACLContentValueValueOfUserPermissionChange) IsACLChangeACLContentValueValue() {} -func (*ACLChangeACLContentValueValueOfUserInvite) IsACLChangeACLContentValueValue() {} -func (*ACLChangeACLContentValueValueOfUserJoin) IsACLChangeACLContentValueValue() {} -func (*ACLChangeACLContentValueValueOfUserConfirm) IsACLChangeACLContentValueValue() {} +func (*ACLChange_ACLContent_Value_UserAdd) isACLChange_ACLContent_Value_Value() {} +func (*ACLChange_ACLContent_Value_UserRemove) isACLChange_ACLContent_Value_Value() {} +func (*ACLChange_ACLContent_Value_UserPermissionChange) isACLChange_ACLContent_Value_Value() {} +func (*ACLChange_ACLContent_Value_UserInvite) isACLChange_ACLContent_Value_Value() {} +func (*ACLChange_ACLContent_Value_UserJoin) isACLChange_ACLContent_Value_Value() {} +func (*ACLChange_ACLContent_Value_UserConfirm) isACLChange_ACLContent_Value_Value() {} -func (m *ACLChangeACLContentValue) GetValue() IsACLChangeACLContentValueValue { +func (m *ACLChange_ACLContentValue) GetValue() isACLChange_ACLContent_Value_Value { if m != nil { return m.Value } return nil } -func (m *ACLChangeACLContentValue) GetUserAdd() *ACLChangeUserAdd { - if x, ok := m.GetValue().(*ACLChangeACLContentValueValueOfUserAdd); ok { +func (m *ACLChange_ACLContentValue) GetUserAdd() *ACLChange_UserAdd { + if x, ok := m.GetValue().(*ACLChange_ACLContent_Value_UserAdd); ok { return x.UserAdd } return nil } -func (m *ACLChangeACLContentValue) GetUserRemove() *ACLChangeUserRemove { - if x, ok := m.GetValue().(*ACLChangeACLContentValueValueOfUserRemove); ok { +func (m *ACLChange_ACLContentValue) GetUserRemove() *ACLChange_UserRemove { + if x, ok := m.GetValue().(*ACLChange_ACLContent_Value_UserRemove); ok { return x.UserRemove } return nil } -func (m *ACLChangeACLContentValue) GetUserPermissionChange() *ACLChangeUserPermissionChange { - if x, ok := m.GetValue().(*ACLChangeACLContentValueValueOfUserPermissionChange); ok { +func (m *ACLChange_ACLContentValue) GetUserPermissionChange() *ACLChange_UserPermissionChange { + if x, ok := m.GetValue().(*ACLChange_ACLContent_Value_UserPermissionChange); ok { return x.UserPermissionChange } return nil } -func (m *ACLChangeACLContentValue) GetUserInvite() *ACLChangeUserInvite { - if x, ok := m.GetValue().(*ACLChangeACLContentValueValueOfUserInvite); ok { +func (m *ACLChange_ACLContentValue) GetUserInvite() *ACLChange_UserInvite { + if x, ok := m.GetValue().(*ACLChange_ACLContent_Value_UserInvite); ok { return x.UserInvite } return nil } -func (m *ACLChangeACLContentValue) GetUserJoin() *ACLChangeUserJoin { - if x, ok := m.GetValue().(*ACLChangeACLContentValueValueOfUserJoin); ok { +func (m *ACLChange_ACLContentValue) GetUserJoin() *ACLChange_UserJoin { + if x, ok := m.GetValue().(*ACLChange_ACLContent_Value_UserJoin); ok { return x.UserJoin } return nil } -func (m *ACLChangeACLContentValue) GetUserConfirm() *ACLChangeUserConfirm { - if x, ok := m.GetValue().(*ACLChangeACLContentValueValueOfUserConfirm); ok { +func (m *ACLChange_ACLContentValue) GetUserConfirm() *ACLChange_UserConfirm { + if x, ok := m.GetValue().(*ACLChange_ACLContent_Value_UserConfirm); ok { return x.UserConfirm } return nil } // XXX_OneofWrappers is for the internal use of the proto package. -func (*ACLChangeACLContentValue) XXX_OneofWrappers() []interface{} { +func (*ACLChange_ACLContentValue) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*ACLChangeACLContentValueValueOfUserAdd)(nil), - (*ACLChangeACLContentValueValueOfUserRemove)(nil), - (*ACLChangeACLContentValueValueOfUserPermissionChange)(nil), - (*ACLChangeACLContentValueValueOfUserInvite)(nil), - (*ACLChangeACLContentValueValueOfUserJoin)(nil), - (*ACLChangeACLContentValueValueOfUserConfirm)(nil), + (*ACLChange_ACLContent_Value_UserAdd)(nil), + (*ACLChange_ACLContent_Value_UserRemove)(nil), + (*ACLChange_ACLContent_Value_UserPermissionChange)(nil), + (*ACLChange_ACLContent_Value_UserInvite)(nil), + (*ACLChange_ACLContent_Value_UserJoin)(nil), + (*ACLChange_ACLContent_Value_UserConfirm)(nil), } } -type ACLChangeACLData struct { - AclSnapshot *ACLChangeACLSnapshot `protobuf:"bytes,1,opt,name=aclSnapshot,proto3" json:"aclSnapshot,omitempty"` - AclContent []*ACLChangeACLContentValue `protobuf:"bytes,2,rep,name=aclContent,proto3" json:"aclContent,omitempty"` +type ACLChange_ACLData struct { + AclSnapshot *ACLChange_ACLSnapshot `protobuf:"bytes,1,opt,name=aclSnapshot,proto3" json:"aclSnapshot,omitempty"` + AclContent []*ACLChange_ACLContentValue `protobuf:"bytes,2,rep,name=aclContent,proto3" json:"aclContent,omitempty"` } -func (m *ACLChangeACLData) Reset() { *m = ACLChangeACLData{} } -func (m *ACLChangeACLData) String() string { return proto.CompactTextString(m) } -func (*ACLChangeACLData) ProtoMessage() {} -func (*ACLChangeACLData) Descriptor() ([]byte, []int) { +func (m *ACLChange_ACLData) Reset() { *m = ACLChange_ACLData{} } +func (m *ACLChange_ACLData) String() string { return proto.CompactTextString(m) } +func (*ACLChange_ACLData) ProtoMessage() {} +func (*ACLChange_ACLData) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 1} } -func (m *ACLChangeACLData) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_ACLData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeACLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_ACLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeACLData.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_ACLData.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -378,49 +379,49 @@ func (m *ACLChangeACLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *ACLChangeACLData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeACLData.Merge(m, src) +func (m *ACLChange_ACLData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_ACLData.Merge(m, src) } -func (m *ACLChangeACLData) XXX_Size() int { +func (m *ACLChange_ACLData) XXX_Size() int { return m.Size() } -func (m *ACLChangeACLData) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeACLData.DiscardUnknown(m) +func (m *ACLChange_ACLData) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_ACLData.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeACLData proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_ACLData proto.InternalMessageInfo -func (m *ACLChangeACLData) GetAclSnapshot() *ACLChangeACLSnapshot { +func (m *ACLChange_ACLData) GetAclSnapshot() *ACLChange_ACLSnapshot { if m != nil { return m.AclSnapshot } return nil } -func (m *ACLChangeACLData) GetAclContent() []*ACLChangeACLContentValue { +func (m *ACLChange_ACLData) GetAclContent() []*ACLChange_ACLContentValue { if m != nil { return m.AclContent } return nil } -type ACLChangeACLSnapshot struct { +type ACLChange_ACLSnapshot struct { // We don't need ACLState as a separate message now, because we simplified the snapshot model - AclState *ACLChangeACLState `protobuf:"bytes,1,opt,name=aclState,proto3" json:"aclState,omitempty"` + AclState *ACLChange_ACLState `protobuf:"bytes,1,opt,name=aclState,proto3" json:"aclState,omitempty"` } -func (m *ACLChangeACLSnapshot) Reset() { *m = ACLChangeACLSnapshot{} } -func (m *ACLChangeACLSnapshot) String() string { return proto.CompactTextString(m) } -func (*ACLChangeACLSnapshot) ProtoMessage() {} -func (*ACLChangeACLSnapshot) Descriptor() ([]byte, []int) { +func (m *ACLChange_ACLSnapshot) Reset() { *m = ACLChange_ACLSnapshot{} } +func (m *ACLChange_ACLSnapshot) String() string { return proto.CompactTextString(m) } +func (*ACLChange_ACLSnapshot) ProtoMessage() {} +func (*ACLChange_ACLSnapshot) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 2} } -func (m *ACLChangeACLSnapshot) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_ACLSnapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeACLSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_ACLSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeACLSnapshot.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_ACLSnapshot.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -430,43 +431,43 @@ func (m *ACLChangeACLSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *ACLChangeACLSnapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeACLSnapshot.Merge(m, src) +func (m *ACLChange_ACLSnapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_ACLSnapshot.Merge(m, src) } -func (m *ACLChangeACLSnapshot) XXX_Size() int { +func (m *ACLChange_ACLSnapshot) XXX_Size() int { return m.Size() } -func (m *ACLChangeACLSnapshot) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeACLSnapshot.DiscardUnknown(m) +func (m *ACLChange_ACLSnapshot) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_ACLSnapshot.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeACLSnapshot proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_ACLSnapshot proto.InternalMessageInfo -func (m *ACLChangeACLSnapshot) GetAclState() *ACLChangeACLState { +func (m *ACLChange_ACLSnapshot) GetAclState() *ACLChange_ACLState { if m != nil { return m.AclState } return nil } -type ACLChangeACLState struct { - ReadKeyHashes []uint64 `protobuf:"varint,1,rep,packed,name=readKeyHashes,proto3" json:"readKeyHashes,omitempty"` - UserStates []*ACLChangeUserState `protobuf:"bytes,2,rep,name=userStates,proto3" json:"userStates,omitempty"` - Invites map[string]*ACLChangeUserInvite `protobuf:"bytes,3,rep,name=invites,proto3" json:"invites,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +type ACLChange_ACLState struct { + ReadKeyHashes []uint64 `protobuf:"varint,1,rep,packed,name=readKeyHashes,proto3" json:"readKeyHashes,omitempty"` + UserStates []*ACLChange_UserState `protobuf:"bytes,2,rep,name=userStates,proto3" json:"userStates,omitempty"` + Invites map[string]*ACLChange_UserInvite `protobuf:"bytes,3,rep,name=invites,proto3" json:"invites,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *ACLChangeACLState) Reset() { *m = ACLChangeACLState{} } -func (m *ACLChangeACLState) String() string { return proto.CompactTextString(m) } -func (*ACLChangeACLState) ProtoMessage() {} -func (*ACLChangeACLState) Descriptor() ([]byte, []int) { +func (m *ACLChange_ACLState) Reset() { *m = ACLChange_ACLState{} } +func (m *ACLChange_ACLState) String() string { return proto.CompactTextString(m) } +func (*ACLChange_ACLState) ProtoMessage() {} +func (*ACLChange_ACLState) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 3} } -func (m *ACLChangeACLState) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_ACLState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeACLState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_ACLState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeACLState.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_ACLState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -476,59 +477,59 @@ func (m *ACLChangeACLState) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *ACLChangeACLState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeACLState.Merge(m, src) +func (m *ACLChange_ACLState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_ACLState.Merge(m, src) } -func (m *ACLChangeACLState) XXX_Size() int { +func (m *ACLChange_ACLState) XXX_Size() int { return m.Size() } -func (m *ACLChangeACLState) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeACLState.DiscardUnknown(m) +func (m *ACLChange_ACLState) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_ACLState.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeACLState proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_ACLState proto.InternalMessageInfo -func (m *ACLChangeACLState) GetReadKeyHashes() []uint64 { +func (m *ACLChange_ACLState) GetReadKeyHashes() []uint64 { if m != nil { return m.ReadKeyHashes } return nil } -func (m *ACLChangeACLState) GetUserStates() []*ACLChangeUserState { +func (m *ACLChange_ACLState) GetUserStates() []*ACLChange_UserState { if m != nil { return m.UserStates } return nil } -func (m *ACLChangeACLState) GetInvites() map[string]*ACLChangeUserInvite { +func (m *ACLChange_ACLState) GetInvites() map[string]*ACLChange_UserInvite { if m != nil { return m.Invites } return nil } -type ACLChangeUserState struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` - EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` - IsConfirmed bool `protobuf:"varint,5,opt,name=IsConfirmed,proto3" json:"IsConfirmed,omitempty"` +type ACLChange_UserState struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` + EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` + Permissions ACLChange_UserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChange_UserPermissions" json:"permissions,omitempty"` + IsConfirmed bool `protobuf:"varint,5,opt,name=IsConfirmed,proto3" json:"IsConfirmed,omitempty"` } -func (m *ACLChangeUserState) Reset() { *m = ACLChangeUserState{} } -func (m *ACLChangeUserState) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserState) ProtoMessage() {} -func (*ACLChangeUserState) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserState) Reset() { *m = ACLChange_UserState{} } +func (m *ACLChange_UserState) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserState) ProtoMessage() {} +func (*ACLChange_UserState) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 4} } -func (m *ACLChangeUserState) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserState.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -538,47 +539,47 @@ func (m *ACLChangeUserState) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *ACLChangeUserState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserState.Merge(m, src) +func (m *ACLChange_UserState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserState.Merge(m, src) } -func (m *ACLChangeUserState) XXX_Size() int { +func (m *ACLChange_UserState) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserState) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserState.DiscardUnknown(m) +func (m *ACLChange_UserState) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserState.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserState proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserState proto.InternalMessageInfo -func (m *ACLChangeUserState) GetIdentity() string { +func (m *ACLChange_UserState) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeUserState) GetEncryptionKey() []byte { +func (m *ACLChange_UserState) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } -func (m *ACLChangeUserState) GetEncryptedReadKeys() [][]byte { +func (m *ACLChange_UserState) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } -func (m *ACLChangeUserState) GetPermissions() ACLChangeUserPermissions { +func (m *ACLChange_UserState) GetPermissions() ACLChange_UserPermissions { if m != nil { return m.Permissions } return ACLChange_Admin } -func (m *ACLChangeUserState) GetIsConfirmed() bool { +func (m *ACLChange_UserState) GetIsConfirmed() bool { if m != nil { return m.IsConfirmed } @@ -586,25 +587,25 @@ func (m *ACLChangeUserState) GetIsConfirmed() bool { } // we already know identity and encryptionKey -type ACLChangeUserAdd struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` - EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` +type ACLChange_UserAdd struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` + EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` + Permissions ACLChange_UserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChange_UserPermissions" json:"permissions,omitempty"` } -func (m *ACLChangeUserAdd) Reset() { *m = ACLChangeUserAdd{} } -func (m *ACLChangeUserAdd) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserAdd) ProtoMessage() {} -func (*ACLChangeUserAdd) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserAdd) Reset() { *m = ACLChange_UserAdd{} } +func (m *ACLChange_UserAdd) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserAdd) ProtoMessage() {} +func (*ACLChange_UserAdd) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 5} } -func (m *ACLChangeUserAdd) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserAdd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserAdd.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserAdd.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -614,40 +615,40 @@ func (m *ACLChangeUserAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *ACLChangeUserAdd) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserAdd.Merge(m, src) +func (m *ACLChange_UserAdd) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserAdd.Merge(m, src) } -func (m *ACLChangeUserAdd) XXX_Size() int { +func (m *ACLChange_UserAdd) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserAdd) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserAdd.DiscardUnknown(m) +func (m *ACLChange_UserAdd) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserAdd.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserAdd proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserAdd proto.InternalMessageInfo -func (m *ACLChangeUserAdd) GetIdentity() string { +func (m *ACLChange_UserAdd) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeUserAdd) GetEncryptionKey() []byte { +func (m *ACLChange_UserAdd) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } -func (m *ACLChangeUserAdd) GetEncryptedReadKeys() [][]byte { +func (m *ACLChange_UserAdd) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } -func (m *ACLChangeUserAdd) GetPermissions() ACLChangeUserPermissions { +func (m *ACLChange_UserAdd) GetPermissions() ACLChange_UserPermissions { if m != nil { return m.Permissions } @@ -655,23 +656,23 @@ func (m *ACLChangeUserAdd) GetPermissions() ACLChangeUserPermissions { } // TODO: this is not used as of now -type ACLChangeUserConfirm struct { +type ACLChange_UserConfirm struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` UserAddId string `protobuf:"bytes,2,opt,name=userAddId,proto3" json:"userAddId,omitempty"` } -func (m *ACLChangeUserConfirm) Reset() { *m = ACLChangeUserConfirm{} } -func (m *ACLChangeUserConfirm) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserConfirm) ProtoMessage() {} -func (*ACLChangeUserConfirm) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserConfirm) Reset() { *m = ACLChange_UserConfirm{} } +func (m *ACLChange_UserConfirm) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserConfirm) ProtoMessage() {} +func (*ACLChange_UserConfirm) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 6} } -func (m *ACLChangeUserConfirm) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserConfirm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserConfirm.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserConfirm.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -681,52 +682,52 @@ func (m *ACLChangeUserConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *ACLChangeUserConfirm) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserConfirm.Merge(m, src) +func (m *ACLChange_UserConfirm) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserConfirm.Merge(m, src) } -func (m *ACLChangeUserConfirm) XXX_Size() int { +func (m *ACLChange_UserConfirm) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserConfirm) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserConfirm.DiscardUnknown(m) +func (m *ACLChange_UserConfirm) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserConfirm.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserConfirm proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserConfirm proto.InternalMessageInfo -func (m *ACLChangeUserConfirm) GetIdentity() string { +func (m *ACLChange_UserConfirm) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeUserConfirm) GetUserAddId() string { +func (m *ACLChange_UserConfirm) GetUserAddId() string { if m != nil { return m.UserAddId } return "" } -type ACLChangeUserInvite struct { - AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"` - EncryptPublicKey []byte `protobuf:"bytes,2,opt,name=encryptPublicKey,proto3" json:"encryptPublicKey,omitempty"` - EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` - InviteId string `protobuf:"bytes,5,opt,name=InviteId,proto3" json:"InviteId,omitempty"` +type ACLChange_UserInvite struct { + AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"` + EncryptPublicKey []byte `protobuf:"bytes,2,opt,name=encryptPublicKey,proto3" json:"encryptPublicKey,omitempty"` + EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` + Permissions ACLChange_UserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChange_UserPermissions" json:"permissions,omitempty"` + InviteId string `protobuf:"bytes,5,opt,name=InviteId,proto3" json:"InviteId,omitempty"` } -func (m *ACLChangeUserInvite) Reset() { *m = ACLChangeUserInvite{} } -func (m *ACLChangeUserInvite) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserInvite) ProtoMessage() {} -func (*ACLChangeUserInvite) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserInvite) Reset() { *m = ACLChange_UserInvite{} } +func (m *ACLChange_UserInvite) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserInvite) ProtoMessage() {} +func (*ACLChange_UserInvite) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 7} } -func (m *ACLChangeUserInvite) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserInvite) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserInvite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserInvite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserInvite.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserInvite.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -736,54 +737,54 @@ func (m *ACLChangeUserInvite) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *ACLChangeUserInvite) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserInvite.Merge(m, src) +func (m *ACLChange_UserInvite) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserInvite.Merge(m, src) } -func (m *ACLChangeUserInvite) XXX_Size() int { +func (m *ACLChange_UserInvite) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserInvite) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserInvite.DiscardUnknown(m) +func (m *ACLChange_UserInvite) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserInvite.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserInvite proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserInvite proto.InternalMessageInfo -func (m *ACLChangeUserInvite) GetAcceptPublicKey() []byte { +func (m *ACLChange_UserInvite) GetAcceptPublicKey() []byte { if m != nil { return m.AcceptPublicKey } return nil } -func (m *ACLChangeUserInvite) GetEncryptPublicKey() []byte { +func (m *ACLChange_UserInvite) GetEncryptPublicKey() []byte { if m != nil { return m.EncryptPublicKey } return nil } -func (m *ACLChangeUserInvite) GetEncryptedReadKeys() [][]byte { +func (m *ACLChange_UserInvite) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } -func (m *ACLChangeUserInvite) GetPermissions() ACLChangeUserPermissions { +func (m *ACLChange_UserInvite) GetPermissions() ACLChange_UserPermissions { if m != nil { return m.Permissions } return ACLChange_Admin } -func (m *ACLChangeUserInvite) GetInviteId() string { +func (m *ACLChange_UserInvite) GetInviteId() string { if m != nil { return m.InviteId } return "" } -type ACLChangeUserJoin struct { +type ACLChange_UserJoin struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` AcceptSignature []byte `protobuf:"bytes,3,opt,name=acceptSignature,proto3" json:"acceptSignature,omitempty"` @@ -791,18 +792,18 @@ type ACLChangeUserJoin struct { EncryptedReadKeys [][]byte `protobuf:"bytes,5,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` } -func (m *ACLChangeUserJoin) Reset() { *m = ACLChangeUserJoin{} } -func (m *ACLChangeUserJoin) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserJoin) ProtoMessage() {} -func (*ACLChangeUserJoin) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserJoin) Reset() { *m = ACLChange_UserJoin{} } +func (m *ACLChange_UserJoin) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserJoin) ProtoMessage() {} +func (*ACLChange_UserJoin) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 8} } -func (m *ACLChangeUserJoin) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserJoin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserJoin.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserJoin.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -812,70 +813,70 @@ func (m *ACLChangeUserJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *ACLChangeUserJoin) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserJoin.Merge(m, src) +func (m *ACLChange_UserJoin) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserJoin.Merge(m, src) } -func (m *ACLChangeUserJoin) XXX_Size() int { +func (m *ACLChange_UserJoin) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserJoin) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserJoin.DiscardUnknown(m) +func (m *ACLChange_UserJoin) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserJoin.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserJoin proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserJoin proto.InternalMessageInfo -func (m *ACLChangeUserJoin) GetIdentity() string { +func (m *ACLChange_UserJoin) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeUserJoin) GetEncryptionKey() []byte { +func (m *ACLChange_UserJoin) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } -func (m *ACLChangeUserJoin) GetAcceptSignature() []byte { +func (m *ACLChange_UserJoin) GetAcceptSignature() []byte { if m != nil { return m.AcceptSignature } return nil } -func (m *ACLChangeUserJoin) GetUserInviteId() string { +func (m *ACLChange_UserJoin) GetUserInviteId() string { if m != nil { return m.UserInviteId } return "" } -func (m *ACLChangeUserJoin) GetEncryptedReadKeys() [][]byte { +func (m *ACLChange_UserJoin) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } -type ACLChangeUserRemove struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - ReadKeyReplaces []*ACLChangeReadKeyReplace `protobuf:"bytes,3,rep,name=readKeyReplaces,proto3" json:"readKeyReplaces,omitempty"` +type ACLChange_UserRemove struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + ReadKeyReplaces []*ACLChange_ReadKeyReplace `protobuf:"bytes,3,rep,name=readKeyReplaces,proto3" json:"readKeyReplaces,omitempty"` } -func (m *ACLChangeUserRemove) Reset() { *m = ACLChangeUserRemove{} } -func (m *ACLChangeUserRemove) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserRemove) ProtoMessage() {} -func (*ACLChangeUserRemove) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserRemove) Reset() { *m = ACLChange_UserRemove{} } +func (m *ACLChange_UserRemove) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserRemove) ProtoMessage() {} +func (*ACLChange_UserRemove) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 9} } -func (m *ACLChangeUserRemove) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserRemove) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserRemove.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserRemove.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -885,50 +886,50 @@ func (m *ACLChangeUserRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *ACLChangeUserRemove) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserRemove.Merge(m, src) +func (m *ACLChange_UserRemove) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserRemove.Merge(m, src) } -func (m *ACLChangeUserRemove) XXX_Size() int { +func (m *ACLChange_UserRemove) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserRemove) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserRemove.DiscardUnknown(m) +func (m *ACLChange_UserRemove) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserRemove.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserRemove proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserRemove proto.InternalMessageInfo -func (m *ACLChangeUserRemove) GetIdentity() string { +func (m *ACLChange_UserRemove) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeUserRemove) GetReadKeyReplaces() []*ACLChangeReadKeyReplace { +func (m *ACLChange_UserRemove) GetReadKeyReplaces() []*ACLChange_ReadKeyReplace { if m != nil { return m.ReadKeyReplaces } return nil } -type ACLChangeReadKeyReplace struct { +type ACLChange_ReadKeyReplace struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` EncryptedReadKey []byte `protobuf:"bytes,3,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` } -func (m *ACLChangeReadKeyReplace) Reset() { *m = ACLChangeReadKeyReplace{} } -func (m *ACLChangeReadKeyReplace) String() string { return proto.CompactTextString(m) } -func (*ACLChangeReadKeyReplace) ProtoMessage() {} -func (*ACLChangeReadKeyReplace) Descriptor() ([]byte, []int) { +func (m *ACLChange_ReadKeyReplace) Reset() { *m = ACLChange_ReadKeyReplace{} } +func (m *ACLChange_ReadKeyReplace) String() string { return proto.CompactTextString(m) } +func (*ACLChange_ReadKeyReplace) ProtoMessage() {} +func (*ACLChange_ReadKeyReplace) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 10} } -func (m *ACLChangeReadKeyReplace) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_ReadKeyReplace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeReadKeyReplace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_ReadKeyReplace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeReadKeyReplace.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_ReadKeyReplace.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -938,56 +939,56 @@ func (m *ACLChangeReadKeyReplace) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *ACLChangeReadKeyReplace) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeReadKeyReplace.Merge(m, src) +func (m *ACLChange_ReadKeyReplace) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_ReadKeyReplace.Merge(m, src) } -func (m *ACLChangeReadKeyReplace) XXX_Size() int { +func (m *ACLChange_ReadKeyReplace) XXX_Size() int { return m.Size() } -func (m *ACLChangeReadKeyReplace) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeReadKeyReplace.DiscardUnknown(m) +func (m *ACLChange_ReadKeyReplace) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_ReadKeyReplace.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeReadKeyReplace proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_ReadKeyReplace proto.InternalMessageInfo -func (m *ACLChangeReadKeyReplace) GetIdentity() string { +func (m *ACLChange_ReadKeyReplace) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeReadKeyReplace) GetEncryptionKey() []byte { +func (m *ACLChange_ReadKeyReplace) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } -func (m *ACLChangeReadKeyReplace) GetEncryptedReadKey() []byte { +func (m *ACLChange_ReadKeyReplace) GetEncryptedReadKey() []byte { if m != nil { return m.EncryptedReadKey } return nil } -type ACLChangeUserPermissionChange struct { - Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` +type ACLChange_UserPermissionChange struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Permissions ACLChange_UserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=acl.ACLChange_UserPermissions" json:"permissions,omitempty"` } -func (m *ACLChangeUserPermissionChange) Reset() { *m = ACLChangeUserPermissionChange{} } -func (m *ACLChangeUserPermissionChange) String() string { return proto.CompactTextString(m) } -func (*ACLChangeUserPermissionChange) ProtoMessage() {} -func (*ACLChangeUserPermissionChange) Descriptor() ([]byte, []int) { +func (m *ACLChange_UserPermissionChange) Reset() { *m = ACLChange_UserPermissionChange{} } +func (m *ACLChange_UserPermissionChange) String() string { return proto.CompactTextString(m) } +func (*ACLChange_UserPermissionChange) ProtoMessage() {} +func (*ACLChange_UserPermissionChange) Descriptor() ([]byte, []int) { return fileDescriptor_37a022c841a51877, []int{1, 11} } -func (m *ACLChangeUserPermissionChange) XXX_Unmarshal(b []byte) error { +func (m *ACLChange_UserPermissionChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ACLChangeUserPermissionChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ACLChange_UserPermissionChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ACLChangeUserPermissionChange.Marshal(b, m, deterministic) + return xxx_messageInfo_ACLChange_UserPermissionChange.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -997,26 +998,26 @@ func (m *ACLChangeUserPermissionChange) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *ACLChangeUserPermissionChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_ACLChangeUserPermissionChange.Merge(m, src) +func (m *ACLChange_UserPermissionChange) XXX_Merge(src proto.Message) { + xxx_messageInfo_ACLChange_UserPermissionChange.Merge(m, src) } -func (m *ACLChangeUserPermissionChange) XXX_Size() int { +func (m *ACLChange_UserPermissionChange) XXX_Size() int { return m.Size() } -func (m *ACLChangeUserPermissionChange) XXX_DiscardUnknown() { - xxx_messageInfo_ACLChangeUserPermissionChange.DiscardUnknown(m) +func (m *ACLChange_UserPermissionChange) XXX_DiscardUnknown() { + xxx_messageInfo_ACLChange_UserPermissionChange.DiscardUnknown(m) } -var xxx_messageInfo_ACLChangeUserPermissionChange proto.InternalMessageInfo +var xxx_messageInfo_ACLChange_UserPermissionChange proto.InternalMessageInfo -func (m *ACLChangeUserPermissionChange) GetIdentity() string { +func (m *ACLChange_UserPermissionChange) GetIdentity() string { if m != nil { return m.Identity } return "" } -func (m *ACLChangeUserPermissionChange) GetPermissions() ACLChangeUserPermissions { +func (m *ACLChange_UserPermissionChange) GetPermissions() ACLChange_UserPermissions { if m != nil { return m.Permissions } @@ -1024,22 +1025,22 @@ func (m *ACLChangeUserPermissionChange) GetPermissions() ACLChangeUserPermission } func init() { - proto.RegisterEnum("acl.ACLChangeUserPermissions", ACLChangeUserPermissions_name, ACLChangeUserPermissions_value) + proto.RegisterEnum("acl.ACLChange_UserPermissions", ACLChange_UserPermissions_name, ACLChange_UserPermissions_value) proto.RegisterType((*RawChange)(nil), "acl.RawChange") proto.RegisterType((*ACLChange)(nil), "acl.ACLChange") - proto.RegisterType((*ACLChangeACLContentValue)(nil), "acl.ACLChange.ACLContentValue") - proto.RegisterType((*ACLChangeACLData)(nil), "acl.ACLChange.ACLData") - proto.RegisterType((*ACLChangeACLSnapshot)(nil), "acl.ACLChange.ACLSnapshot") - proto.RegisterType((*ACLChangeACLState)(nil), "acl.ACLChange.ACLState") - proto.RegisterMapType((map[string]*ACLChangeUserInvite)(nil), "acl.ACLChange.ACLState.InvitesEntry") - proto.RegisterType((*ACLChangeUserState)(nil), "acl.ACLChange.UserState") - proto.RegisterType((*ACLChangeUserAdd)(nil), "acl.ACLChange.UserAdd") - proto.RegisterType((*ACLChangeUserConfirm)(nil), "acl.ACLChange.UserConfirm") - proto.RegisterType((*ACLChangeUserInvite)(nil), "acl.ACLChange.UserInvite") - proto.RegisterType((*ACLChangeUserJoin)(nil), "acl.ACLChange.UserJoin") - proto.RegisterType((*ACLChangeUserRemove)(nil), "acl.ACLChange.UserRemove") - proto.RegisterType((*ACLChangeReadKeyReplace)(nil), "acl.ACLChange.ReadKeyReplace") - proto.RegisterType((*ACLChangeUserPermissionChange)(nil), "acl.ACLChange.UserPermissionChange") + proto.RegisterType((*ACLChange_ACLContentValue)(nil), "acl.ACLChange.ACLContentValue") + proto.RegisterType((*ACLChange_ACLData)(nil), "acl.ACLChange.ACLData") + proto.RegisterType((*ACLChange_ACLSnapshot)(nil), "acl.ACLChange.ACLSnapshot") + proto.RegisterType((*ACLChange_ACLState)(nil), "acl.ACLChange.ACLState") + proto.RegisterMapType((map[string]*ACLChange_UserInvite)(nil), "acl.ACLChange.ACLState.InvitesEntry") + proto.RegisterType((*ACLChange_UserState)(nil), "acl.ACLChange.UserState") + proto.RegisterType((*ACLChange_UserAdd)(nil), "acl.ACLChange.UserAdd") + proto.RegisterType((*ACLChange_UserConfirm)(nil), "acl.ACLChange.UserConfirm") + proto.RegisterType((*ACLChange_UserInvite)(nil), "acl.ACLChange.UserInvite") + proto.RegisterType((*ACLChange_UserJoin)(nil), "acl.ACLChange.UserJoin") + proto.RegisterType((*ACLChange_UserRemove)(nil), "acl.ACLChange.UserRemove") + proto.RegisterType((*ACLChange_ReadKeyReplace)(nil), "acl.ACLChange.ReadKeyReplace") + proto.RegisterType((*ACLChange_UserPermissionChange)(nil), "acl.ACLChange.UserPermissionChange") } func init() { @@ -1238,7 +1239,7 @@ func (m *ACLChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValue) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_ACLContentValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1248,12 +1249,12 @@ func (m *ACLChangeACLContentValue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeACLContentValue) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContentValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1270,12 +1271,12 @@ func (m *ACLChangeACLContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValueValueOfUserAdd) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserAdd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValueValueOfUserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserAdd != nil { { @@ -1291,12 +1292,12 @@ func (m *ACLChangeACLContentValueValueOfUserAdd) MarshalToSizedBuffer(dAtA []byt } return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValueValueOfUserRemove) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserRemove) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValueValueOfUserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserRemove != nil { { @@ -1312,12 +1313,12 @@ func (m *ACLChangeACLContentValueValueOfUserRemove) MarshalToSizedBuffer(dAtA [] } return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValueValueOfUserPermissionChange) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserPermissionChange) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValueValueOfUserPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserPermissionChange != nil { { @@ -1333,12 +1334,12 @@ func (m *ACLChangeACLContentValueValueOfUserPermissionChange) MarshalToSizedBuff } return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValueValueOfUserInvite) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserInvite) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValueValueOfUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserInvite != nil { { @@ -1354,12 +1355,12 @@ func (m *ACLChangeACLContentValueValueOfUserInvite) MarshalToSizedBuffer(dAtA [] } return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValueValueOfUserJoin) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserJoin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValueValueOfUserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserJoin != nil { { @@ -1375,12 +1376,12 @@ func (m *ACLChangeACLContentValueValueOfUserJoin) MarshalToSizedBuffer(dAtA []by } return len(dAtA) - i, nil } -func (m *ACLChangeACLContentValueValueOfUserConfirm) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserConfirm) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLContentValueValueOfUserConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLContent_Value_UserConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserConfirm != nil { { @@ -1396,7 +1397,7 @@ func (m *ACLChangeACLContentValueValueOfUserConfirm) MarshalToSizedBuffer(dAtA [ } return len(dAtA) - i, nil } -func (m *ACLChangeACLData) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_ACLData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1406,12 +1407,12 @@ func (m *ACLChangeACLData) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeACLData) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLData) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1445,7 +1446,7 @@ func (m *ACLChangeACLData) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeACLSnapshot) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_ACLSnapshot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1455,12 +1456,12 @@ func (m *ACLChangeACLSnapshot) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeACLSnapshot) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLSnapshot) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1480,7 +1481,7 @@ func (m *ACLChangeACLSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeACLState) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_ACLState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1490,12 +1491,12 @@ func (m *ACLChangeACLState) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeACLState) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ACLState) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeACLState) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ACLState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1561,7 +1562,7 @@ func (m *ACLChangeACLState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeUserState) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1571,12 +1572,12 @@ func (m *ACLChangeUserState) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserState) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserState) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserState) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1622,7 +1623,7 @@ func (m *ACLChangeUserState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeUserAdd) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserAdd) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1632,12 +1633,12 @@ func (m *ACLChangeUserAdd) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserAdd) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserAdd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1673,7 +1674,7 @@ func (m *ACLChangeUserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeUserConfirm) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserConfirm) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1683,12 +1684,12 @@ func (m *ACLChangeUserConfirm) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserConfirm) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserConfirm) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1710,7 +1711,7 @@ func (m *ACLChangeUserConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeUserInvite) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserInvite) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1720,12 +1721,12 @@ func (m *ACLChangeUserInvite) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserInvite) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserInvite) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1768,7 +1769,7 @@ func (m *ACLChangeUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeUserJoin) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserJoin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1778,12 +1779,12 @@ func (m *ACLChangeUserJoin) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserJoin) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserJoin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1828,7 +1829,7 @@ func (m *ACLChangeUserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeUserRemove) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserRemove) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1838,12 +1839,12 @@ func (m *ACLChangeUserRemove) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserRemove) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserRemove) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1872,7 +1873,7 @@ func (m *ACLChangeUserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ACLChangeReadKeyReplace) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_ReadKeyReplace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1882,12 +1883,12 @@ func (m *ACLChangeReadKeyReplace) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeReadKeyReplace) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_ReadKeyReplace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeReadKeyReplace) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_ReadKeyReplace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1916,7 +1917,7 @@ func (m *ACLChangeReadKeyReplace) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *ACLChangeUserPermissionChange) Marshal() (dAtA []byte, err error) { +func (m *ACLChange_UserPermissionChange) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1926,12 +1927,12 @@ func (m *ACLChangeUserPermissionChange) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ACLChangeUserPermissionChange) MarshalTo(dAtA []byte) (int, error) { +func (m *ACLChange_UserPermissionChange) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ACLChangeUserPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ACLChange_UserPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2026,7 +2027,7 @@ func (m *ACLChange) Size() (n int) { return n } -func (m *ACLChangeACLContentValue) Size() (n int) { +func (m *ACLChange_ACLContentValue) Size() (n int) { if m == nil { return 0 } @@ -2038,7 +2039,7 @@ func (m *ACLChangeACLContentValue) Size() (n int) { return n } -func (m *ACLChangeACLContentValueValueOfUserAdd) Size() (n int) { +func (m *ACLChange_ACLContent_Value_UserAdd) Size() (n int) { if m == nil { return 0 } @@ -2050,7 +2051,7 @@ func (m *ACLChangeACLContentValueValueOfUserAdd) Size() (n int) { } return n } -func (m *ACLChangeACLContentValueValueOfUserRemove) Size() (n int) { +func (m *ACLChange_ACLContent_Value_UserRemove) Size() (n int) { if m == nil { return 0 } @@ -2062,7 +2063,7 @@ func (m *ACLChangeACLContentValueValueOfUserRemove) Size() (n int) { } return n } -func (m *ACLChangeACLContentValueValueOfUserPermissionChange) Size() (n int) { +func (m *ACLChange_ACLContent_Value_UserPermissionChange) Size() (n int) { if m == nil { return 0 } @@ -2074,7 +2075,7 @@ func (m *ACLChangeACLContentValueValueOfUserPermissionChange) Size() (n int) { } return n } -func (m *ACLChangeACLContentValueValueOfUserInvite) Size() (n int) { +func (m *ACLChange_ACLContent_Value_UserInvite) Size() (n int) { if m == nil { return 0 } @@ -2086,7 +2087,7 @@ func (m *ACLChangeACLContentValueValueOfUserInvite) Size() (n int) { } return n } -func (m *ACLChangeACLContentValueValueOfUserJoin) Size() (n int) { +func (m *ACLChange_ACLContent_Value_UserJoin) Size() (n int) { if m == nil { return 0 } @@ -2098,7 +2099,7 @@ func (m *ACLChangeACLContentValueValueOfUserJoin) Size() (n int) { } return n } -func (m *ACLChangeACLContentValueValueOfUserConfirm) Size() (n int) { +func (m *ACLChange_ACLContent_Value_UserConfirm) Size() (n int) { if m == nil { return 0 } @@ -2110,7 +2111,7 @@ func (m *ACLChangeACLContentValueValueOfUserConfirm) Size() (n int) { } return n } -func (m *ACLChangeACLData) Size() (n int) { +func (m *ACLChange_ACLData) Size() (n int) { if m == nil { return 0 } @@ -2129,7 +2130,7 @@ func (m *ACLChangeACLData) Size() (n int) { return n } -func (m *ACLChangeACLSnapshot) Size() (n int) { +func (m *ACLChange_ACLSnapshot) Size() (n int) { if m == nil { return 0 } @@ -2142,7 +2143,7 @@ func (m *ACLChangeACLSnapshot) Size() (n int) { return n } -func (m *ACLChangeACLState) Size() (n int) { +func (m *ACLChange_ACLState) Size() (n int) { if m == nil { return 0 } @@ -2177,7 +2178,7 @@ func (m *ACLChangeACLState) Size() (n int) { return n } -func (m *ACLChangeUserState) Size() (n int) { +func (m *ACLChange_UserState) Size() (n int) { if m == nil { return 0 } @@ -2206,7 +2207,7 @@ func (m *ACLChangeUserState) Size() (n int) { return n } -func (m *ACLChangeUserAdd) Size() (n int) { +func (m *ACLChange_UserAdd) Size() (n int) { if m == nil { return 0 } @@ -2232,7 +2233,7 @@ func (m *ACLChangeUserAdd) Size() (n int) { return n } -func (m *ACLChangeUserConfirm) Size() (n int) { +func (m *ACLChange_UserConfirm) Size() (n int) { if m == nil { return 0 } @@ -2249,7 +2250,7 @@ func (m *ACLChangeUserConfirm) Size() (n int) { return n } -func (m *ACLChangeUserInvite) Size() (n int) { +func (m *ACLChange_UserInvite) Size() (n int) { if m == nil { return 0 } @@ -2279,7 +2280,7 @@ func (m *ACLChangeUserInvite) Size() (n int) { return n } -func (m *ACLChangeUserJoin) Size() (n int) { +func (m *ACLChange_UserJoin) Size() (n int) { if m == nil { return 0 } @@ -2310,7 +2311,7 @@ func (m *ACLChangeUserJoin) Size() (n int) { return n } -func (m *ACLChangeUserRemove) Size() (n int) { +func (m *ACLChange_UserRemove) Size() (n int) { if m == nil { return 0 } @@ -2329,7 +2330,7 @@ func (m *ACLChangeUserRemove) Size() (n int) { return n } -func (m *ACLChangeReadKeyReplace) Size() (n int) { +func (m *ACLChange_ReadKeyReplace) Size() (n int) { if m == nil { return 0 } @@ -2350,7 +2351,7 @@ func (m *ACLChangeReadKeyReplace) Size() (n int) { return n } -func (m *ACLChangeUserPermissionChange) Size() (n int) { +func (m *ACLChange_UserPermissionChange) Size() (n int) { if m == nil { return 0 } @@ -2677,7 +2678,7 @@ func (m *ACLChange) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.AclData == nil { - m.AclData = &ACLChangeACLData{} + m.AclData = &ACLChange_ACLData{} } if err := m.AclData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2808,7 +2809,7 @@ func (m *ACLChange) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { +func (m *ACLChange_ACLContentValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2866,11 +2867,11 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ACLChangeUserAdd{} + v := &ACLChange_UserAdd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &ACLChangeACLContentValueValueOfUserAdd{v} + m.Value = &ACLChange_ACLContent_Value_UserAdd{v} iNdEx = postIndex case 2: if wireType != 2 { @@ -2901,11 +2902,11 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ACLChangeUserRemove{} + v := &ACLChange_UserRemove{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &ACLChangeACLContentValueValueOfUserRemove{v} + m.Value = &ACLChange_ACLContent_Value_UserRemove{v} iNdEx = postIndex case 3: if wireType != 2 { @@ -2936,11 +2937,11 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ACLChangeUserPermissionChange{} + v := &ACLChange_UserPermissionChange{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &ACLChangeACLContentValueValueOfUserPermissionChange{v} + m.Value = &ACLChange_ACLContent_Value_UserPermissionChange{v} iNdEx = postIndex case 4: if wireType != 2 { @@ -2971,11 +2972,11 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ACLChangeUserInvite{} + v := &ACLChange_UserInvite{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &ACLChangeACLContentValueValueOfUserInvite{v} + m.Value = &ACLChange_ACLContent_Value_UserInvite{v} iNdEx = postIndex case 5: if wireType != 2 { @@ -3006,11 +3007,11 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ACLChangeUserJoin{} + v := &ACLChange_UserJoin{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &ACLChangeACLContentValueValueOfUserJoin{v} + m.Value = &ACLChange_ACLContent_Value_UserJoin{v} iNdEx = postIndex case 6: if wireType != 2 { @@ -3041,11 +3042,11 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ACLChangeUserConfirm{} + v := &ACLChange_UserConfirm{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &ACLChangeACLContentValueValueOfUserConfirm{v} + m.Value = &ACLChange_ACLContent_Value_UserConfirm{v} iNdEx = postIndex default: iNdEx = preIndex @@ -3068,7 +3069,7 @@ func (m *ACLChangeACLContentValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeACLData) Unmarshal(dAtA []byte) error { +func (m *ACLChange_ACLData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3127,7 +3128,7 @@ func (m *ACLChangeACLData) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.AclSnapshot == nil { - m.AclSnapshot = &ACLChangeACLSnapshot{} + m.AclSnapshot = &ACLChange_ACLSnapshot{} } if err := m.AclSnapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3162,7 +3163,7 @@ func (m *ACLChangeACLData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AclContent = append(m.AclContent, &ACLChangeACLContentValue{}) + m.AclContent = append(m.AclContent, &ACLChange_ACLContentValue{}) if err := m.AclContent[len(m.AclContent)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3188,7 +3189,7 @@ func (m *ACLChangeACLData) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeACLSnapshot) Unmarshal(dAtA []byte) error { +func (m *ACLChange_ACLSnapshot) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3247,7 +3248,7 @@ func (m *ACLChangeACLSnapshot) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.AclState == nil { - m.AclState = &ACLChangeACLState{} + m.AclState = &ACLChange_ACLState{} } if err := m.AclState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3274,7 +3275,7 @@ func (m *ACLChangeACLSnapshot) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeACLState) Unmarshal(dAtA []byte) error { +func (m *ACLChange_ACLState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3408,7 +3409,7 @@ func (m *ACLChangeACLState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserStates = append(m.UserStates, &ACLChangeUserState{}) + m.UserStates = append(m.UserStates, &ACLChange_UserState{}) if err := m.UserStates[len(m.UserStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3443,10 +3444,10 @@ func (m *ACLChangeACLState) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Invites == nil { - m.Invites = make(map[string]*ACLChangeUserInvite) + m.Invites = make(map[string]*ACLChange_UserInvite) } var mapkey string - var mapvalue *ACLChangeUserInvite + var mapvalue *ACLChange_UserInvite for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -3520,7 +3521,7 @@ func (m *ACLChangeACLState) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &ACLChangeUserInvite{} + mapvalue = &ACLChange_UserInvite{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -3563,7 +3564,7 @@ func (m *ACLChangeACLState) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserState) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3704,7 +3705,7 @@ func (m *ACLChangeUserState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Permissions |= ACLChangeUserPermissions(b&0x7F) << shift + m.Permissions |= ACLChange_UserPermissions(b&0x7F) << shift if b < 0x80 { break } @@ -3750,7 +3751,7 @@ func (m *ACLChangeUserState) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserAdd) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserAdd) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3891,7 +3892,7 @@ func (m *ACLChangeUserAdd) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Permissions |= ACLChangeUserPermissions(b&0x7F) << shift + m.Permissions |= ACLChange_UserPermissions(b&0x7F) << shift if b < 0x80 { break } @@ -3917,7 +3918,7 @@ func (m *ACLChangeUserAdd) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserConfirm) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserConfirm) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4031,7 +4032,7 @@ func (m *ACLChangeUserConfirm) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserInvite) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserInvite) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4174,7 +4175,7 @@ func (m *ACLChangeUserInvite) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Permissions |= ACLChangeUserPermissions(b&0x7F) << shift + m.Permissions |= ACLChange_UserPermissions(b&0x7F) << shift if b < 0x80 { break } @@ -4232,7 +4233,7 @@ func (m *ACLChangeUserInvite) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserJoin) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserJoin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4446,7 +4447,7 @@ func (m *ACLChangeUserJoin) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserRemove) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserRemove) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4536,7 +4537,7 @@ func (m *ACLChangeUserRemove) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReadKeyReplaces = append(m.ReadKeyReplaces, &ACLChangeReadKeyReplace{}) + m.ReadKeyReplaces = append(m.ReadKeyReplaces, &ACLChange_ReadKeyReplace{}) if err := m.ReadKeyReplaces[len(m.ReadKeyReplaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4562,7 +4563,7 @@ func (m *ACLChangeUserRemove) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeReadKeyReplace) Unmarshal(dAtA []byte) error { +func (m *ACLChange_ReadKeyReplace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4712,7 +4713,7 @@ func (m *ACLChangeReadKeyReplace) Unmarshal(dAtA []byte) error { } return nil } -func (m *ACLChangeUserPermissionChange) Unmarshal(dAtA []byte) error { +func (m *ACLChange_UserPermissionChange) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4787,7 +4788,7 @@ func (m *ACLChangeUserPermissionChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Permissions |= ACLChangeUserPermissions(b&0x7F) << shift + m.Permissions |= ACLChange_UserPermissions(b&0x7F) << shift if b < 0x80 { break } diff --git a/pkg/acl/acltree/aclstate.go b/pkg/acl/acltree/aclstate.go index a7443f69..d28d59b2 100644 --- a/pkg/acl/acltree/aclstate.go +++ b/pkg/acl/acltree/aclstate.go @@ -20,8 +20,8 @@ var ErrUserAlreadyExists = errors.New("user already exists") type ACLState struct { currentReadKeyHash uint64 userReadKeys map[uint64]*symmetric.Key - userStates map[string]*aclpb.ACLChangeUserState - userInvites map[string]*aclpb.ACLChangeUserInvite + userStates map[string]*aclpb.ACLChange_UserState + userInvites map[string]*aclpb.ACLChange_UserInvite signingPubKeyDecoder signingkey.PubKeyDecoder encryptionKey encryptionkey.PrivKey identity string @@ -35,8 +35,8 @@ func newACLState( identity: identity, encryptionKey: encryptionKey, userReadKeys: make(map[uint64]*symmetric.Key), - userStates: make(map[string]*aclpb.ACLChangeUserState), - userInvites: make(map[string]*aclpb.ACLChangeUserInvite), + userStates: make(map[string]*aclpb.ACLChange_UserState), + userInvites: make(map[string]*aclpb.ACLChange_UserInvite), signingPubKeyDecoder: signingPubKeyDecoder, } } @@ -50,8 +50,8 @@ func newACLStateFromSnapshotChange( identity: identity, encryptionKey: encryptionKey, userReadKeys: make(map[uint64]*symmetric.Key), - userStates: make(map[string]*aclpb.ACLChangeUserState), - userInvites: make(map[string]*aclpb.ACLChangeUserInvite), + userStates: make(map[string]*aclpb.ACLChange_UserState), + userInvites: make(map[string]*aclpb.ACLChange_UserInvite), signingPubKeyDecoder: signingPubKeyDecoder, } err := st.recreateFromSnapshotChange(snapshotChange) @@ -90,13 +90,13 @@ func (st *ACLState) recreateFromSnapshotChange(snapshotChange *aclpb.ACLChange) return nil } -func (st *ACLState) makeSnapshot() *aclpb.ACLChangeACLSnapshot { - var userStates []*aclpb.ACLChangeUserState +func (st *ACLState) makeSnapshot() *aclpb.ACLChange_ACLSnapshot { + var userStates []*aclpb.ACLChange_UserState for _, st := range st.userStates { userStates = append(userStates, st) } - return &aclpb.ACLChangeACLSnapshot{AclState: &aclpb.ACLChangeACLState{ + return &aclpb.ACLChange_ACLSnapshot{AclState: &aclpb.ACLChange_ACLState{ ReadKeyHashes: nil, UserStates: userStates, // TODO: make states and invites in same format Invites: st.userInvites, @@ -138,7 +138,7 @@ func (st *ACLState) applyChange(change *aclpb.ACLChange) (err error) { } // TODO: remove changeId, because it is not needed -func (st *ACLState) applyChangeContent(ch *aclpb.ACLChangeACLContentValue) error { +func (st *ACLState) applyChangeContent(ch *aclpb.ACLChange_ACLContentValue) error { switch { case ch.GetUserPermissionChange() != nil: return st.applyUserPermissionChange(ch.GetUserPermissionChange()) @@ -157,7 +157,7 @@ func (st *ACLState) applyChangeContent(ch *aclpb.ACLChangeACLContentValue) error } } -func (st *ACLState) applyUserPermissionChange(ch *aclpb.ACLChangeUserPermissionChange) error { +func (st *ACLState) applyUserPermissionChange(ch *aclpb.ACLChange_UserPermissionChange) error { if _, exists := st.userStates[ch.Identity]; !exists { return ErrNoSuchUser } @@ -166,12 +166,12 @@ func (st *ACLState) applyUserPermissionChange(ch *aclpb.ACLChangeUserPermissionC return nil } -func (st *ACLState) applyUserInvite(ch *aclpb.ACLChangeUserInvite) error { +func (st *ACLState) applyUserInvite(ch *aclpb.ACLChange_UserInvite) error { st.userInvites[ch.InviteId] = ch return nil } -func (st *ACLState) applyUserJoin(ch *aclpb.ACLChangeUserJoin) error { +func (st *ACLState) applyUserJoin(ch *aclpb.ACLChange_UserJoin) error { invite, exists := st.userInvites[ch.UserInviteId] if !exists { return fmt.Errorf("no such invite with id %s", ch.UserInviteId) @@ -214,7 +214,7 @@ func (st *ACLState) applyUserJoin(ch *aclpb.ACLChangeUserJoin) error { } // adding user to the list - userState := &aclpb.ACLChangeUserState{ + userState := &aclpb.ACLChange_UserState{ Identity: ch.Identity, EncryptionKey: ch.EncryptionKey, EncryptedReadKeys: ch.EncryptedReadKeys, @@ -225,12 +225,12 @@ func (st *ACLState) applyUserJoin(ch *aclpb.ACLChangeUserJoin) error { return nil } -func (st *ACLState) applyUserAdd(ch *aclpb.ACLChangeUserAdd) error { +func (st *ACLState) applyUserAdd(ch *aclpb.ACLChange_UserAdd) error { if _, exists := st.userStates[ch.Identity]; exists { return ErrUserAlreadyExists } - st.userStates[ch.Identity] = &aclpb.ACLChangeUserState{ + st.userStates[ch.Identity] = &aclpb.ACLChange_UserState{ Identity: ch.Identity, EncryptionKey: ch.EncryptionKey, Permissions: ch.Permissions, @@ -251,7 +251,7 @@ func (st *ACLState) applyUserAdd(ch *aclpb.ACLChangeUserAdd) error { return nil } -func (st *ACLState) applyUserRemove(ch *aclpb.ACLChangeUserRemove) error { +func (st *ACLState) applyUserRemove(ch *aclpb.ACLChange_UserRemove) error { if ch.Identity == st.identity { return ErrDocumentForbidden } @@ -283,7 +283,7 @@ func (st *ACLState) applyUserRemove(ch *aclpb.ACLChangeUserRemove) error { return nil } -func (st *ACLState) applyUserConfirm(ch *aclpb.ACLChangeUserConfirm) error { +func (st *ACLState) applyUserConfirm(ch *aclpb.ACLChange_UserConfirm) error { if _, exists := st.userStates[ch.Identity]; !exists { return ErrNoSuchUser } @@ -309,7 +309,7 @@ func (st *ACLState) decryptReadKeyAndHash(msg []byte) (*symmetric.Key, uint64, e return key, hasher.Sum64(), nil } -func (st *ACLState) hasPermission(identity string, permission aclpb.ACLChangeUserPermissions) bool { +func (st *ACLState) hasPermission(identity string, permission aclpb.ACLChange_UserPermissions) bool { state, exists := st.userStates[identity] if !exists { return false @@ -329,7 +329,7 @@ func (st *ACLState) isUserAdd(ch *aclpb.ACLChange) bool { return ch.AclData.GetAclContent() != nil && userAdd != nil && userAdd.GetIdentity() == ch.Identity } -func (st *ACLState) getPermissionDecreasedUsers(ch *aclpb.ACLChange) (identities []*aclpb.ACLChangeUserPermissionChange) { +func (st *ACLState) getPermissionDecreasedUsers(ch *aclpb.ACLChange) (identities []*aclpb.ACLChange_UserPermissionChange) { // this should be called after general checks are completed if ch.GetAclData().GetAclContent() == nil { return nil @@ -343,7 +343,7 @@ func (st *ACLState) getPermissionDecreasedUsers(ch *aclpb.ACLChange) (identities currentState := st.userStates[content.Identity] // the comparison works in different direction :-) if content.Permissions > currentState.Permissions { - identities = append(identities, &aclpb.ACLChangeUserPermissionChange{ + identities = append(identities, &aclpb.ACLChange_UserPermissionChange{ Identity: content.Identity, Permissions: content.Permissions, }) @@ -351,7 +351,7 @@ func (st *ACLState) getPermissionDecreasedUsers(ch *aclpb.ACLChange) (identities } if c.GetUserRemove() != nil { content := c.GetUserRemove() - identities = append(identities, &aclpb.ACLChangeUserPermissionChange{ + identities = append(identities, &aclpb.ACLChange_UserPermissionChange{ Identity: content.Identity, Permissions: aclpb.ACLChange_Removed, }) @@ -405,7 +405,7 @@ func (st *ACLState) equal(other *ACLState) bool { return true } -func (st *ACLState) GetUserStates() map[string]*aclpb.ACLChangeUserState { +func (st *ACLState) GetUserStates() map[string]*aclpb.ACLChange_UserState { // TODO: we should provide better API that would not allow to change this map from the outside return st.userStates } diff --git a/pkg/acl/acltree/aclstatebuilder.go b/pkg/acl/acltree/aclstatebuilder.go index d63d535c..8528f9cf 100644 --- a/pkg/acl/acltree/aclstatebuilder.go +++ b/pkg/acl/acltree/aclstatebuilder.go @@ -16,7 +16,7 @@ type aclStateBuilder struct { } type decreasedPermissionsParameters struct { - users []*aclpb.ACLChangeUserPermissionChange + users []*aclpb.ACLChange_UserPermissionChange startChange string } diff --git a/pkg/acl/acltree/change.go b/pkg/acl/acltree/change.go index c768ef23..a615dfa9 100644 --- a/pkg/acl/acltree/change.go +++ b/pkg/acl/acltree/change.go @@ -10,7 +10,7 @@ import ( type ChangeContent struct { ChangesData proto.Marshaler - ACLData *aclpb.ACLChangeACLData + ACLData *aclpb.ACLChange_ACLData Id string // TODO: this is just for testing, because id should be created automatically from content } diff --git a/pkg/acl/acltree/changebuilder.go b/pkg/acl/acltree/changebuilder.go index b5b26b63..5bfb145f 100644 --- a/pkg/acl/acltree/changebuilder.go +++ b/pkg/acl/acltree/changebuilder.go @@ -14,7 +14,7 @@ import ( type MarshalledChange = []byte type ACLChangeBuilder interface { - UserAdd(identity string, encryptionKey encryptionkey.PubKey, permissions aclpb.ACLChangeUserPermissions) error + UserAdd(identity string, encryptionKey encryptionkey.PubKey, permissions aclpb.ACLChange_UserPermissions) error AddId(id string) // TODO: this is only for testing SetMakeSnapshot(bool) // TODO: who should decide this? probably ACLTree so we can delete it } @@ -29,7 +29,7 @@ type changeBuilder struct { tree *Tree acc *account.AccountData - aclData *aclpb.ACLChangeACLData + aclData *aclpb.ACLChange_ACLData changeContent proto.Marshaler id string makeSnapshot bool @@ -46,7 +46,7 @@ func (c *changeBuilder) Init(state *ACLState, tree *Tree, acc *account.AccountDa c.tree = tree c.acc = acc - c.aclData = &aclpb.ACLChangeACLData{} + c.aclData = &aclpb.ACLChange_ACLData{} // setting read key for further encryption etc if state.currentReadKeyHash == 0 { c.readKey, _ = symmetric.NewRandom() @@ -68,7 +68,7 @@ func (c *changeBuilder) SetMakeSnapshot(b bool) { c.makeSnapshot = b } -func (c *changeBuilder) UserAdd(identity string, encryptionKey encryptionkey.PubKey, permissions aclpb.ACLChangeUserPermissions) error { +func (c *changeBuilder) UserAdd(identity string, encryptionKey encryptionkey.PubKey, permissions aclpb.ACLChange_UserPermissions) error { var allKeys []*symmetric.Key if c.aclState.currentReadKeyHash != 0 { for _, key := range c.aclState.userReadKeys { @@ -91,9 +91,9 @@ func (c *changeBuilder) UserAdd(identity string, encryptionKey encryptionkey.Pub if err != nil { return err } - ch := &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserAdd{ - UserAdd: &aclpb.ACLChangeUserAdd{ + ch := &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContent_Value_UserAdd{ + UserAdd: &aclpb.ACLChange_UserAdd{ Identity: identity, EncryptionKey: rawKey, EncryptedReadKeys: encryptedKeys, diff --git a/pkg/acl/acltree/treegraph_nix.go b/pkg/acl/acltree/treegraph_nix.go index 4d798939..72dc0c7d 100644 --- a/pkg/acl/acltree/treegraph_nix.go +++ b/pkg/acl/acltree/treegraph_nix.go @@ -60,7 +60,7 @@ func (t *Tree) Graph() (data string, err error) { if c.Content.AclData != nil { for _, chc := range c.Content.AclData.AclContent { tp := fmt.Sprintf("%T", chc.Value) - tp = strings.Replace(tp, "ACLChangeACLContentValueValueOf", "", 1) + tp = strings.Replace(tp, "ACLChange_ACLContentValueValueOf", "", 1) res := "" for _, ts := range tp { if unicode.IsUpper(ts) { @@ -74,7 +74,7 @@ func (t *Tree) Graph() (data string, err error) { // TODO: add some parser to provide custom unmarshalling for the document change //for _, chc := range c.DecryptedDocumentChange.Content { // tp := fmt.Sprintf("%T", chc.Value) - // tp = strings.Replace(tp, "ChangeContentValueOf", "", 1) + // tp = strings.Replace(tp, "ChangeContent_Value_", "", 1) // res := "" // for _, ts := range tp { // if unicode.IsUpper(ts) { diff --git a/pkg/acl/example/plaintextdocument/document.go b/pkg/acl/example/plaintextdocument/document.go index d97bf430..2c66b5b1 100644 --- a/pkg/acl/example/plaintextdocument/document.go +++ b/pkg/acl/example/plaintextdocument/document.go @@ -34,8 +34,8 @@ func (p *plainTextDocument) Text() string { func (p *plainTextDocument) AddText(ctx context.Context, text string) error { _, err := p.aclTree.AddContent(ctx, func(builder acltree.ChangeBuilder) error { builder.AddChangeContent( - &testchangepb.PlainTextChangeData{ - Content: []*testchangepb.PlainTextChangeContent{ + &testchangepb.PlainTextChange_Data{ + Content: []*testchangepb.PlainTextChange_Content{ createAppendTextChangeContent(text), }, }) @@ -150,18 +150,18 @@ func NewPlainTextDocument( } func createInitialChangeContent(text string) proto.Marshaler { - return &testchangepb.PlainTextChangeData{ - Content: []*testchangepb.PlainTextChangeContent{ + return &testchangepb.PlainTextChange_Data{ + Content: []*testchangepb.PlainTextChange_Content{ createAppendTextChangeContent(text), }, - Snapshot: &testchangepb.PlainTextChangeSnapshot{Text: text}, + Snapshot: &testchangepb.PlainTextChange_Snapshot{Text: text}, } } -func createAppendTextChangeContent(text string) *testchangepb.PlainTextChangeContent { - return &testchangepb.PlainTextChangeContent{ - Value: &testchangepb.PlainTextChangeContentValueOfTextAppend{ - TextAppend: &testchangepb.PlainTextChangeTextAppend{ +func createAppendTextChangeContent(text string) *testchangepb.PlainTextChange_Content { + return &testchangepb.PlainTextChange_Content{ + Value: &testchangepb.PlainTextChange_Content_TextAppend{ + TextAppend: &testchangepb.PlainTextChange_TextAppend{ Text: text, }, }, diff --git a/pkg/acl/example/plaintextdocument/plaintextdocstate.go b/pkg/acl/example/plaintextdocument/plaintextdocstate.go index 3a3afec3..22ac1e4d 100644 --- a/pkg/acl/example/plaintextdocument/plaintextdocstate.go +++ b/pkg/acl/example/plaintextdocument/plaintextdocstate.go @@ -20,7 +20,7 @@ func NewDocumentState(text string, id string) *DocumentState { } func BuildDocumentStateFromChange(change []byte, id string) (*DocumentState, error) { - var changesData testchangepb.PlainTextChangeData + var changesData testchangepb.PlainTextChange_Data err := proto.Unmarshal(change, &changesData) if err != nil { return nil, err @@ -33,7 +33,7 @@ func BuildDocumentStateFromChange(change []byte, id string) (*DocumentState, err } func (p *DocumentState) ApplyChange(change []byte, id string) (*DocumentState, error) { - var changesData testchangepb.PlainTextChangeData + var changesData testchangepb.PlainTextChange_Data err := proto.Unmarshal(change, &changesData) if err != nil { return nil, err @@ -49,7 +49,7 @@ func (p *DocumentState) ApplyChange(change []byte, id string) (*DocumentState, e return p, nil } -func (p *DocumentState) applyChange(ch *testchangepb.PlainTextChangeContent) error { +func (p *DocumentState) applyChange(ch *testchangepb.PlainTextChange_Content) error { switch { case ch.GetTextAppend() != nil: text := ch.GetTextAppend().GetText() diff --git a/pkg/acl/testutils/testchanges/testchangepb/testdocumentchanges.pb.go b/pkg/acl/testutils/testchanges/testchangepb/testdocumentchanges.pb.go index 874061c6..cfec475b 100644 --- a/pkg/acl/testutils/testchanges/testchangepb/testdocumentchanges.pb.go +++ b/pkg/acl/testutils/testchanges/testchangepb/testdocumentchanges.pb.go @@ -58,24 +58,25 @@ func (m *PlainTextChange) XXX_DiscardUnknown() { var xxx_messageInfo_PlainTextChange proto.InternalMessageInfo -type PlainTextChangeContent struct { +type PlainTextChange_Content struct { // Types that are valid to be assigned to Value: - // *PlainTextChangeContentValueOfTextAppend - Value IsPlainTextChangeContentValue `protobuf_oneof:"value"` + // + // *PlainTextChange_Content_TextAppend + Value isPlainTextChange_Content_Value `protobuf_oneof:"value"` } -func (m *PlainTextChangeContent) Reset() { *m = PlainTextChangeContent{} } -func (m *PlainTextChangeContent) String() string { return proto.CompactTextString(m) } -func (*PlainTextChangeContent) ProtoMessage() {} -func (*PlainTextChangeContent) Descriptor() ([]byte, []int) { +func (m *PlainTextChange_Content) Reset() { *m = PlainTextChange_Content{} } +func (m *PlainTextChange_Content) String() string { return proto.CompactTextString(m) } +func (*PlainTextChange_Content) ProtoMessage() {} +func (*PlainTextChange_Content) Descriptor() ([]byte, []int) { return fileDescriptor_c07268f9f08f2beb, []int{0, 0} } -func (m *PlainTextChangeContent) XXX_Unmarshal(b []byte) error { +func (m *PlainTextChange_Content) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PlainTextChangeContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PlainTextChange_Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PlainTextChangeContent.Marshal(b, m, deterministic) + return xxx_messageInfo_PlainTextChange_Content.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -85,67 +86,67 @@ func (m *PlainTextChangeContent) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *PlainTextChangeContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTextChangeContent.Merge(m, src) +func (m *PlainTextChange_Content) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlainTextChange_Content.Merge(m, src) } -func (m *PlainTextChangeContent) XXX_Size() int { +func (m *PlainTextChange_Content) XXX_Size() int { return m.Size() } -func (m *PlainTextChangeContent) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTextChangeContent.DiscardUnknown(m) +func (m *PlainTextChange_Content) XXX_DiscardUnknown() { + xxx_messageInfo_PlainTextChange_Content.DiscardUnknown(m) } -var xxx_messageInfo_PlainTextChangeContent proto.InternalMessageInfo +var xxx_messageInfo_PlainTextChange_Content proto.InternalMessageInfo -type IsPlainTextChangeContentValue interface { - IsPlainTextChangeContentValue() +type isPlainTextChange_Content_Value interface { + isPlainTextChange_Content_Value() MarshalTo([]byte) (int, error) Size() int } -type PlainTextChangeContentValueOfTextAppend struct { - TextAppend *PlainTextChangeTextAppend `protobuf:"bytes,1,opt,name=textAppend,proto3,oneof" json:"textAppend,omitempty"` +type PlainTextChange_Content_TextAppend struct { + TextAppend *PlainTextChange_TextAppend `protobuf:"bytes,1,opt,name=textAppend,proto3,oneof" json:"textAppend,omitempty"` } -func (*PlainTextChangeContentValueOfTextAppend) IsPlainTextChangeContentValue() {} +func (*PlainTextChange_Content_TextAppend) isPlainTextChange_Content_Value() {} -func (m *PlainTextChangeContent) GetValue() IsPlainTextChangeContentValue { +func (m *PlainTextChange_Content) GetValue() isPlainTextChange_Content_Value { if m != nil { return m.Value } return nil } -func (m *PlainTextChangeContent) GetTextAppend() *PlainTextChangeTextAppend { - if x, ok := m.GetValue().(*PlainTextChangeContentValueOfTextAppend); ok { +func (m *PlainTextChange_Content) GetTextAppend() *PlainTextChange_TextAppend { + if x, ok := m.GetValue().(*PlainTextChange_Content_TextAppend); ok { return x.TextAppend } return nil } // XXX_OneofWrappers is for the internal use of the proto package. -func (*PlainTextChangeContent) XXX_OneofWrappers() []interface{} { +func (*PlainTextChange_Content) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*PlainTextChangeContentValueOfTextAppend)(nil), + (*PlainTextChange_Content_TextAppend)(nil), } } -type PlainTextChangeTextAppend struct { +type PlainTextChange_TextAppend struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` } -func (m *PlainTextChangeTextAppend) Reset() { *m = PlainTextChangeTextAppend{} } -func (m *PlainTextChangeTextAppend) String() string { return proto.CompactTextString(m) } -func (*PlainTextChangeTextAppend) ProtoMessage() {} -func (*PlainTextChangeTextAppend) Descriptor() ([]byte, []int) { +func (m *PlainTextChange_TextAppend) Reset() { *m = PlainTextChange_TextAppend{} } +func (m *PlainTextChange_TextAppend) String() string { return proto.CompactTextString(m) } +func (*PlainTextChange_TextAppend) ProtoMessage() {} +func (*PlainTextChange_TextAppend) Descriptor() ([]byte, []int) { return fileDescriptor_c07268f9f08f2beb, []int{0, 1} } -func (m *PlainTextChangeTextAppend) XXX_Unmarshal(b []byte) error { +func (m *PlainTextChange_TextAppend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PlainTextChangeTextAppend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PlainTextChange_TextAppend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PlainTextChangeTextAppend.Marshal(b, m, deterministic) + return xxx_messageInfo_PlainTextChange_TextAppend.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -155,41 +156,41 @@ func (m *PlainTextChangeTextAppend) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *PlainTextChangeTextAppend) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTextChangeTextAppend.Merge(m, src) +func (m *PlainTextChange_TextAppend) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlainTextChange_TextAppend.Merge(m, src) } -func (m *PlainTextChangeTextAppend) XXX_Size() int { +func (m *PlainTextChange_TextAppend) XXX_Size() int { return m.Size() } -func (m *PlainTextChangeTextAppend) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTextChangeTextAppend.DiscardUnknown(m) +func (m *PlainTextChange_TextAppend) XXX_DiscardUnknown() { + xxx_messageInfo_PlainTextChange_TextAppend.DiscardUnknown(m) } -var xxx_messageInfo_PlainTextChangeTextAppend proto.InternalMessageInfo +var xxx_messageInfo_PlainTextChange_TextAppend proto.InternalMessageInfo -func (m *PlainTextChangeTextAppend) GetText() string { +func (m *PlainTextChange_TextAppend) GetText() string { if m != nil { return m.Text } return "" } -type PlainTextChangeSnapshot struct { +type PlainTextChange_Snapshot struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` } -func (m *PlainTextChangeSnapshot) Reset() { *m = PlainTextChangeSnapshot{} } -func (m *PlainTextChangeSnapshot) String() string { return proto.CompactTextString(m) } -func (*PlainTextChangeSnapshot) ProtoMessage() {} -func (*PlainTextChangeSnapshot) Descriptor() ([]byte, []int) { +func (m *PlainTextChange_Snapshot) Reset() { *m = PlainTextChange_Snapshot{} } +func (m *PlainTextChange_Snapshot) String() string { return proto.CompactTextString(m) } +func (*PlainTextChange_Snapshot) ProtoMessage() {} +func (*PlainTextChange_Snapshot) Descriptor() ([]byte, []int) { return fileDescriptor_c07268f9f08f2beb, []int{0, 2} } -func (m *PlainTextChangeSnapshot) XXX_Unmarshal(b []byte) error { +func (m *PlainTextChange_Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PlainTextChangeSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PlainTextChange_Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PlainTextChangeSnapshot.Marshal(b, m, deterministic) + return xxx_messageInfo_PlainTextChange_Snapshot.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -199,42 +200,42 @@ func (m *PlainTextChangeSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *PlainTextChangeSnapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTextChangeSnapshot.Merge(m, src) +func (m *PlainTextChange_Snapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlainTextChange_Snapshot.Merge(m, src) } -func (m *PlainTextChangeSnapshot) XXX_Size() int { +func (m *PlainTextChange_Snapshot) XXX_Size() int { return m.Size() } -func (m *PlainTextChangeSnapshot) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTextChangeSnapshot.DiscardUnknown(m) +func (m *PlainTextChange_Snapshot) XXX_DiscardUnknown() { + xxx_messageInfo_PlainTextChange_Snapshot.DiscardUnknown(m) } -var xxx_messageInfo_PlainTextChangeSnapshot proto.InternalMessageInfo +var xxx_messageInfo_PlainTextChange_Snapshot proto.InternalMessageInfo -func (m *PlainTextChangeSnapshot) GetText() string { +func (m *PlainTextChange_Snapshot) GetText() string { if m != nil { return m.Text } return "" } -type PlainTextChangeData struct { - Content []*PlainTextChangeContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` - Snapshot *PlainTextChangeSnapshot `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +type PlainTextChange_Data struct { + Content []*PlainTextChange_Content `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` + Snapshot *PlainTextChange_Snapshot `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"` } -func (m *PlainTextChangeData) Reset() { *m = PlainTextChangeData{} } -func (m *PlainTextChangeData) String() string { return proto.CompactTextString(m) } -func (*PlainTextChangeData) ProtoMessage() {} -func (*PlainTextChangeData) Descriptor() ([]byte, []int) { +func (m *PlainTextChange_Data) Reset() { *m = PlainTextChange_Data{} } +func (m *PlainTextChange_Data) String() string { return proto.CompactTextString(m) } +func (*PlainTextChange_Data) ProtoMessage() {} +func (*PlainTextChange_Data) Descriptor() ([]byte, []int) { return fileDescriptor_c07268f9f08f2beb, []int{0, 3} } -func (m *PlainTextChangeData) XXX_Unmarshal(b []byte) error { +func (m *PlainTextChange_Data) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PlainTextChangeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PlainTextChange_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PlainTextChangeData.Marshal(b, m, deterministic) + return xxx_messageInfo_PlainTextChange_Data.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -244,26 +245,26 @@ func (m *PlainTextChangeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *PlainTextChangeData) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTextChangeData.Merge(m, src) +func (m *PlainTextChange_Data) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlainTextChange_Data.Merge(m, src) } -func (m *PlainTextChangeData) XXX_Size() int { +func (m *PlainTextChange_Data) XXX_Size() int { return m.Size() } -func (m *PlainTextChangeData) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTextChangeData.DiscardUnknown(m) +func (m *PlainTextChange_Data) XXX_DiscardUnknown() { + xxx_messageInfo_PlainTextChange_Data.DiscardUnknown(m) } -var xxx_messageInfo_PlainTextChangeData proto.InternalMessageInfo +var xxx_messageInfo_PlainTextChange_Data proto.InternalMessageInfo -func (m *PlainTextChangeData) GetContent() []*PlainTextChangeContent { +func (m *PlainTextChange_Data) GetContent() []*PlainTextChange_Content { if m != nil { return m.Content } return nil } -func (m *PlainTextChangeData) GetSnapshot() *PlainTextChangeSnapshot { +func (m *PlainTextChange_Data) GetSnapshot() *PlainTextChange_Snapshot { if m != nil { return m.Snapshot } @@ -272,10 +273,10 @@ func (m *PlainTextChangeData) GetSnapshot() *PlainTextChangeSnapshot { func init() { proto.RegisterType((*PlainTextChange)(nil), "anytype.PlainTextChange") - proto.RegisterType((*PlainTextChangeContent)(nil), "anytype.PlainTextChange.Content") - proto.RegisterType((*PlainTextChangeTextAppend)(nil), "anytype.PlainTextChange.TextAppend") - proto.RegisterType((*PlainTextChangeSnapshot)(nil), "anytype.PlainTextChange.Snapshot") - proto.RegisterType((*PlainTextChangeData)(nil), "anytype.PlainTextChange.Data") + proto.RegisterType((*PlainTextChange_Content)(nil), "anytype.PlainTextChange.Content") + proto.RegisterType((*PlainTextChange_TextAppend)(nil), "anytype.PlainTextChange.TextAppend") + proto.RegisterType((*PlainTextChange_Snapshot)(nil), "anytype.PlainTextChange.Snapshot") + proto.RegisterType((*PlainTextChange_Data)(nil), "anytype.PlainTextChange.Data") } func init() { @@ -327,7 +328,7 @@ func (m *PlainTextChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PlainTextChangeContent) Marshal() (dAtA []byte, err error) { +func (m *PlainTextChange_Content) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -337,12 +338,12 @@ func (m *PlainTextChangeContent) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PlainTextChangeContent) MarshalTo(dAtA []byte) (int, error) { +func (m *PlainTextChange_Content) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PlainTextChangeContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PlainTextChange_Content) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -359,12 +360,12 @@ func (m *PlainTextChangeContent) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *PlainTextChangeContentValueOfTextAppend) MarshalTo(dAtA []byte) (int, error) { +func (m *PlainTextChange_Content_TextAppend) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PlainTextChangeContentValueOfTextAppend) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PlainTextChange_Content_TextAppend) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.TextAppend != nil { { @@ -380,7 +381,7 @@ func (m *PlainTextChangeContentValueOfTextAppend) MarshalToSizedBuffer(dAtA []by } return len(dAtA) - i, nil } -func (m *PlainTextChangeTextAppend) Marshal() (dAtA []byte, err error) { +func (m *PlainTextChange_TextAppend) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -390,12 +391,12 @@ func (m *PlainTextChangeTextAppend) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PlainTextChangeTextAppend) MarshalTo(dAtA []byte) (int, error) { +func (m *PlainTextChange_TextAppend) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PlainTextChangeTextAppend) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PlainTextChange_TextAppend) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -410,7 +411,7 @@ func (m *PlainTextChangeTextAppend) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *PlainTextChangeSnapshot) Marshal() (dAtA []byte, err error) { +func (m *PlainTextChange_Snapshot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -420,12 +421,12 @@ func (m *PlainTextChangeSnapshot) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PlainTextChangeSnapshot) MarshalTo(dAtA []byte) (int, error) { +func (m *PlainTextChange_Snapshot) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PlainTextChangeSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PlainTextChange_Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -440,7 +441,7 @@ func (m *PlainTextChangeSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *PlainTextChangeData) Marshal() (dAtA []byte, err error) { +func (m *PlainTextChange_Data) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -450,12 +451,12 @@ func (m *PlainTextChangeData) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PlainTextChangeData) MarshalTo(dAtA []byte) (int, error) { +func (m *PlainTextChange_Data) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PlainTextChangeData) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PlainTextChange_Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -509,7 +510,7 @@ func (m *PlainTextChange) Size() (n int) { return n } -func (m *PlainTextChangeContent) Size() (n int) { +func (m *PlainTextChange_Content) Size() (n int) { if m == nil { return 0 } @@ -521,7 +522,7 @@ func (m *PlainTextChangeContent) Size() (n int) { return n } -func (m *PlainTextChangeContentValueOfTextAppend) Size() (n int) { +func (m *PlainTextChange_Content_TextAppend) Size() (n int) { if m == nil { return 0 } @@ -533,7 +534,7 @@ func (m *PlainTextChangeContentValueOfTextAppend) Size() (n int) { } return n } -func (m *PlainTextChangeTextAppend) Size() (n int) { +func (m *PlainTextChange_TextAppend) Size() (n int) { if m == nil { return 0 } @@ -546,7 +547,7 @@ func (m *PlainTextChangeTextAppend) Size() (n int) { return n } -func (m *PlainTextChangeSnapshot) Size() (n int) { +func (m *PlainTextChange_Snapshot) Size() (n int) { if m == nil { return 0 } @@ -559,7 +560,7 @@ func (m *PlainTextChangeSnapshot) Size() (n int) { return n } -func (m *PlainTextChangeData) Size() (n int) { +func (m *PlainTextChange_Data) Size() (n int) { if m == nil { return 0 } @@ -634,7 +635,7 @@ func (m *PlainTextChange) Unmarshal(dAtA []byte) error { } return nil } -func (m *PlainTextChangeContent) Unmarshal(dAtA []byte) error { +func (m *PlainTextChange_Content) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -692,11 +693,11 @@ func (m *PlainTextChangeContent) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &PlainTextChangeTextAppend{} + v := &PlainTextChange_TextAppend{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &PlainTextChangeContentValueOfTextAppend{v} + m.Value = &PlainTextChange_Content_TextAppend{v} iNdEx = postIndex default: iNdEx = preIndex @@ -719,7 +720,7 @@ func (m *PlainTextChangeContent) Unmarshal(dAtA []byte) error { } return nil } -func (m *PlainTextChangeTextAppend) Unmarshal(dAtA []byte) error { +func (m *PlainTextChange_TextAppend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -801,7 +802,7 @@ func (m *PlainTextChangeTextAppend) Unmarshal(dAtA []byte) error { } return nil } -func (m *PlainTextChangeSnapshot) Unmarshal(dAtA []byte) error { +func (m *PlainTextChange_Snapshot) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -883,7 +884,7 @@ func (m *PlainTextChangeSnapshot) Unmarshal(dAtA []byte) error { } return nil } -func (m *PlainTextChangeData) Unmarshal(dAtA []byte) error { +func (m *PlainTextChange_Data) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -941,7 +942,7 @@ func (m *PlainTextChangeData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Content = append(m.Content, &PlainTextChangeContent{}) + m.Content = append(m.Content, &PlainTextChange_Content{}) if err := m.Content[len(m.Content)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -976,7 +977,7 @@ func (m *PlainTextChangeData) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Snapshot == nil { - m.Snapshot = &PlainTextChangeSnapshot{} + m.Snapshot = &PlainTextChange_Snapshot{} } if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/pkg/acl/testutils/treestoragebuilder/treestoragebuilder.go b/pkg/acl/testutils/treestoragebuilder/treestoragebuilder.go index f7bb65bd..3b7c6f7d 100644 --- a/pkg/acl/testutils/treestoragebuilder/treestoragebuilder.go +++ b/pkg/acl/testutils/treestoragebuilder/treestoragebuilder.go @@ -239,12 +239,12 @@ func (t *TreeStorageBuilder) parseChange(ch *Change) *treeChange { aclChange := &aclpb.ACLChange{} aclChange.Identity = t.keychain.GetIdentity(ch.Identity) if len(ch.AclChanges) > 0 || ch.AclSnapshot != nil { - aclChange.AclData = &aclpb.ACLChangeACLData{} + aclChange.AclData = &aclpb.ACLChange_ACLData{} if ch.AclSnapshot != nil { aclChange.AclData.AclSnapshot = t.parseACLSnapshot(ch.AclSnapshot) } if ch.AclChanges != nil { - var aclChangeContents []*aclpb.ACLChangeACLContentValue + var aclChangeContents []*aclpb.ACLChange_ACLContentValue for _, ch := range ch.AclChanges { aclChangeContent := t.parseACLChange(ch) aclChangeContents = append(aclChangeContents, aclChangeContent) @@ -253,12 +253,12 @@ func (t *TreeStorageBuilder) parseChange(ch *Change) *treeChange { } } if len(ch.Changes) > 0 || ch.Snapshot != nil { - changesData := &testpb.PlainTextChangeData{} + changesData := &testpb.PlainTextChange_Data{} if ch.Snapshot != nil { changesData.Snapshot = t.parseChangeSnapshot(ch.Snapshot) } if len(ch.Changes) > 0 { - var changeContents []*testpb.PlainTextChangeContent + var changeContents []*testpb.PlainTextChange_Content for _, ch := range ch.Changes { aclChangeContent := t.parseDocumentChange(ch) changeContents = append(changeContents, aclChangeContent) @@ -283,16 +283,16 @@ func (t *TreeStorageBuilder) parseTreeId(description *TreeDescription) string { return description.Author + ".tree.id" } -func (t *TreeStorageBuilder) parseChangeSnapshot(s *PlainTextSnapshot) *testpb.PlainTextChangeSnapshot { - return &testpb.PlainTextChangeSnapshot{ +func (t *TreeStorageBuilder) parseChangeSnapshot(s *PlainTextSnapshot) *testpb.PlainTextChange_Snapshot { + return &testpb.PlainTextChange_Snapshot{ Text: s.Text, } } -func (t *TreeStorageBuilder) parseACLSnapshot(s *ACLSnapshot) *aclpb.ACLChangeACLSnapshot { - newState := &aclpb.ACLChangeACLState{} +func (t *TreeStorageBuilder) parseACLSnapshot(s *ACLSnapshot) *aclpb.ACLChange_ACLSnapshot { + newState := &aclpb.ACLChange_ACLState{} for _, state := range s.UserStates { - aclUserState := &aclpb.ACLChangeUserState{} + aclUserState := &aclpb.ACLChange_UserState{} aclUserState.Identity = t.keychain.GetIdentity(state.Identity) encKey := t.keychain. @@ -304,17 +304,17 @@ func (t *TreeStorageBuilder) parseACLSnapshot(s *ACLSnapshot) *aclpb.ACLChangeAC aclUserState.Permissions = t.convertPermission(state.Permissions) newState.UserStates = append(newState.UserStates, aclUserState) } - return &aclpb.ACLChangeACLSnapshot{ + return &aclpb.ACLChange_ACLSnapshot{ AclState: newState, } } -func (t *TreeStorageBuilder) parseDocumentChange(ch *PlainTextChange) (convCh *testpb.PlainTextChangeContent) { +func (t *TreeStorageBuilder) parseDocumentChange(ch *PlainTextChange) (convCh *testpb.PlainTextChange_Content) { switch { case ch.TextAppend != nil: - convCh = &testpb.PlainTextChangeContent{ - Value: &testpb.PlainTextChangeContentValueOfTextAppend{ - TextAppend: &testpb.PlainTextChangeTextAppend{ + convCh = &testpb.PlainTextChange_Content{ + Value: &testpb.PlainTextChange_Content_TextAppend{ + TextAppend: &testpb.PlainTextChange_TextAppend{ Text: ch.TextAppend.Text, }, }, @@ -327,7 +327,7 @@ func (t *TreeStorageBuilder) parseDocumentChange(ch *PlainTextChange) (convCh *t return convCh } -func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLChangeACLContentValue) { +func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLChange_ACLContentValue) { switch { case ch.UserAdd != nil: add := ch.UserAdd @@ -336,9 +336,9 @@ func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLCha GetKey(add.EncryptionKey).(encryptionkey.PrivKey) rawKey, _ := encKey.GetPublic().Raw() - convCh = &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserAdd{ - UserAdd: &aclpb.ACLChangeUserAdd{ + convCh = &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContent_Value_UserAdd{ + UserAdd: &aclpb.ACLChange_UserAdd{ Identity: t.keychain.GetIdentity(add.Identity), EncryptionKey: rawKey, EncryptedReadKeys: t.encryptReadKeys(add.EncryptedReadKeys, encKey), @@ -360,9 +360,9 @@ func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLCha panic(err) } - convCh = &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserJoin{ - UserJoin: &aclpb.ACLChangeUserJoin{ + convCh = &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContentValueValueOfUserJoin{ + UserJoin: &aclpb.ACLChange_UserJoin{ Identity: t.keychain.GetIdentity(join.Identity), EncryptionKey: rawKey, AcceptSignature: signature, @@ -378,9 +378,9 @@ func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLCha GetKey(invite.EncryptionKey).(encryptionkey.PrivKey) rawEncKey, _ := encKey.GetPublic().Raw() - convCh = &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserInvite{ - UserInvite: &aclpb.ACLChangeUserInvite{ + convCh = &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContentValueValueOfUserInvite{ + UserInvite: &aclpb.ACLChange_UserInvite{ AcceptPublicKey: rawAcceptKey, EncryptPublicKey: rawEncKey, EncryptedReadKeys: t.encryptReadKeys(invite.EncryptedReadKeys, encKey), @@ -392,9 +392,9 @@ func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLCha case ch.UserConfirm != nil: confirm := ch.UserConfirm - convCh = &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserConfirm{ - UserConfirm: &aclpb.ACLChangeUserConfirm{ + convCh = &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContentValueValueOfUserConfirm{ + UserConfirm: &aclpb.ACLChange_UserConfirm{ Identity: t.keychain.GetIdentity(confirm.Identity), UserAddId: confirm.UserAddId, }, @@ -403,9 +403,9 @@ func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLCha case ch.UserPermissionChange != nil: permissionChange := ch.UserPermissionChange - convCh = &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserPermissionChange{ - UserPermissionChange: &aclpb.ACLChangeUserPermissionChange{ + convCh = &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContentValueValueOfUserPermissionChange{ + UserPermissionChange: &aclpb.ACLChange_UserPermissionChange{ Identity: t.keychain.GetIdentity(permissionChange.Identity), Permissions: t.convertPermission(permissionChange.Permission), }, @@ -432,9 +432,9 @@ func (t *TreeStorageBuilder) parseACLChange(ch *ACLChange) (convCh *aclpb.ACLCha }) } - convCh = &aclpb.ACLChangeACLContentValue{ - Value: &aclpb.ACLChangeACLContentValueValueOfUserRemove{ - UserRemove: &aclpb.ACLChangeUserRemove{ + convCh = &aclpb.ACLChange_ACLContentValue{ + Value: &aclpb.ACLChange_ACLContentValueValueOfUserRemove{ + UserRemove: &aclpb.ACLChange_UserRemove{ Identity: t.keychain.GetIdentity(remove.RemovedIdentity), ReadKeyReplaces: replaces, }, @@ -461,7 +461,7 @@ func (t *TreeStorageBuilder) encryptReadKeys(keys []string, encKey encryptionkey return } -func (t *TreeStorageBuilder) convertPermission(perm string) aclpb.ACLChangeUserPermissions { +func (t *TreeStorageBuilder) convertPermission(perm string) aclpb.ACLChange_UserPermissions { switch perm { case "admin": return aclpb.ACLChange_Admin diff --git a/pkg/acl/testutils/treestoragebuilder/treestoragebuildergraph_nix.go b/pkg/acl/testutils/treestoragebuilder/treestoragebuildergraph_nix.go index 935fd711..9d973a24 100644 --- a/pkg/acl/testutils/treestoragebuilder/treestoragebuildergraph_nix.go +++ b/pkg/acl/testutils/treestoragebuilder/treestoragebuildergraph_nix.go @@ -45,7 +45,7 @@ func (t *TreeStorageBuilder) Graph() (string, error) { var chSymbs []string if r.changesDataDecrypted != nil { - res := &testpb.PlainTextChangeData{} + res := &testpb.PlainTextChange_Data{} err := proto.Unmarshal(r.changesDataDecrypted, res) if err != nil { return err @@ -53,7 +53,7 @@ func (t *TreeStorageBuilder) Graph() (string, error) { for _, chc := range res.Content { tp := fmt.Sprintf("%T", chc.Value) - tp = strings.Replace(tp, "ChangeContentValueOf", "", 1) + tp = strings.Replace(tp, "ChangeContent_Value_", "", 1) res := "" for _, ts := range tp { if unicode.IsUpper(ts) { @@ -66,7 +66,7 @@ func (t *TreeStorageBuilder) Graph() (string, error) { if r.GetAclData() != nil { for _, chc := range r.GetAclData().AclContent { tp := fmt.Sprintf("%T", chc.Value) - tp = strings.Replace(tp, "ACLChangeACLContentValueValueOf", "", 1) + tp = strings.Replace(tp, "ACLChange_ACLContentValueValueOf", "", 1) res := "" for _, ts := range tp { if unicode.IsUpper(ts) { diff --git a/service/net/pool/message.go b/service/net/pool/message.go index 7535a55f..15a76f2e 100644 --- a/service/net/pool/message.go +++ b/service/net/pool/message.go @@ -48,7 +48,7 @@ func (m *Message) ReplyType(tp syncproto.MessageType, data proto.Marshaler) (err func (m *Message) Ack() (err error) { ack := &syncproto.System{ - Ack: &syncproto.SystemAck{}, + Ack: &syncproto.System_Ack{}, } data, err := ack.Marshal() if err != nil { @@ -78,10 +78,10 @@ func (m *Message) Ack() (err error) { return } -func (m *Message) AckError(code syncproto.SystemErrorCode, description string) (err error) { +func (m *Message) AckError(code syncproto.System_Error_Code, description string) (err error) { ack := &syncproto.System{ - Ack: &syncproto.SystemAck{ - Error: &syncproto.SystemError{ + Ack: &syncproto.System_Ack{ + Error: &syncproto.System_Error{ Code: code, Description: description, }, diff --git a/service/space/remotediff/remotediff.go b/service/space/remotediff/remotediff.go index 6ace7a33..0bab5350 100644 --- a/service/space/remotediff/remotediff.go +++ b/service/space/remotediff/remotediff.go @@ -25,9 +25,9 @@ type remote struct { func (r remote) Ranges(ctx context.Context, ranges []ldiff.Range, resBuf []ldiff.RangeResult) (results []ldiff.RangeResult, err error) { results = resBuf[:0] - pbRanges := make([]*spacesync.DiffRangeRequestRange, 0, len(ranges)) + pbRanges := make([]*spacesync.DiffRange_Request_Range, 0, len(ranges)) for _, rg := range ranges { - pbRanges = append(pbRanges, &spacesync.DiffRangeRequestRange{ + pbRanges = append(pbRanges, &spacesync.DiffRange_Request_Range{ From: rg.From, To: rg.To, Limit: uint32(rg.Limit), @@ -35,10 +35,10 @@ func (r remote) Ranges(ctx context.Context, ranges []ldiff.Range, resBuf []ldiff } req := &spacesync.Space{ SpaceId: r.spaceId, - Message: &spacesync.SpaceContent{ - Value: &spacesync.SpaceContentValueOfDiffRange{ + Message: &spacesync.Space_Content{ + Value: &spacesync.Space_Content_DiffRange{ DiffRange: &spacesync.DiffRange{ - Request: &spacesync.DiffRangeRequest{ + Request: &spacesync.DiffRange_Request{ Ranges: pbRanges, }, }, @@ -99,21 +99,21 @@ func HandlerRangeRequest(ctx context.Context, d ldiff.Diff, diffRange *spacesync return } - var rangeResp = &spacesync.DiffRangeResponse{ - Results: make([]*spacesync.DiffRangeResponseResult, len(res)), + var rangeResp = &spacesync.DiffRange_Response{ + Results: make([]*spacesync.DiffRange_Response_Result, len(res)), } for _, rangeRes := range res { - var elements []*spacesync.DiffRangeResponseResultElement + var elements []*spacesync.DiffRange_Response_Result_Element if len(rangeRes.Elements) > 0 { - elements = make([]*spacesync.DiffRangeResponseResultElement, 0, len(rangeRes.Elements)) + elements = make([]*spacesync.DiffRange_Response_Result_Element, 0, len(rangeRes.Elements)) for _, el := range rangeRes.Elements { - elements = append(elements, &spacesync.DiffRangeResponseResultElement{ + elements = append(elements, &spacesync.DiffRange_Response_Result_Element{ Id: el.Id, Head: el.Head, }) } } - rangeResp.Results = append(rangeResp.Results, &spacesync.DiffRangeResponseResult{ + rangeResp.Results = append(rangeResp.Results, &spacesync.DiffRange_Response_Result{ Hash: rangeRes.Hash, Elements: elements, Count: uint32(rangeRes.Count), diff --git a/service/space/service.go b/service/space/service.go index 364ce91d..5e61366d 100644 --- a/service/space/service.go +++ b/service/space/service.go @@ -78,9 +78,9 @@ func (s *service) Handle(ctx context.Context, data []byte) (resp proto.Marshaler return } if spaceReq.SpaceId != "" { - sp, err := s.get(ctx, spaceReq.SpaceId) - if err != nil { - return + sp, e := s.get(ctx, spaceReq.SpaceId) + if e != nil { + return nil, e } return sp.Handle(ctx, spaceReq) } diff --git a/service/space/space.go b/service/space/space.go index 776df945..f35452c1 100644 --- a/service/space/space.go +++ b/service/space/space.go @@ -73,7 +73,7 @@ func (s *space) Handle(ctx context.Context, msg *spacesync.Space) (repl *spacesy return nil, er } return &spacesync.Space{SpaceId: s.id, Message: &spacesync.SpaceContent{ - Value: &spacesync.SpaceContentValueOfDiffRange{ + Value: &spacesync.SpaceContent_Value_DiffRange{ DiffRange: resp, }, }}, nil diff --git a/service/space/spacesync/spacesync.pb.go b/service/space/spacesync/spacesync.pb.go index 530c11e3..af6fd478 100644 --- a/service/space/spacesync/spacesync.pb.go +++ b/service/space/spacesync/spacesync.pb.go @@ -23,8 +23,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Space struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Message *SpaceContent `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Message *Space_Content `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (m *Space) Reset() { *m = Space{} } @@ -67,31 +67,32 @@ func (m *Space) GetSpaceId() string { return "" } -func (m *Space) GetMessage() *SpaceContent { +func (m *Space) GetMessage() *Space_Content { if m != nil { return m.Message } return nil } -type SpaceContent struct { +type Space_Content struct { // Types that are valid to be assigned to Value: - // *SpaceContentValueOfDiffRange - Value IsSpaceContentValue `protobuf_oneof:"value"` + // + // *Space_Content_DiffRange + Value isSpace_Content_Value `protobuf_oneof:"value"` } -func (m *SpaceContent) Reset() { *m = SpaceContent{} } -func (m *SpaceContent) String() string { return proto.CompactTextString(m) } -func (*SpaceContent) ProtoMessage() {} -func (*SpaceContent) Descriptor() ([]byte, []int) { +func (m *Space_Content) Reset() { *m = Space_Content{} } +func (m *Space_Content) String() string { return proto.CompactTextString(m) } +func (*Space_Content) ProtoMessage() {} +func (*Space_Content) Descriptor() ([]byte, []int) { return fileDescriptor_11d78c2fb7c80384, []int{0, 0} } -func (m *SpaceContent) XXX_Unmarshal(b []byte) error { +func (m *Space_Content) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SpaceContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Space_Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SpaceContent.Marshal(b, m, deterministic) + return xxx_messageInfo_Space_Content.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -101,54 +102,54 @@ func (m *SpaceContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *SpaceContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpaceContent.Merge(m, src) +func (m *Space_Content) XXX_Merge(src proto.Message) { + xxx_messageInfo_Space_Content.Merge(m, src) } -func (m *SpaceContent) XXX_Size() int { +func (m *Space_Content) XXX_Size() int { return m.Size() } -func (m *SpaceContent) XXX_DiscardUnknown() { - xxx_messageInfo_SpaceContent.DiscardUnknown(m) +func (m *Space_Content) XXX_DiscardUnknown() { + xxx_messageInfo_Space_Content.DiscardUnknown(m) } -var xxx_messageInfo_SpaceContent proto.InternalMessageInfo +var xxx_messageInfo_Space_Content proto.InternalMessageInfo -type IsSpaceContentValue interface { - IsSpaceContentValue() +type isSpace_Content_Value interface { + isSpace_Content_Value() MarshalTo([]byte) (int, error) Size() int } -type SpaceContentValueOfDiffRange struct { +type Space_Content_DiffRange struct { DiffRange *DiffRange `protobuf:"bytes,1,opt,name=diffRange,proto3,oneof" json:"diffRange,omitempty"` } -func (*SpaceContentValueOfDiffRange) IsSpaceContentValue() {} +func (*Space_Content_DiffRange) isSpace_Content_Value() {} -func (m *SpaceContent) GetValue() IsSpaceContentValue { +func (m *Space_Content) GetValue() isSpace_Content_Value { if m != nil { return m.Value } return nil } -func (m *SpaceContent) GetDiffRange() *DiffRange { - if x, ok := m.GetValue().(*SpaceContentValueOfDiffRange); ok { +func (m *Space_Content) GetDiffRange() *DiffRange { + if x, ok := m.GetValue().(*Space_Content_DiffRange); ok { return x.DiffRange } return nil } // XXX_OneofWrappers is for the internal use of the proto package. -func (*SpaceContent) XXX_OneofWrappers() []interface{} { +func (*Space_Content) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*SpaceContentValueOfDiffRange)(nil), + (*Space_Content_DiffRange)(nil), } } type DiffRange struct { - Request *DiffRangeRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - Response *DiffRangeResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` + Request *DiffRange_Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Response *DiffRange_Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` } func (m *DiffRange) Reset() { *m = DiffRange{} } @@ -184,36 +185,36 @@ func (m *DiffRange) XXX_DiscardUnknown() { var xxx_messageInfo_DiffRange proto.InternalMessageInfo -func (m *DiffRange) GetRequest() *DiffRangeRequest { +func (m *DiffRange) GetRequest() *DiffRange_Request { if m != nil { return m.Request } return nil } -func (m *DiffRange) GetResponse() *DiffRangeResponse { +func (m *DiffRange) GetResponse() *DiffRange_Response { if m != nil { return m.Response } return nil } -type DiffRangeRequest struct { - Ranges []*DiffRangeRequestRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` +type DiffRange_Request struct { + Ranges []*DiffRange_Request_Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` } -func (m *DiffRangeRequest) Reset() { *m = DiffRangeRequest{} } -func (m *DiffRangeRequest) String() string { return proto.CompactTextString(m) } -func (*DiffRangeRequest) ProtoMessage() {} -func (*DiffRangeRequest) Descriptor() ([]byte, []int) { +func (m *DiffRange_Request) Reset() { *m = DiffRange_Request{} } +func (m *DiffRange_Request) String() string { return proto.CompactTextString(m) } +func (*DiffRange_Request) ProtoMessage() {} +func (*DiffRange_Request) Descriptor() ([]byte, []int) { return fileDescriptor_11d78c2fb7c80384, []int{1, 0} } -func (m *DiffRangeRequest) XXX_Unmarshal(b []byte) error { +func (m *DiffRange_Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DiffRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DiffRange_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DiffRangeRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_DiffRange_Request.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -223,43 +224,43 @@ func (m *DiffRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *DiffRangeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiffRangeRequest.Merge(m, src) +func (m *DiffRange_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiffRange_Request.Merge(m, src) } -func (m *DiffRangeRequest) XXX_Size() int { +func (m *DiffRange_Request) XXX_Size() int { return m.Size() } -func (m *DiffRangeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DiffRangeRequest.DiscardUnknown(m) +func (m *DiffRange_Request) XXX_DiscardUnknown() { + xxx_messageInfo_DiffRange_Request.DiscardUnknown(m) } -var xxx_messageInfo_DiffRangeRequest proto.InternalMessageInfo +var xxx_messageInfo_DiffRange_Request proto.InternalMessageInfo -func (m *DiffRangeRequest) GetRanges() []*DiffRangeRequestRange { +func (m *DiffRange_Request) GetRanges() []*DiffRange_Request_Range { if m != nil { return m.Ranges } return nil } -type DiffRangeRequestRange struct { +type DiffRange_Request_Range 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"` } -func (m *DiffRangeRequestRange) Reset() { *m = DiffRangeRequestRange{} } -func (m *DiffRangeRequestRange) String() string { return proto.CompactTextString(m) } -func (*DiffRangeRequestRange) ProtoMessage() {} -func (*DiffRangeRequestRange) Descriptor() ([]byte, []int) { +func (m *DiffRange_Request_Range) Reset() { *m = DiffRange_Request_Range{} } +func (m *DiffRange_Request_Range) String() string { return proto.CompactTextString(m) } +func (*DiffRange_Request_Range) ProtoMessage() {} +func (*DiffRange_Request_Range) Descriptor() ([]byte, []int) { return fileDescriptor_11d78c2fb7c80384, []int{1, 0, 0} } -func (m *DiffRangeRequestRange) XXX_Unmarshal(b []byte) error { +func (m *DiffRange_Request_Range) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DiffRangeRequestRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DiffRange_Request_Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DiffRangeRequestRange.Marshal(b, m, deterministic) + return xxx_messageInfo_DiffRange_Request_Range.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -269,55 +270,55 @@ func (m *DiffRangeRequestRange) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *DiffRangeRequestRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiffRangeRequestRange.Merge(m, src) +func (m *DiffRange_Request_Range) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiffRange_Request_Range.Merge(m, src) } -func (m *DiffRangeRequestRange) XXX_Size() int { +func (m *DiffRange_Request_Range) XXX_Size() int { return m.Size() } -func (m *DiffRangeRequestRange) XXX_DiscardUnknown() { - xxx_messageInfo_DiffRangeRequestRange.DiscardUnknown(m) +func (m *DiffRange_Request_Range) XXX_DiscardUnknown() { + xxx_messageInfo_DiffRange_Request_Range.DiscardUnknown(m) } -var xxx_messageInfo_DiffRangeRequestRange proto.InternalMessageInfo +var xxx_messageInfo_DiffRange_Request_Range proto.InternalMessageInfo -func (m *DiffRangeRequestRange) GetFrom() uint64 { +func (m *DiffRange_Request_Range) GetFrom() uint64 { if m != nil { return m.From } return 0 } -func (m *DiffRangeRequestRange) GetTo() uint64 { +func (m *DiffRange_Request_Range) GetTo() uint64 { if m != nil { return m.To } return 0 } -func (m *DiffRangeRequestRange) GetLimit() uint32 { +func (m *DiffRange_Request_Range) GetLimit() uint32 { if m != nil { return m.Limit } return 0 } -type DiffRangeResponse struct { - Results []*DiffRangeResponseResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +type DiffRange_Response struct { + Results []*DiffRange_Response_Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } -func (m *DiffRangeResponse) Reset() { *m = DiffRangeResponse{} } -func (m *DiffRangeResponse) String() string { return proto.CompactTextString(m) } -func (*DiffRangeResponse) ProtoMessage() {} -func (*DiffRangeResponse) Descriptor() ([]byte, []int) { +func (m *DiffRange_Response) Reset() { *m = DiffRange_Response{} } +func (m *DiffRange_Response) String() string { return proto.CompactTextString(m) } +func (*DiffRange_Response) ProtoMessage() {} +func (*DiffRange_Response) Descriptor() ([]byte, []int) { return fileDescriptor_11d78c2fb7c80384, []int{1, 1} } -func (m *DiffRangeResponse) XXX_Unmarshal(b []byte) error { +func (m *DiffRange_Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DiffRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DiffRange_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DiffRangeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_DiffRange_Response.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -327,43 +328,43 @@ func (m *DiffRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *DiffRangeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiffRangeResponse.Merge(m, src) +func (m *DiffRange_Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiffRange_Response.Merge(m, src) } -func (m *DiffRangeResponse) XXX_Size() int { +func (m *DiffRange_Response) XXX_Size() int { return m.Size() } -func (m *DiffRangeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DiffRangeResponse.DiscardUnknown(m) +func (m *DiffRange_Response) XXX_DiscardUnknown() { + xxx_messageInfo_DiffRange_Response.DiscardUnknown(m) } -var xxx_messageInfo_DiffRangeResponse proto.InternalMessageInfo +var xxx_messageInfo_DiffRange_Response proto.InternalMessageInfo -func (m *DiffRangeResponse) GetResults() []*DiffRangeResponseResult { +func (m *DiffRange_Response) GetResults() []*DiffRange_Response_Result { if m != nil { return m.Results } return nil } -type DiffRangeResponseResult struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Elements []*DiffRangeResponseResultElement `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"` - Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` +type DiffRange_Response_Result struct { + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Elements []*DiffRange_Response_Result_Element `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"` + Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` } -func (m *DiffRangeResponseResult) Reset() { *m = DiffRangeResponseResult{} } -func (m *DiffRangeResponseResult) String() string { return proto.CompactTextString(m) } -func (*DiffRangeResponseResult) ProtoMessage() {} -func (*DiffRangeResponseResult) Descriptor() ([]byte, []int) { +func (m *DiffRange_Response_Result) Reset() { *m = DiffRange_Response_Result{} } +func (m *DiffRange_Response_Result) String() string { return proto.CompactTextString(m) } +func (*DiffRange_Response_Result) ProtoMessage() {} +func (*DiffRange_Response_Result) Descriptor() ([]byte, []int) { return fileDescriptor_11d78c2fb7c80384, []int{1, 1, 0} } -func (m *DiffRangeResponseResult) XXX_Unmarshal(b []byte) error { +func (m *DiffRange_Response_Result) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DiffRangeResponseResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DiffRange_Response_Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DiffRangeResponseResult.Marshal(b, m, deterministic) + return xxx_messageInfo_DiffRange_Response_Result.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -373,56 +374,56 @@ func (m *DiffRangeResponseResult) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *DiffRangeResponseResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiffRangeResponseResult.Merge(m, src) +func (m *DiffRange_Response_Result) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiffRange_Response_Result.Merge(m, src) } -func (m *DiffRangeResponseResult) XXX_Size() int { +func (m *DiffRange_Response_Result) XXX_Size() int { return m.Size() } -func (m *DiffRangeResponseResult) XXX_DiscardUnknown() { - xxx_messageInfo_DiffRangeResponseResult.DiscardUnknown(m) +func (m *DiffRange_Response_Result) XXX_DiscardUnknown() { + xxx_messageInfo_DiffRange_Response_Result.DiscardUnknown(m) } -var xxx_messageInfo_DiffRangeResponseResult proto.InternalMessageInfo +var xxx_messageInfo_DiffRange_Response_Result proto.InternalMessageInfo -func (m *DiffRangeResponseResult) GetHash() []byte { +func (m *DiffRange_Response_Result) GetHash() []byte { if m != nil { return m.Hash } return nil } -func (m *DiffRangeResponseResult) GetElements() []*DiffRangeResponseResultElement { +func (m *DiffRange_Response_Result) GetElements() []*DiffRange_Response_Result_Element { if m != nil { return m.Elements } return nil } -func (m *DiffRangeResponseResult) GetCount() uint32 { +func (m *DiffRange_Response_Result) GetCount() uint32 { if m != nil { return m.Count } return 0 } -type DiffRangeResponseResultElement struct { +type DiffRange_Response_Result_Element 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"` } -func (m *DiffRangeResponseResultElement) Reset() { *m = DiffRangeResponseResultElement{} } -func (m *DiffRangeResponseResultElement) String() string { return proto.CompactTextString(m) } -func (*DiffRangeResponseResultElement) ProtoMessage() {} -func (*DiffRangeResponseResultElement) Descriptor() ([]byte, []int) { +func (m *DiffRange_Response_Result_Element) Reset() { *m = DiffRange_Response_Result_Element{} } +func (m *DiffRange_Response_Result_Element) String() string { return proto.CompactTextString(m) } +func (*DiffRange_Response_Result_Element) ProtoMessage() {} +func (*DiffRange_Response_Result_Element) Descriptor() ([]byte, []int) { return fileDescriptor_11d78c2fb7c80384, []int{1, 1, 0, 0} } -func (m *DiffRangeResponseResultElement) XXX_Unmarshal(b []byte) error { +func (m *DiffRange_Response_Result_Element) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DiffRangeResponseResultElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DiffRange_Response_Result_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DiffRangeResponseResultElement.Marshal(b, m, deterministic) + return xxx_messageInfo_DiffRange_Response_Result_Element.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -432,26 +433,26 @@ func (m *DiffRangeResponseResultElement) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *DiffRangeResponseResultElement) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiffRangeResponseResultElement.Merge(m, src) +func (m *DiffRange_Response_Result_Element) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiffRange_Response_Result_Element.Merge(m, src) } -func (m *DiffRangeResponseResultElement) XXX_Size() int { +func (m *DiffRange_Response_Result_Element) XXX_Size() int { return m.Size() } -func (m *DiffRangeResponseResultElement) XXX_DiscardUnknown() { - xxx_messageInfo_DiffRangeResponseResultElement.DiscardUnknown(m) +func (m *DiffRange_Response_Result_Element) XXX_DiscardUnknown() { + xxx_messageInfo_DiffRange_Response_Result_Element.DiscardUnknown(m) } -var xxx_messageInfo_DiffRangeResponseResultElement proto.InternalMessageInfo +var xxx_messageInfo_DiffRange_Response_Result_Element proto.InternalMessageInfo -func (m *DiffRangeResponseResultElement) GetId() string { +func (m *DiffRange_Response_Result_Element) GetId() string { if m != nil { return m.Id } return "" } -func (m *DiffRangeResponseResultElement) GetHead() string { +func (m *DiffRange_Response_Result_Element) GetHead() string { if m != nil { return m.Head } @@ -460,13 +461,13 @@ func (m *DiffRangeResponseResultElement) GetHead() string { func init() { proto.RegisterType((*Space)(nil), "anytype.Space") - proto.RegisterType((*SpaceContent)(nil), "anytype.Space.Content") + proto.RegisterType((*Space_Content)(nil), "anytype.Space.Content") proto.RegisterType((*DiffRange)(nil), "anytype.DiffRange") - proto.RegisterType((*DiffRangeRequest)(nil), "anytype.DiffRange.Request") - proto.RegisterType((*DiffRangeRequestRange)(nil), "anytype.DiffRange.Request.Range") - proto.RegisterType((*DiffRangeResponse)(nil), "anytype.DiffRange.Response") - proto.RegisterType((*DiffRangeResponseResult)(nil), "anytype.DiffRange.Response.Result") - proto.RegisterType((*DiffRangeResponseResultElement)(nil), "anytype.DiffRange.Response.Result.Element") + proto.RegisterType((*DiffRange_Request)(nil), "anytype.DiffRange.Request") + proto.RegisterType((*DiffRange_Request_Range)(nil), "anytype.DiffRange.Request.Range") + proto.RegisterType((*DiffRange_Response)(nil), "anytype.DiffRange.Response") + proto.RegisterType((*DiffRange_Response_Result)(nil), "anytype.DiffRange.Response.Result") + proto.RegisterType((*DiffRange_Response_Result_Element)(nil), "anytype.DiffRange.Response.Result.Element") } func init() { @@ -546,7 +547,7 @@ func (m *Space) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SpaceContent) Marshal() (dAtA []byte, err error) { +func (m *Space_Content) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -556,12 +557,12 @@ func (m *SpaceContent) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpaceContent) MarshalTo(dAtA []byte) (int, error) { +func (m *Space_Content) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpaceContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Space_Content) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -578,12 +579,12 @@ func (m *SpaceContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SpaceContentValueOfDiffRange) MarshalTo(dAtA []byte) (int, error) { +func (m *Space_Content_DiffRange) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpaceContentValueOfDiffRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Space_Content_DiffRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.DiffRange != nil { { @@ -646,7 +647,7 @@ func (m *DiffRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DiffRangeRequest) Marshal() (dAtA []byte, err error) { +func (m *DiffRange_Request) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -656,12 +657,12 @@ func (m *DiffRangeRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiffRangeRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *DiffRange_Request) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiffRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DiffRange_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -683,7 +684,7 @@ func (m *DiffRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DiffRangeRequestRange) Marshal() (dAtA []byte, err error) { +func (m *DiffRange_Request_Range) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -693,12 +694,12 @@ func (m *DiffRangeRequestRange) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiffRangeRequestRange) MarshalTo(dAtA []byte) (int, error) { +func (m *DiffRange_Request_Range) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiffRangeRequestRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DiffRange_Request_Range) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -721,7 +722,7 @@ func (m *DiffRangeRequestRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DiffRangeResponse) Marshal() (dAtA []byte, err error) { +func (m *DiffRange_Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -731,12 +732,12 @@ func (m *DiffRangeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiffRangeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *DiffRange_Response) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiffRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DiffRange_Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -758,7 +759,7 @@ func (m *DiffRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DiffRangeResponseResult) Marshal() (dAtA []byte, err error) { +func (m *DiffRange_Response_Result) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -768,12 +769,12 @@ func (m *DiffRangeResponseResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiffRangeResponseResult) MarshalTo(dAtA []byte) (int, error) { +func (m *DiffRange_Response_Result) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiffRangeResponseResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DiffRange_Response_Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -807,7 +808,7 @@ func (m *DiffRangeResponseResult) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *DiffRangeResponseResultElement) Marshal() (dAtA []byte, err error) { +func (m *DiffRange_Response_Result_Element) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -817,12 +818,12 @@ func (m *DiffRangeResponseResultElement) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiffRangeResponseResultElement) MarshalTo(dAtA []byte) (int, error) { +func (m *DiffRange_Response_Result_Element) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiffRangeResponseResultElement) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DiffRange_Response_Result_Element) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -872,7 +873,7 @@ func (m *Space) Size() (n int) { return n } -func (m *SpaceContent) Size() (n int) { +func (m *Space_Content) Size() (n int) { if m == nil { return 0 } @@ -884,7 +885,7 @@ func (m *SpaceContent) Size() (n int) { return n } -func (m *SpaceContentValueOfDiffRange) Size() (n int) { +func (m *Space_Content_DiffRange) Size() (n int) { if m == nil { return 0 } @@ -913,7 +914,7 @@ func (m *DiffRange) Size() (n int) { return n } -func (m *DiffRangeRequest) Size() (n int) { +func (m *DiffRange_Request) Size() (n int) { if m == nil { return 0 } @@ -928,7 +929,7 @@ func (m *DiffRangeRequest) Size() (n int) { return n } -func (m *DiffRangeRequestRange) Size() (n int) { +func (m *DiffRange_Request_Range) Size() (n int) { if m == nil { return 0 } @@ -946,7 +947,7 @@ func (m *DiffRangeRequestRange) Size() (n int) { return n } -func (m *DiffRangeResponse) Size() (n int) { +func (m *DiffRange_Response) Size() (n int) { if m == nil { return 0 } @@ -961,7 +962,7 @@ func (m *DiffRangeResponse) Size() (n int) { return n } -func (m *DiffRangeResponseResult) Size() (n int) { +func (m *DiffRange_Response_Result) Size() (n int) { if m == nil { return 0 } @@ -983,7 +984,7 @@ func (m *DiffRangeResponseResult) Size() (n int) { return n } -func (m *DiffRangeResponseResultElement) Size() (n int) { +func (m *DiffRange_Response_Result_Element) Size() (n int) { if m == nil { return 0 } @@ -1097,7 +1098,7 @@ func (m *Space) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Message == nil { - m.Message = &SpaceContent{} + m.Message = &Space_Content{} } if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1124,7 +1125,7 @@ func (m *Space) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpaceContent) Unmarshal(dAtA []byte) error { +func (m *Space_Content) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1186,7 +1187,7 @@ func (m *SpaceContent) Unmarshal(dAtA []byte) error { if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &SpaceContentValueOfDiffRange{v} + m.Value = &Space_Content_DiffRange{v} iNdEx = postIndex default: iNdEx = preIndex @@ -1268,7 +1269,7 @@ func (m *DiffRange) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Request == nil { - m.Request = &DiffRangeRequest{} + m.Request = &DiffRange_Request{} } if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1304,7 +1305,7 @@ func (m *DiffRange) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &DiffRangeResponse{} + m.Response = &DiffRange_Response{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1331,7 +1332,7 @@ func (m *DiffRange) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiffRangeRequest) Unmarshal(dAtA []byte) error { +func (m *DiffRange_Request) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1389,7 +1390,7 @@ func (m *DiffRangeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ranges = append(m.Ranges, &DiffRangeRequestRange{}) + m.Ranges = append(m.Ranges, &DiffRange_Request_Range{}) if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1415,7 +1416,7 @@ func (m *DiffRangeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiffRangeRequestRange) Unmarshal(dAtA []byte) error { +func (m *DiffRange_Request_Range) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1522,7 +1523,7 @@ func (m *DiffRangeRequestRange) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiffRangeResponse) Unmarshal(dAtA []byte) error { +func (m *DiffRange_Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1580,7 +1581,7 @@ func (m *DiffRangeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Results = append(m.Results, &DiffRangeResponseResult{}) + m.Results = append(m.Results, &DiffRange_Response_Result{}) if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1606,7 +1607,7 @@ func (m *DiffRangeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiffRangeResponseResult) Unmarshal(dAtA []byte) error { +func (m *DiffRange_Response_Result) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1698,7 +1699,7 @@ func (m *DiffRangeResponseResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Elements = append(m.Elements, &DiffRangeResponseResultElement{}) + m.Elements = append(m.Elements, &DiffRange_Response_Result_Element{}) if err := m.Elements[len(m.Elements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1743,7 +1744,7 @@ func (m *DiffRangeResponseResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiffRangeResponseResultElement) Unmarshal(dAtA []byte) error { +func (m *DiffRange_Response_Result_Element) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { diff --git a/service/sync/document/service.go b/service/sync/document/service.go index b684e64b..03799c09 100644 --- a/service/sync/document/service.go +++ b/service/sync/document/service.go @@ -74,8 +74,8 @@ func (s *service) UpdateDocument(ctx context.Context, id, text string) (err erro err = s.treeCache.Do(ctx, id, func(tree acltree.ACLTree) error { ch, err = tree.AddContent(ctx, func(builder acltree.ChangeBuilder) error { builder.AddChangeContent( - &testchangepb.PlainTextChangeData{ - Content: []*testchangepb.PlainTextChangeContent{ + &testchangepb.PlainTextChange_Data{ + Content: []*testchangepb.PlainTextChange_Content{ createAppendTextChangeContent(text), }, }) @@ -100,7 +100,7 @@ func (s *service) UpdateDocument(ctx context.Context, id, text string) (err erro zap.String("header", header.String())). Debug("document updated in the database") - return s.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(&syncproto.SyncHeadUpdate{ + return s.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(&syncproto.Sync_HeadUpdate{ Heads: heads, Changes: []*aclpb.RawChange{ch}, TreeId: id, @@ -155,7 +155,7 @@ func (s *service) CreateDocument(ctx context.Context, text string) (id string, e log.With(zap.String("id", id), zap.String("text", text)). Debug("creating document") - err = s.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(&syncproto.SyncHeadUpdate{ + err = s.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(&syncproto.Sync_HeadUpdate{ Heads: heads, Changes: []*aclpb.RawChange{ch}, TreeId: id, @@ -169,18 +169,18 @@ func (s *service) CreateDocument(ctx context.Context, text string) (id string, e } func createInitialChangeContent(text string) proto.Marshaler { - return &testchangepb.PlainTextChangeData{ - Content: []*testchangepb.PlainTextChangeContent{ + return &testchangepb.PlainTextChange_Data{ + Content: []*testchangepb.PlainTextChange_Content{ createAppendTextChangeContent(text), }, - Snapshot: &testchangepb.PlainTextChangeSnapshot{Text: text}, + Snapshot: &testchangepb.PlainTextChange_Snapshot{Text: text}, } } -func createAppendTextChangeContent(text string) *testchangepb.PlainTextChangeContent { - return &testchangepb.PlainTextChangeContent{ - Value: &testchangepb.PlainTextChangeContentValueOfTextAppend{ - TextAppend: &testchangepb.PlainTextChangeTextAppend{ +func createAppendTextChangeContent(text string) *testchangepb.PlainTextChange_Content { + return &testchangepb.PlainTextChange_Content{ + Value: &testchangepb.PlainTextChange_Content_TextAppend{ + TextAppend: &testchangepb.PlainTextChange_TextAppend{ Text: text, }, }, diff --git a/service/sync/message/service.go b/service/sync/message/service.go index efe76900..7207a302 100644 --- a/service/sync/message/service.go +++ b/service/sync/message/service.go @@ -56,7 +56,7 @@ func (s *service) Close(ctx context.Context) (err error) { func (s *service) HandleMessage(ctx context.Context, msg *pool.Message) (err error) { defer func() { if err != nil { - msg.AckError(syncproto.SystemError_UNKNOWN, err.Error()) + msg.AckError(syncproto.System_Error_UNKNOWN, err.Error()) } else { msg.Ack() } diff --git a/service/sync/requesthandler/requesthandler.go b/service/sync/requesthandler/requesthandler.go index 2eb70551..2a960104 100644 --- a/service/sync/requesthandler/requesthandler.go +++ b/service/sync/requesthandler/requesthandler.go @@ -70,9 +70,9 @@ func (r *requestHandler) HandleSyncMessage(ctx context.Context, senderId string, return nil } -func (r *requestHandler) HandleHeadUpdate(ctx context.Context, senderId string, update *syncproto.SyncHeadUpdate) (err error) { +func (r *requestHandler) HandleHeadUpdate(ctx context.Context, senderId string, update *syncproto.Sync_HeadUpdate) (err error) { var ( - fullRequest *syncproto.SyncFullRequest + fullRequest *syncproto.Sync_Full_Request snapshotPath []string result acltree.AddResult ) @@ -100,7 +100,7 @@ func (r *requestHandler) HandleHeadUpdate(ctx context.Context, senderId string, // if there are no such tree if err == treestorage.ErrUnknownTreeId { // TODO: maybe we can optimize this by sending the header and stuff right away, so when the tree is created we are able to add it on first request - fullRequest = &syncproto.SyncFullRequest{ + fullRequest = &syncproto.Sync_Full_Request{ TreeId: update.TreeId, TreeHeader: update.TreeHeader, } @@ -114,7 +114,7 @@ func (r *requestHandler) HandleHeadUpdate(ctx context.Context, senderId string, return err } // otherwise sending heads update message - newUpdate := &syncproto.SyncHeadUpdate{ + newUpdate := &syncproto.Sync_HeadUpdate{ Heads: result.Heads, Changes: result.Added, SnapshotPath: snapshotPath, @@ -124,9 +124,9 @@ func (r *requestHandler) HandleHeadUpdate(ctx context.Context, senderId string, return r.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(newUpdate)) } -func (r *requestHandler) HandleFullSyncRequest(ctx context.Context, senderId string, request *syncproto.SyncFullRequest) (err error) { +func (r *requestHandler) HandleFullSyncRequest(ctx context.Context, senderId string, request *syncproto.Sync_Full_Request) (err error) { var ( - fullResponse *syncproto.SyncFullResponse + fullResponse *syncproto.Sync_Full_Response snapshotPath []string result acltree.AddResult ) @@ -159,7 +159,7 @@ func (r *requestHandler) HandleFullSyncRequest(ctx context.Context, senderId str } // otherwise sending heads update message - newUpdate := &syncproto.SyncHeadUpdate{ + newUpdate := &syncproto.Sync_HeadUpdate{ Heads: result.Heads, Changes: result.Added, SnapshotPath: snapshotPath, @@ -169,7 +169,7 @@ func (r *requestHandler) HandleFullSyncRequest(ctx context.Context, senderId str return r.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(newUpdate)) } -func (r *requestHandler) HandleFullSyncResponse(ctx context.Context, senderId string, response *syncproto.SyncFullResponse) (err error) { +func (r *requestHandler) HandleFullSyncResponse(ctx context.Context, senderId string, response *syncproto.Sync_Full_Response) (err error) { var ( snapshotPath []string result acltree.AddResult @@ -203,7 +203,7 @@ func (r *requestHandler) HandleFullSyncResponse(ctx context.Context, senderId st } } // sending heads update message - newUpdate := &syncproto.SyncHeadUpdate{ + newUpdate := &syncproto.Sync_HeadUpdate{ Heads: result.Heads, Changes: result.Added, SnapshotPath: snapshotPath, @@ -212,12 +212,12 @@ func (r *requestHandler) HandleFullSyncResponse(ctx context.Context, senderId st return r.messageService.SendToSpaceAsync("", syncproto.WrapHeadUpdate(newUpdate)) } -func (r *requestHandler) prepareFullSyncRequest(treeId string, header *treepb.TreeHeader, theirPath []string, tree acltree.ACLTree) (*syncproto.SyncFullRequest, error) { +func (r *requestHandler) prepareFullSyncRequest(treeId string, header *treepb.TreeHeader, theirPath []string, tree acltree.ACLTree) (*syncproto.Sync_Full_Request, error) { ourChanges, err := tree.ChangesAfterCommonSnapshot(theirPath) if err != nil { return nil, err } - return &syncproto.SyncFullRequest{ + return &syncproto.Sync_Full_Request{ Heads: tree.Heads(), Changes: ourChanges, TreeId: treeId, @@ -230,7 +230,7 @@ func (r *requestHandler) prepareFullSyncResponse( treeId string, theirPath []string, theirChanges []*aclpb.RawChange, - tree acltree.ACLTree) (*syncproto.SyncFullResponse, error) { + tree acltree.ACLTree) (*syncproto.Sync_Full_Response, error) { // TODO: we can probably use the common snapshot calculated on the request step from previous peer ourChanges, err := tree.ChangesAfterCommonSnapshot(theirPath) if err != nil { @@ -251,7 +251,7 @@ func (r *requestHandler) prepareFullSyncResponse( log.With(zap.Int("len(changes)", len(final)), zap.String("id", treeId)). Debug("preparing changes for tree") - return &syncproto.SyncFullResponse{ + return &syncproto.Sync_Full_Response{ Heads: tree.Heads(), Changes: final, TreeId: treeId, @@ -260,7 +260,7 @@ func (r *requestHandler) prepareFullSyncResponse( }, nil } -func (r *requestHandler) createTree(ctx context.Context, response *syncproto.SyncFullResponse) error { +func (r *requestHandler) createTree(ctx context.Context, response *syncproto.Sync_Full_Response) error { return r.treeCache.Add( ctx, response.TreeId, diff --git a/syncproto/helpers.go b/syncproto/helpers.go index e3059bda..fe19c267 100644 --- a/syncproto/helpers.go +++ b/syncproto/helpers.go @@ -1,19 +1,19 @@ package syncproto -func WrapHeadUpdate(update *SyncHeadUpdate) *Sync { - return &Sync{Message: &SyncContentValue{ - Value: &SyncContentValueValueOfHeadUpdate{HeadUpdate: update}, +func WrapHeadUpdate(update *Sync_HeadUpdate) *Sync { + return &Sync{Message: &Sync_ContentValue{ + Value: &Sync_Content_Value_HeadUpdate{HeadUpdate: update}, }} } -func WrapFullRequest(request *SyncFullRequest) *Sync { - return &Sync{Message: &SyncContentValue{ - Value: &SyncContentValueValueOfFullSyncRequest{FullSyncRequest: request}, +func WrapFullRequest(request *Sync_Full_Request) *Sync { + return &Sync{Message: &Sync_ContentValue{ + Value: &Sync_Content_Value_FullSyncRequest{FullSyncRequest: request}, }} } -func WrapFullResponse(response *SyncFullResponse) *Sync { - return &Sync{Message: &SyncContentValue{ - Value: &SyncContentValueValueOfFullSyncResponse{FullSyncResponse: response}, +func WrapFullResponse(response *Sync_Full_Response) *Sync { + return &Sync{Message: &Sync_ContentValue{ + Value: &Sync_Content_Value_FullSyncResponse{FullSyncResponse: response}, }} } diff --git a/syncproto/sync.pb.go b/syncproto/sync.pb.go index aa69618b..e8df4661 100644 --- a/syncproto/sync.pb.go +++ b/syncproto/sync.pb.go @@ -52,28 +52,28 @@ func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{0} } -type SystemErrorCode int32 +type System_Error_Code int32 const ( - SystemError_UNKNOWN SystemErrorCode = 0 - SystemError_UNSUPPORTED_PROTOCOL_VERSION SystemErrorCode = 10 + System_Error_UNKNOWN System_Error_Code = 0 + System_Error_UNSUPPORTED_PROTOCOL_VERSION System_Error_Code = 10 ) -var SystemErrorCode_name = map[int32]string{ +var System_Error_Code_name = map[int32]string{ 0: "UNKNOWN", 10: "UNSUPPORTED_PROTOCOL_VERSION", } -var SystemErrorCode_value = map[string]int32{ +var System_Error_Code_value = map[string]int32{ "UNKNOWN": 0, "UNSUPPORTED_PROTOCOL_VERSION": 10, } -func (x SystemErrorCode) String() string { - return proto.EnumName(SystemErrorCode_name, int32(x)) +func (x System_Error_Code) String() string { + return proto.EnumName(System_Error_Code_name, int32(x)) } -func (SystemErrorCode) EnumDescriptor() ([]byte, []int) { +func (System_Error_Code) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 3, 0} } @@ -206,9 +206,9 @@ func (m *Header) GetDebugInfo() string { } type System struct { - Handshake *SystemHandshake `protobuf:"bytes,1,opt,name=handshake,proto3" json:"handshake,omitempty"` - Ping *SystemPing `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` - Ack *SystemAck `protobuf:"bytes,3,opt,name=ack,proto3" json:"ack,omitempty"` + Handshake *System_Handshake `protobuf:"bytes,1,opt,name=handshake,proto3" json:"handshake,omitempty"` + Ping *System_Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` + Ack *System_Ack `protobuf:"bytes,3,opt,name=ack,proto3" json:"ack,omitempty"` } func (m *System) Reset() { *m = System{} } @@ -244,43 +244,43 @@ func (m *System) XXX_DiscardUnknown() { var xxx_messageInfo_System proto.InternalMessageInfo -func (m *System) GetHandshake() *SystemHandshake { +func (m *System) GetHandshake() *System_Handshake { if m != nil { return m.Handshake } return nil } -func (m *System) GetPing() *SystemPing { +func (m *System) GetPing() *System_Ping { if m != nil { return m.Ping } return nil } -func (m *System) GetAck() *SystemAck { +func (m *System) GetAck() *System_Ack { if m != nil { return m.Ack } return nil } -type SystemHandshake struct { +type System_Handshake struct { ProtocolVersion string `protobuf:"bytes,1,opt,name=protocolVersion,proto3" json:"protocolVersion,omitempty"` } -func (m *SystemHandshake) Reset() { *m = SystemHandshake{} } -func (m *SystemHandshake) String() string { return proto.CompactTextString(m) } -func (*SystemHandshake) ProtoMessage() {} -func (*SystemHandshake) Descriptor() ([]byte, []int) { +func (m *System_Handshake) Reset() { *m = System_Handshake{} } +func (m *System_Handshake) String() string { return proto.CompactTextString(m) } +func (*System_Handshake) ProtoMessage() {} +func (*System_Handshake) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 0} } -func (m *SystemHandshake) XXX_Unmarshal(b []byte) error { +func (m *System_Handshake) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SystemHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *System_Handshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SystemHandshake.Marshal(b, m, deterministic) + return xxx_messageInfo_System_Handshake.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -290,41 +290,41 @@ func (m *SystemHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *SystemHandshake) XXX_Merge(src proto.Message) { - xxx_messageInfo_SystemHandshake.Merge(m, src) +func (m *System_Handshake) XXX_Merge(src proto.Message) { + xxx_messageInfo_System_Handshake.Merge(m, src) } -func (m *SystemHandshake) XXX_Size() int { +func (m *System_Handshake) XXX_Size() int { return m.Size() } -func (m *SystemHandshake) XXX_DiscardUnknown() { - xxx_messageInfo_SystemHandshake.DiscardUnknown(m) +func (m *System_Handshake) XXX_DiscardUnknown() { + xxx_messageInfo_System_Handshake.DiscardUnknown(m) } -var xxx_messageInfo_SystemHandshake proto.InternalMessageInfo +var xxx_messageInfo_System_Handshake proto.InternalMessageInfo -func (m *SystemHandshake) GetProtocolVersion() string { +func (m *System_Handshake) GetProtocolVersion() string { if m != nil { return m.ProtocolVersion } return "" } -type SystemPing struct { +type System_Ping struct { UnixTime uint64 `protobuf:"varint,1,opt,name=unixTime,proto3" json:"unixTime,omitempty"` } -func (m *SystemPing) Reset() { *m = SystemPing{} } -func (m *SystemPing) String() string { return proto.CompactTextString(m) } -func (*SystemPing) ProtoMessage() {} -func (*SystemPing) Descriptor() ([]byte, []int) { +func (m *System_Ping) Reset() { *m = System_Ping{} } +func (m *System_Ping) String() string { return proto.CompactTextString(m) } +func (*System_Ping) ProtoMessage() {} +func (*System_Ping) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 1} } -func (m *SystemPing) XXX_Unmarshal(b []byte) error { +func (m *System_Ping) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SystemPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *System_Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SystemPing.Marshal(b, m, deterministic) + return xxx_messageInfo_System_Ping.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -334,41 +334,41 @@ func (m *SystemPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *SystemPing) XXX_Merge(src proto.Message) { - xxx_messageInfo_SystemPing.Merge(m, src) +func (m *System_Ping) XXX_Merge(src proto.Message) { + xxx_messageInfo_System_Ping.Merge(m, src) } -func (m *SystemPing) XXX_Size() int { +func (m *System_Ping) XXX_Size() int { return m.Size() } -func (m *SystemPing) XXX_DiscardUnknown() { - xxx_messageInfo_SystemPing.DiscardUnknown(m) +func (m *System_Ping) XXX_DiscardUnknown() { + xxx_messageInfo_System_Ping.DiscardUnknown(m) } -var xxx_messageInfo_SystemPing proto.InternalMessageInfo +var xxx_messageInfo_System_Ping proto.InternalMessageInfo -func (m *SystemPing) GetUnixTime() uint64 { +func (m *System_Ping) GetUnixTime() uint64 { if m != nil { return m.UnixTime } return 0 } -type SystemAck struct { - Error *SystemError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +type System_Ack struct { + Error *System_Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func (m *SystemAck) Reset() { *m = SystemAck{} } -func (m *SystemAck) String() string { return proto.CompactTextString(m) } -func (*SystemAck) ProtoMessage() {} -func (*SystemAck) Descriptor() ([]byte, []int) { +func (m *System_Ack) Reset() { *m = System_Ack{} } +func (m *System_Ack) String() string { return proto.CompactTextString(m) } +func (*System_Ack) ProtoMessage() {} +func (*System_Ack) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 2} } -func (m *SystemAck) XXX_Unmarshal(b []byte) error { +func (m *System_Ack) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SystemAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *System_Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SystemAck.Marshal(b, m, deterministic) + return xxx_messageInfo_System_Ack.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -378,42 +378,42 @@ func (m *SystemAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *SystemAck) XXX_Merge(src proto.Message) { - xxx_messageInfo_SystemAck.Merge(m, src) +func (m *System_Ack) XXX_Merge(src proto.Message) { + xxx_messageInfo_System_Ack.Merge(m, src) } -func (m *SystemAck) XXX_Size() int { +func (m *System_Ack) XXX_Size() int { return m.Size() } -func (m *SystemAck) XXX_DiscardUnknown() { - xxx_messageInfo_SystemAck.DiscardUnknown(m) +func (m *System_Ack) XXX_DiscardUnknown() { + xxx_messageInfo_System_Ack.DiscardUnknown(m) } -var xxx_messageInfo_SystemAck proto.InternalMessageInfo +var xxx_messageInfo_System_Ack proto.InternalMessageInfo -func (m *SystemAck) GetError() *SystemError { +func (m *System_Ack) GetError() *System_Error { if m != nil { return m.Error } return nil } -type SystemError struct { - Code SystemErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.SystemErrorCode" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +type System_Error struct { + Code System_Error_Code `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.System_Error_Code" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` } -func (m *SystemError) Reset() { *m = SystemError{} } -func (m *SystemError) String() string { return proto.CompactTextString(m) } -func (*SystemError) ProtoMessage() {} -func (*SystemError) Descriptor() ([]byte, []int) { +func (m *System_Error) Reset() { *m = System_Error{} } +func (m *System_Error) String() string { return proto.CompactTextString(m) } +func (*System_Error) ProtoMessage() {} +func (*System_Error) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 3} } -func (m *SystemError) XXX_Unmarshal(b []byte) error { +func (m *System_Error) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SystemError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *System_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SystemError.Marshal(b, m, deterministic) + return xxx_messageInfo_System_Error.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -423,26 +423,26 @@ func (m *SystemError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *SystemError) XXX_Merge(src proto.Message) { - xxx_messageInfo_SystemError.Merge(m, src) +func (m *System_Error) XXX_Merge(src proto.Message) { + xxx_messageInfo_System_Error.Merge(m, src) } -func (m *SystemError) XXX_Size() int { +func (m *System_Error) XXX_Size() int { return m.Size() } -func (m *SystemError) XXX_DiscardUnknown() { - xxx_messageInfo_SystemError.DiscardUnknown(m) +func (m *System_Error) XXX_DiscardUnknown() { + xxx_messageInfo_System_Error.DiscardUnknown(m) } -var xxx_messageInfo_SystemError proto.InternalMessageInfo +var xxx_messageInfo_System_Error proto.InternalMessageInfo -func (m *SystemError) GetCode() SystemErrorCode { +func (m *System_Error) GetCode() System_Error_Code { if m != nil { return m.Code } - return SystemError_UNKNOWN + return System_Error_UNKNOWN } -func (m *SystemError) GetDescription() string { +func (m *System_Error) GetDescription() string { if m != nil { return m.Description } @@ -450,8 +450,8 @@ func (m *SystemError) GetDescription() string { } type Sync struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Message *SyncContentValue `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Message *Sync_ContentValue `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (m *Sync) Reset() { *m = Sync{} } @@ -494,33 +494,33 @@ func (m *Sync) GetSpaceId() string { return "" } -func (m *Sync) GetMessage() *SyncContentValue { +func (m *Sync) GetMessage() *Sync_ContentValue { if m != nil { return m.Message } return nil } -type SyncContentValue struct { +type Sync_ContentValue struct { // Types that are valid to be assigned to Value: - // *SyncContentValueValueOfHeadUpdate - // *SyncContentValueValueOfFullSyncRequest - // *SyncContentValueValueOfFullSyncResponse - Value IsSyncContentValueValue `protobuf_oneof:"value"` + // *Sync_Content_Value_HeadUpdate + // *Sync_Content_Value_FullSyncRequest + // *Sync_Content_Value_FullSyncResponse + Value isSync_Content_Value_Value `protobuf_oneof:"value"` } -func (m *SyncContentValue) Reset() { *m = SyncContentValue{} } -func (m *SyncContentValue) String() string { return proto.CompactTextString(m) } -func (*SyncContentValue) ProtoMessage() {} -func (*SyncContentValue) Descriptor() ([]byte, []int) { +func (m *Sync_ContentValue) Reset() { *m = Sync_ContentValue{} } +func (m *Sync_ContentValue) String() string { return proto.CompactTextString(m) } +func (*Sync_ContentValue) ProtoMessage() {} +func (*Sync_ContentValue) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 0} } -func (m *SyncContentValue) XXX_Unmarshal(b []byte) error { +func (m *Sync_ContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Sync_ContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncContentValue.Marshal(b, m, deterministic) + return xxx_messageInfo_Sync_ContentValue.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -530,76 +530,76 @@ func (m *SyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *SyncContentValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncContentValue.Merge(m, src) +func (m *Sync_ContentValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sync_ContentValue.Merge(m, src) } -func (m *SyncContentValue) XXX_Size() int { +func (m *Sync_ContentValue) XXX_Size() int { return m.Size() } -func (m *SyncContentValue) XXX_DiscardUnknown() { - xxx_messageInfo_SyncContentValue.DiscardUnknown(m) +func (m *Sync_ContentValue) XXX_DiscardUnknown() { + xxx_messageInfo_Sync_ContentValue.DiscardUnknown(m) } -var xxx_messageInfo_SyncContentValue proto.InternalMessageInfo +var xxx_messageInfo_Sync_ContentValue proto.InternalMessageInfo -type IsSyncContentValueValue interface { - IsSyncContentValueValue() +type isSync_Content_Value_Value interface { + isSync_Content_Value_Value() MarshalTo([]byte) (int, error) Size() int } -type SyncContentValueValueOfHeadUpdate struct { - HeadUpdate *SyncHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"` +type Sync_Content_Value_HeadUpdate struct { + HeadUpdate *Sync_HeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"` } -type SyncContentValueValueOfFullSyncRequest struct { - FullSyncRequest *SyncFullRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"` +type Sync_Content_Value_FullSyncRequest struct { + FullSyncRequest *Sync_Full_Request `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"` } -type SyncContentValueValueOfFullSyncResponse struct { - FullSyncResponse *SyncFullResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"` +type Sync_Content_Value_FullSyncResponse struct { + FullSyncResponse *Sync_Full_Response `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"` } -func (*SyncContentValueValueOfHeadUpdate) IsSyncContentValueValue() {} -func (*SyncContentValueValueOfFullSyncRequest) IsSyncContentValueValue() {} -func (*SyncContentValueValueOfFullSyncResponse) IsSyncContentValueValue() {} +func (*Sync_Content_Value_HeadUpdate) isSync_Content_Value_Value() {} +func (*Sync_Content_Value_FullSyncRequest) isSync_Content_Value_Value() {} +func (*Sync_Content_Value_FullSyncResponse) isSync_Content_Value_Value() {} -func (m *SyncContentValue) GetValue() IsSyncContentValueValue { +func (m *Sync_ContentValue) GetValue() isSync_Content_Value_Value { if m != nil { return m.Value } return nil } -func (m *SyncContentValue) GetHeadUpdate() *SyncHeadUpdate { - if x, ok := m.GetValue().(*SyncContentValueValueOfHeadUpdate); ok { +func (m *Sync_ContentValue) GetHeadUpdate() *Sync_HeadUpdate { + if x, ok := m.GetValue().(*Sync_Content_Value_HeadUpdate); ok { return x.HeadUpdate } return nil } -func (m *SyncContentValue) GetFullSyncRequest() *SyncFullRequest { - if x, ok := m.GetValue().(*SyncContentValueValueOfFullSyncRequest); ok { +func (m *Sync_ContentValue) GetFullSyncRequest() *Sync_Full_Request { + if x, ok := m.GetValue().(*Sync_Content_Value_FullSyncRequest); ok { return x.FullSyncRequest } return nil } -func (m *SyncContentValue) GetFullSyncResponse() *SyncFullResponse { - if x, ok := m.GetValue().(*SyncContentValueValueOfFullSyncResponse); ok { +func (m *Sync_ContentValue) GetFullSyncResponse() *Sync_Full_Response { + if x, ok := m.GetValue().(*Sync_Content_Value_FullSyncResponse); ok { return x.FullSyncResponse } return nil } // XXX_OneofWrappers is for the internal use of the proto package. -func (*SyncContentValue) XXX_OneofWrappers() []interface{} { +func (*Sync_ContentValue) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*SyncContentValueValueOfHeadUpdate)(nil), - (*SyncContentValueValueOfFullSyncRequest)(nil), - (*SyncContentValueValueOfFullSyncResponse)(nil), + (*Sync_Content_Value_HeadUpdate)(nil), + (*Sync_Content_Value_FullSyncRequest)(nil), + (*Sync_Content_Value_FullSyncResponse)(nil), } } -type SyncHeadUpdate struct { +type Sync_HeadUpdate struct { Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"` @@ -607,18 +607,18 @@ type SyncHeadUpdate struct { TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"` } -func (m *SyncHeadUpdate) Reset() { *m = SyncHeadUpdate{} } -func (m *SyncHeadUpdate) String() string { return proto.CompactTextString(m) } -func (*SyncHeadUpdate) ProtoMessage() {} -func (*SyncHeadUpdate) Descriptor() ([]byte, []int) { +func (m *Sync_HeadUpdate) Reset() { *m = Sync_HeadUpdate{} } +func (m *Sync_HeadUpdate) String() string { return proto.CompactTextString(m) } +func (*Sync_HeadUpdate) ProtoMessage() {} +func (*Sync_HeadUpdate) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 1} } -func (m *SyncHeadUpdate) XXX_Unmarshal(b []byte) error { +func (m *Sync_HeadUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Sync_HeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncHeadUpdate.Marshal(b, m, deterministic) + return xxx_messageInfo_Sync_HeadUpdate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -628,68 +628,68 @@ func (m *SyncHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *SyncHeadUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncHeadUpdate.Merge(m, src) +func (m *Sync_HeadUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sync_HeadUpdate.Merge(m, src) } -func (m *SyncHeadUpdate) XXX_Size() int { +func (m *Sync_HeadUpdate) XXX_Size() int { return m.Size() } -func (m *SyncHeadUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_SyncHeadUpdate.DiscardUnknown(m) +func (m *Sync_HeadUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_Sync_HeadUpdate.DiscardUnknown(m) } -var xxx_messageInfo_SyncHeadUpdate proto.InternalMessageInfo +var xxx_messageInfo_Sync_HeadUpdate proto.InternalMessageInfo -func (m *SyncHeadUpdate) GetHeads() []string { +func (m *Sync_HeadUpdate) GetHeads() []string { if m != nil { return m.Heads } return nil } -func (m *SyncHeadUpdate) GetChanges() []*aclpb.RawChange { +func (m *Sync_HeadUpdate) GetChanges() []*aclpb.RawChange { if m != nil { return m.Changes } return nil } -func (m *SyncHeadUpdate) GetTreeId() string { +func (m *Sync_HeadUpdate) GetTreeId() string { if m != nil { return m.TreeId } return "" } -func (m *SyncHeadUpdate) GetSnapshotPath() []string { +func (m *Sync_HeadUpdate) GetSnapshotPath() []string { if m != nil { return m.SnapshotPath } return nil } -func (m *SyncHeadUpdate) GetTreeHeader() *treepb.TreeHeader { +func (m *Sync_HeadUpdate) GetTreeHeader() *treepb.TreeHeader { if m != nil { return m.TreeHeader } return nil } -type SyncFull struct { +type Sync_Full struct { } -func (m *SyncFull) Reset() { *m = SyncFull{} } -func (m *SyncFull) String() string { return proto.CompactTextString(m) } -func (*SyncFull) ProtoMessage() {} -func (*SyncFull) Descriptor() ([]byte, []int) { +func (m *Sync_Full) Reset() { *m = Sync_Full{} } +func (m *Sync_Full) String() string { return proto.CompactTextString(m) } +func (*Sync_Full) ProtoMessage() {} +func (*Sync_Full) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 2} } -func (m *SyncFull) XXX_Unmarshal(b []byte) error { +func (m *Sync_Full) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncFull) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Sync_Full) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncFull.Marshal(b, m, deterministic) + return xxx_messageInfo_Sync_Full.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -699,20 +699,20 @@ func (m *SyncFull) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *SyncFull) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncFull.Merge(m, src) +func (m *Sync_Full) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sync_Full.Merge(m, src) } -func (m *SyncFull) XXX_Size() int { +func (m *Sync_Full) XXX_Size() int { return m.Size() } -func (m *SyncFull) XXX_DiscardUnknown() { - xxx_messageInfo_SyncFull.DiscardUnknown(m) +func (m *Sync_Full) XXX_DiscardUnknown() { + xxx_messageInfo_Sync_Full.DiscardUnknown(m) } -var xxx_messageInfo_SyncFull proto.InternalMessageInfo +var xxx_messageInfo_Sync_Full proto.InternalMessageInfo // here with send the request with all changes we have (we already know sender's snapshot path) -type SyncFullRequest struct { +type Sync_Full_Request struct { Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"` @@ -720,18 +720,18 @@ type SyncFullRequest struct { TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"` } -func (m *SyncFullRequest) Reset() { *m = SyncFullRequest{} } -func (m *SyncFullRequest) String() string { return proto.CompactTextString(m) } -func (*SyncFullRequest) ProtoMessage() {} -func (*SyncFullRequest) Descriptor() ([]byte, []int) { +func (m *Sync_Full_Request) Reset() { *m = Sync_Full_Request{} } +func (m *Sync_Full_Request) String() string { return proto.CompactTextString(m) } +func (*Sync_Full_Request) ProtoMessage() {} +func (*Sync_Full_Request) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 2, 0} } -func (m *SyncFullRequest) XXX_Unmarshal(b []byte) error { +func (m *Sync_Full_Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncFullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Sync_Full_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncFullRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_Sync_Full_Request.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -741,54 +741,54 @@ func (m *SyncFullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *SyncFullRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncFullRequest.Merge(m, src) +func (m *Sync_Full_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sync_Full_Request.Merge(m, src) } -func (m *SyncFullRequest) XXX_Size() int { +func (m *Sync_Full_Request) XXX_Size() int { return m.Size() } -func (m *SyncFullRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SyncFullRequest.DiscardUnknown(m) +func (m *Sync_Full_Request) XXX_DiscardUnknown() { + xxx_messageInfo_Sync_Full_Request.DiscardUnknown(m) } -var xxx_messageInfo_SyncFullRequest proto.InternalMessageInfo +var xxx_messageInfo_Sync_Full_Request proto.InternalMessageInfo -func (m *SyncFullRequest) GetHeads() []string { +func (m *Sync_Full_Request) GetHeads() []string { if m != nil { return m.Heads } return nil } -func (m *SyncFullRequest) GetChanges() []*aclpb.RawChange { +func (m *Sync_Full_Request) GetChanges() []*aclpb.RawChange { if m != nil { return m.Changes } return nil } -func (m *SyncFullRequest) GetTreeId() string { +func (m *Sync_Full_Request) GetTreeId() string { if m != nil { return m.TreeId } return "" } -func (m *SyncFullRequest) GetSnapshotPath() []string { +func (m *Sync_Full_Request) GetSnapshotPath() []string { if m != nil { return m.SnapshotPath } return nil } -func (m *SyncFullRequest) GetTreeHeader() *treepb.TreeHeader { +func (m *Sync_Full_Request) GetTreeHeader() *treepb.TreeHeader { if m != nil { return m.TreeHeader } return nil } -type SyncFullResponse struct { +type Sync_Full_Response struct { Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"` @@ -796,18 +796,18 @@ type SyncFullResponse struct { TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"` } -func (m *SyncFullResponse) Reset() { *m = SyncFullResponse{} } -func (m *SyncFullResponse) String() string { return proto.CompactTextString(m) } -func (*SyncFullResponse) ProtoMessage() {} -func (*SyncFullResponse) Descriptor() ([]byte, []int) { +func (m *Sync_Full_Response) Reset() { *m = Sync_Full_Response{} } +func (m *Sync_Full_Response) String() string { return proto.CompactTextString(m) } +func (*Sync_Full_Response) ProtoMessage() {} +func (*Sync_Full_Response) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 2, 1} } -func (m *SyncFullResponse) XXX_Unmarshal(b []byte) error { +func (m *Sync_Full_Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SyncFullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Sync_Full_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SyncFullResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_Sync_Full_Response.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -817,47 +817,47 @@ func (m *SyncFullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *SyncFullResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncFullResponse.Merge(m, src) +func (m *Sync_Full_Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sync_Full_Response.Merge(m, src) } -func (m *SyncFullResponse) XXX_Size() int { +func (m *Sync_Full_Response) XXX_Size() int { return m.Size() } -func (m *SyncFullResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SyncFullResponse.DiscardUnknown(m) +func (m *Sync_Full_Response) XXX_DiscardUnknown() { + xxx_messageInfo_Sync_Full_Response.DiscardUnknown(m) } -var xxx_messageInfo_SyncFullResponse proto.InternalMessageInfo +var xxx_messageInfo_Sync_Full_Response proto.InternalMessageInfo -func (m *SyncFullResponse) GetHeads() []string { +func (m *Sync_Full_Response) GetHeads() []string { if m != nil { return m.Heads } return nil } -func (m *SyncFullResponse) GetChanges() []*aclpb.RawChange { +func (m *Sync_Full_Response) GetChanges() []*aclpb.RawChange { if m != nil { return m.Changes } return nil } -func (m *SyncFullResponse) GetTreeId() string { +func (m *Sync_Full_Response) GetTreeId() string { if m != nil { return m.TreeId } return "" } -func (m *SyncFullResponse) GetSnapshotPath() []string { +func (m *Sync_Full_Response) GetSnapshotPath() []string { if m != nil { return m.SnapshotPath } return nil } -func (m *SyncFullResponse) GetTreeHeader() *treepb.TreeHeader { +func (m *Sync_Full_Response) GetTreeHeader() *treepb.TreeHeader { if m != nil { return m.TreeHeader } @@ -866,20 +866,20 @@ func (m *SyncFullResponse) GetTreeHeader() *treepb.TreeHeader { func init() { proto.RegisterEnum("anytype.MessageType", MessageType_name, MessageType_value) - proto.RegisterEnum("anytype.SystemErrorCode", SystemErrorCode_name, SystemErrorCode_value) + proto.RegisterEnum("anytype.System_Error_Code", System_Error_Code_name, System_Error_Code_value) proto.RegisterType((*Message)(nil), "anytype.Message") proto.RegisterType((*Header)(nil), "anytype.Header") proto.RegisterType((*System)(nil), "anytype.System") - proto.RegisterType((*SystemHandshake)(nil), "anytype.System.Handshake") - proto.RegisterType((*SystemPing)(nil), "anytype.System.Ping") - proto.RegisterType((*SystemAck)(nil), "anytype.System.Ack") - proto.RegisterType((*SystemError)(nil), "anytype.System.Error") + proto.RegisterType((*System_Handshake)(nil), "anytype.System.Handshake") + proto.RegisterType((*System_Ping)(nil), "anytype.System.Ping") + proto.RegisterType((*System_Ack)(nil), "anytype.System.Ack") + proto.RegisterType((*System_Error)(nil), "anytype.System.Error") proto.RegisterType((*Sync)(nil), "anytype.Sync") - proto.RegisterType((*SyncContentValue)(nil), "anytype.Sync.ContentValue") - proto.RegisterType((*SyncHeadUpdate)(nil), "anytype.Sync.HeadUpdate") - proto.RegisterType((*SyncFull)(nil), "anytype.Sync.Full") - proto.RegisterType((*SyncFullRequest)(nil), "anytype.Sync.Full.Request") - proto.RegisterType((*SyncFullResponse)(nil), "anytype.Sync.Full.Response") + proto.RegisterType((*Sync_ContentValue)(nil), "anytype.Sync.ContentValue") + proto.RegisterType((*Sync_HeadUpdate)(nil), "anytype.Sync.HeadUpdate") + proto.RegisterType((*Sync_Full)(nil), "anytype.Sync.Full") + proto.RegisterType((*Sync_Full_Request)(nil), "anytype.Sync.Full.Request") + proto.RegisterType((*Sync_Full_Response)(nil), "anytype.Sync.Full.Response") } func init() { proto.RegisterFile("syncproto/proto/sync.proto", fileDescriptor_4b28dfdd48a89166) } @@ -1091,7 +1091,7 @@ func (m *System) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SystemHandshake) Marshal() (dAtA []byte, err error) { +func (m *System_Handshake) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1101,12 +1101,12 @@ func (m *SystemHandshake) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SystemHandshake) MarshalTo(dAtA []byte) (int, error) { +func (m *System_Handshake) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SystemHandshake) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *System_Handshake) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1121,7 +1121,7 @@ func (m *SystemHandshake) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SystemPing) Marshal() (dAtA []byte, err error) { +func (m *System_Ping) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1131,12 +1131,12 @@ func (m *SystemPing) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SystemPing) MarshalTo(dAtA []byte) (int, error) { +func (m *System_Ping) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SystemPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *System_Ping) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1149,7 +1149,7 @@ func (m *SystemPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SystemAck) Marshal() (dAtA []byte, err error) { +func (m *System_Ack) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1159,12 +1159,12 @@ func (m *SystemAck) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SystemAck) MarshalTo(dAtA []byte) (int, error) { +func (m *System_Ack) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SystemAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *System_Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1184,7 +1184,7 @@ func (m *SystemAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SystemError) Marshal() (dAtA []byte, err error) { +func (m *System_Error) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1194,12 +1194,12 @@ func (m *SystemError) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SystemError) MarshalTo(dAtA []byte) (int, error) { +func (m *System_Error) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SystemError) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *System_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1261,7 +1261,7 @@ func (m *Sync) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncContentValue) Marshal() (dAtA []byte, err error) { +func (m *Sync_ContentValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1271,12 +1271,12 @@ func (m *SyncContentValue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncContentValue) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_ContentValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_ContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1293,12 +1293,12 @@ func (m *SyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncContentValueValueOfHeadUpdate) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_Content_Value_HeadUpdate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncContentValueValueOfHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_Content_Value_HeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.HeadUpdate != nil { { @@ -1314,12 +1314,12 @@ func (m *SyncContentValueValueOfHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (i } return len(dAtA) - i, nil } -func (m *SyncContentValueValueOfFullSyncRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_Content_Value_FullSyncRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncContentValueValueOfFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_Content_Value_FullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.FullSyncRequest != nil { { @@ -1335,12 +1335,12 @@ func (m *SyncContentValueValueOfFullSyncRequest) MarshalToSizedBuffer(dAtA []byt } return len(dAtA) - i, nil } -func (m *SyncContentValueValueOfFullSyncResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_Content_Value_FullSyncResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncContentValueValueOfFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_Content_Value_FullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.FullSyncResponse != nil { { @@ -1356,7 +1356,7 @@ func (m *SyncContentValueValueOfFullSyncResponse) MarshalToSizedBuffer(dAtA []by } return len(dAtA) - i, nil } -func (m *SyncHeadUpdate) Marshal() (dAtA []byte, err error) { +func (m *Sync_HeadUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1366,12 +1366,12 @@ func (m *SyncHeadUpdate) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncHeadUpdate) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_HeadUpdate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_HeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1430,7 +1430,7 @@ func (m *SyncHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncFull) Marshal() (dAtA []byte, err error) { +func (m *Sync_Full) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1440,12 +1440,12 @@ func (m *SyncFull) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncFull) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_Full) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncFull) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_Full) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1453,7 +1453,7 @@ func (m *SyncFull) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncFullRequest) Marshal() (dAtA []byte, err error) { +func (m *Sync_Full_Request) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1463,12 +1463,12 @@ func (m *SyncFullRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncFullRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_Full_Request) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncFullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_Full_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1527,7 +1527,7 @@ func (m *SyncFullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SyncFullResponse) Marshal() (dAtA []byte, err error) { +func (m *Sync_Full_Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1537,12 +1537,12 @@ func (m *SyncFullResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SyncFullResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *Sync_Full_Response) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SyncFullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Sync_Full_Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1676,7 +1676,7 @@ func (m *System) Size() (n int) { return n } -func (m *SystemHandshake) Size() (n int) { +func (m *System_Handshake) Size() (n int) { if m == nil { return 0 } @@ -1689,7 +1689,7 @@ func (m *SystemHandshake) Size() (n int) { return n } -func (m *SystemPing) Size() (n int) { +func (m *System_Ping) Size() (n int) { if m == nil { return 0 } @@ -1701,7 +1701,7 @@ func (m *SystemPing) Size() (n int) { return n } -func (m *SystemAck) Size() (n int) { +func (m *System_Ack) Size() (n int) { if m == nil { return 0 } @@ -1714,7 +1714,7 @@ func (m *SystemAck) Size() (n int) { return n } -func (m *SystemError) Size() (n int) { +func (m *System_Error) Size() (n int) { if m == nil { return 0 } @@ -1747,7 +1747,7 @@ func (m *Sync) Size() (n int) { return n } -func (m *SyncContentValue) Size() (n int) { +func (m *Sync_ContentValue) Size() (n int) { if m == nil { return 0 } @@ -1759,7 +1759,7 @@ func (m *SyncContentValue) Size() (n int) { return n } -func (m *SyncContentValueValueOfHeadUpdate) Size() (n int) { +func (m *Sync_Content_Value_HeadUpdate) Size() (n int) { if m == nil { return 0 } @@ -1771,7 +1771,7 @@ func (m *SyncContentValueValueOfHeadUpdate) Size() (n int) { } return n } -func (m *SyncContentValueValueOfFullSyncRequest) Size() (n int) { +func (m *Sync_Content_Value_FullSyncRequest) Size() (n int) { if m == nil { return 0 } @@ -1783,7 +1783,7 @@ func (m *SyncContentValueValueOfFullSyncRequest) Size() (n int) { } return n } -func (m *SyncContentValueValueOfFullSyncResponse) Size() (n int) { +func (m *Sync_Content_Value_FullSyncResponse) Size() (n int) { if m == nil { return 0 } @@ -1795,7 +1795,7 @@ func (m *SyncContentValueValueOfFullSyncResponse) Size() (n int) { } return n } -func (m *SyncHeadUpdate) Size() (n int) { +func (m *Sync_HeadUpdate) Size() (n int) { if m == nil { return 0 } @@ -1830,7 +1830,7 @@ func (m *SyncHeadUpdate) Size() (n int) { return n } -func (m *SyncFull) Size() (n int) { +func (m *Sync_Full) Size() (n int) { if m == nil { return 0 } @@ -1839,7 +1839,7 @@ func (m *SyncFull) Size() (n int) { return n } -func (m *SyncFullRequest) Size() (n int) { +func (m *Sync_Full_Request) Size() (n int) { if m == nil { return 0 } @@ -1874,7 +1874,7 @@ func (m *SyncFullRequest) Size() (n int) { return n } -func (m *SyncFullResponse) Size() (n int) { +func (m *Sync_Full_Response) Size() (n int) { if m == nil { return 0 } @@ -2267,7 +2267,7 @@ func (m *System) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Handshake == nil { - m.Handshake = &SystemHandshake{} + m.Handshake = &System_Handshake{} } if err := m.Handshake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2303,7 +2303,7 @@ func (m *System) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Ping == nil { - m.Ping = &SystemPing{} + m.Ping = &System_Ping{} } if err := m.Ping.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2339,7 +2339,7 @@ func (m *System) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Ack == nil { - m.Ack = &SystemAck{} + m.Ack = &System_Ack{} } if err := m.Ack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2366,7 +2366,7 @@ func (m *System) Unmarshal(dAtA []byte) error { } return nil } -func (m *SystemHandshake) Unmarshal(dAtA []byte) error { +func (m *System_Handshake) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2448,7 +2448,7 @@ func (m *SystemHandshake) Unmarshal(dAtA []byte) error { } return nil } -func (m *SystemPing) Unmarshal(dAtA []byte) error { +func (m *System_Ping) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2517,7 +2517,7 @@ func (m *SystemPing) Unmarshal(dAtA []byte) error { } return nil } -func (m *SystemAck) Unmarshal(dAtA []byte) error { +func (m *System_Ack) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2576,7 +2576,7 @@ func (m *SystemAck) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Error == nil { - m.Error = &SystemError{} + m.Error = &System_Error{} } if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2603,7 +2603,7 @@ func (m *SystemAck) Unmarshal(dAtA []byte) error { } return nil } -func (m *SystemError) Unmarshal(dAtA []byte) error { +func (m *System_Error) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2646,7 +2646,7 @@ func (m *SystemError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SystemErrorCode(b&0x7F) << shift + m.Code |= System_Error_Code(b&0x7F) << shift if b < 0x80 { break } @@ -2795,7 +2795,7 @@ func (m *Sync) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Message == nil { - m.Message = &SyncContentValue{} + m.Message = &Sync_ContentValue{} } if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2822,7 +2822,7 @@ func (m *Sync) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncContentValue) Unmarshal(dAtA []byte) error { +func (m *Sync_ContentValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2880,11 +2880,11 @@ func (m *SyncContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SyncHeadUpdate{} + v := &Sync_HeadUpdate{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &SyncContentValueValueOfHeadUpdate{v} + m.Value = &Sync_Content_Value_HeadUpdate{v} iNdEx = postIndex case 2: if wireType != 2 { @@ -2915,11 +2915,11 @@ func (m *SyncContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SyncFullRequest{} + v := &Sync_Full_Request{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &SyncContentValueValueOfFullSyncRequest{v} + m.Value = &Sync_Content_Value_FullSyncRequest{v} iNdEx = postIndex case 3: if wireType != 2 { @@ -2950,11 +2950,11 @@ func (m *SyncContentValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SyncFullResponse{} + v := &Sync_Full_Response{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &SyncContentValueValueOfFullSyncResponse{v} + m.Value = &Sync_Content_Value_FullSyncResponse{v} iNdEx = postIndex default: iNdEx = preIndex @@ -2977,7 +2977,7 @@ func (m *SyncContentValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncHeadUpdate) Unmarshal(dAtA []byte) error { +func (m *Sync_HeadUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3193,7 +3193,7 @@ func (m *SyncHeadUpdate) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncFull) Unmarshal(dAtA []byte) error { +func (m *Sync_Full) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3243,7 +3243,7 @@ func (m *SyncFull) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncFullRequest) Unmarshal(dAtA []byte) error { +func (m *Sync_Full_Request) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3459,7 +3459,7 @@ func (m *SyncFullRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncFullResponse) Unmarshal(dAtA []byte) error { +func (m *Sync_Full_Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l {