// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: pkg/acl/aclrecordproto/protos/aclrecord.proto package aclrecordproto import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ACLUserPermissions int32 const ( ACLUserPermissions_Admin ACLUserPermissions = 0 ACLUserPermissions_Writer ACLUserPermissions = 1 ACLUserPermissions_Reader ACLUserPermissions = 2 ) var ACLUserPermissions_name = map[int32]string{ 0: "Admin", 1: "Writer", 2: "Reader", } var ACLUserPermissions_value = map[string]int32{ "Admin": 0, "Writer": 1, "Reader": 2, } func (x ACLUserPermissions) String() string { return proto.EnumName(ACLUserPermissions_name, int32(x)) } func (ACLUserPermissions) EnumDescriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{0} } type RawACLRecord struct { Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *RawACLRecord) Reset() { *m = RawACLRecord{} } func (m *RawACLRecord) String() string { return proto.CompactTextString(m) } func (*RawACLRecord) ProtoMessage() {} func (*RawACLRecord) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{0} } func (m *RawACLRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RawACLRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RawACLRecord.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *RawACLRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_RawACLRecord.Merge(m, src) } func (m *RawACLRecord) XXX_Size() int { return m.Size() } func (m *RawACLRecord) XXX_DiscardUnknown() { xxx_messageInfo_RawACLRecord.DiscardUnknown(m) } var xxx_messageInfo_RawACLRecord proto.InternalMessageInfo func (m *RawACLRecord) GetPayload() []byte { if m != nil { return m.Payload } return nil } func (m *RawACLRecord) GetSignature() []byte { if m != nil { return m.Signature } return nil } type RawACLRecordWithId struct { Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (m *RawACLRecordWithId) Reset() { *m = RawACLRecordWithId{} } func (m *RawACLRecordWithId) String() string { return proto.CompactTextString(m) } func (*RawACLRecordWithId) ProtoMessage() {} func (*RawACLRecordWithId) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{1} } func (m *RawACLRecordWithId) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RawACLRecordWithId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_RawACLRecordWithId.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *RawACLRecordWithId) XXX_Merge(src proto.Message) { xxx_messageInfo_RawACLRecordWithId.Merge(m, src) } func (m *RawACLRecordWithId) XXX_Size() int { return m.Size() } func (m *RawACLRecordWithId) XXX_DiscardUnknown() { xxx_messageInfo_RawACLRecordWithId.DiscardUnknown(m) } var xxx_messageInfo_RawACLRecordWithId proto.InternalMessageInfo func (m *RawACLRecordWithId) GetPayload() []byte { if m != nil { return m.Payload } return nil } func (m *RawACLRecordWithId) GetId() string { if m != nil { return m.Id } return "" } type ACLRecord struct { PrevId string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"` Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` CurrentReadKeyHash uint64 `protobuf:"varint,4,opt,name=currentReadKeyHash,proto3" json:"currentReadKeyHash,omitempty"` Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } func (m *ACLRecord) Reset() { *m = ACLRecord{} } func (m *ACLRecord) String() string { return proto.CompactTextString(m) } func (*ACLRecord) ProtoMessage() {} func (*ACLRecord) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{2} } func (m *ACLRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLRecord.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLRecord) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLRecord.Merge(m, src) } func (m *ACLRecord) XXX_Size() int { return m.Size() } func (m *ACLRecord) XXX_DiscardUnknown() { xxx_messageInfo_ACLRecord.DiscardUnknown(m) } var xxx_messageInfo_ACLRecord proto.InternalMessageInfo func (m *ACLRecord) GetPrevId() string { if m != nil { return m.PrevId } return "" } func (m *ACLRecord) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLRecord) GetData() []byte { if m != nil { return m.Data } return nil } func (m *ACLRecord) GetCurrentReadKeyHash() uint64 { if m != nil { return m.CurrentReadKeyHash } return 0 } func (m *ACLRecord) GetTimestamp() int64 { if m != nil { return m.Timestamp } return 0 } type ACLRoot struct { Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` SpaceId string `protobuf:"bytes,3,opt,name=spaceId,proto3" json:"spaceId,omitempty"` EncryptedReadKey []byte `protobuf:"bytes,4,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` DerivationScheme string `protobuf:"bytes,5,opt,name=derivationScheme,proto3" json:"derivationScheme,omitempty"` } func (m *ACLRoot) Reset() { *m = ACLRoot{} } func (m *ACLRoot) String() string { return proto.CompactTextString(m) } func (*ACLRoot) ProtoMessage() {} func (*ACLRoot) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{3} } func (m *ACLRoot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLRoot.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLRoot) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLRoot.Merge(m, src) } func (m *ACLRoot) XXX_Size() int { return m.Size() } func (m *ACLRoot) XXX_DiscardUnknown() { xxx_messageInfo_ACLRoot.DiscardUnknown(m) } var xxx_messageInfo_ACLRoot proto.InternalMessageInfo func (m *ACLRoot) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLRoot) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } func (m *ACLRoot) GetSpaceId() string { if m != nil { return m.SpaceId } return "" } func (m *ACLRoot) GetEncryptedReadKey() []byte { if m != nil { return m.EncryptedReadKey } return nil } func (m *ACLRoot) GetDerivationScheme() string { if m != nil { return m.DerivationScheme } return "" } type ACLContentValue struct { // Types that are valid to be assigned to Value: // *ACLContentValue_UserAdd // *ACLContentValue_UserRemove // *ACLContentValue_UserPermissionChange // *ACLContentValue_UserInvite // *ACLContentValue_UserJoin Value isACLContentValue_Value `protobuf_oneof:"value"` } func (m *ACLContentValue) Reset() { *m = ACLContentValue{} } func (m *ACLContentValue) String() string { return proto.CompactTextString(m) } func (*ACLContentValue) ProtoMessage() {} func (*ACLContentValue) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{4} } func (m *ACLContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLContentValue.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLContentValue) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLContentValue.Merge(m, src) } func (m *ACLContentValue) XXX_Size() int { return m.Size() } func (m *ACLContentValue) XXX_DiscardUnknown() { xxx_messageInfo_ACLContentValue.DiscardUnknown(m) } var xxx_messageInfo_ACLContentValue proto.InternalMessageInfo type isACLContentValue_Value interface { isACLContentValue_Value() MarshalTo([]byte) (int, error) Size() int } type ACLContentValue_UserAdd struct { UserAdd *ACLUserAdd `protobuf:"bytes,1,opt,name=userAdd,proto3,oneof" json:"userAdd,omitempty"` } type ACLContentValue_UserRemove struct { UserRemove *ACLUserRemove `protobuf:"bytes,2,opt,name=userRemove,proto3,oneof" json:"userRemove,omitempty"` } type ACLContentValue_UserPermissionChange struct { UserPermissionChange *ACLUserPermissionChange `protobuf:"bytes,3,opt,name=userPermissionChange,proto3,oneof" json:"userPermissionChange,omitempty"` } type ACLContentValue_UserInvite struct { UserInvite *ACLUserInvite `protobuf:"bytes,4,opt,name=userInvite,proto3,oneof" json:"userInvite,omitempty"` } type ACLContentValue_UserJoin struct { UserJoin *ACLUserJoin `protobuf:"bytes,5,opt,name=userJoin,proto3,oneof" json:"userJoin,omitempty"` } func (*ACLContentValue_UserAdd) isACLContentValue_Value() {} func (*ACLContentValue_UserRemove) isACLContentValue_Value() {} func (*ACLContentValue_UserPermissionChange) isACLContentValue_Value() {} func (*ACLContentValue_UserInvite) isACLContentValue_Value() {} func (*ACLContentValue_UserJoin) isACLContentValue_Value() {} func (m *ACLContentValue) GetValue() isACLContentValue_Value { if m != nil { return m.Value } return nil } func (m *ACLContentValue) GetUserAdd() *ACLUserAdd { if x, ok := m.GetValue().(*ACLContentValue_UserAdd); ok { return x.UserAdd } return nil } func (m *ACLContentValue) GetUserRemove() *ACLUserRemove { if x, ok := m.GetValue().(*ACLContentValue_UserRemove); ok { return x.UserRemove } return nil } func (m *ACLContentValue) GetUserPermissionChange() *ACLUserPermissionChange { if x, ok := m.GetValue().(*ACLContentValue_UserPermissionChange); ok { return x.UserPermissionChange } return nil } func (m *ACLContentValue) GetUserInvite() *ACLUserInvite { if x, ok := m.GetValue().(*ACLContentValue_UserInvite); ok { return x.UserInvite } return nil } func (m *ACLContentValue) GetUserJoin() *ACLUserJoin { if x, ok := m.GetValue().(*ACLContentValue_UserJoin); ok { return x.UserJoin } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*ACLContentValue) XXX_OneofWrappers() []interface{} { return []interface{}{ (*ACLContentValue_UserAdd)(nil), (*ACLContentValue_UserRemove)(nil), (*ACLContentValue_UserPermissionChange)(nil), (*ACLContentValue_UserInvite)(nil), (*ACLContentValue_UserJoin)(nil), } } type ACLData struct { AclContent []*ACLContentValue `protobuf:"bytes,1,rep,name=aclContent,proto3" json:"aclContent,omitempty"` } func (m *ACLData) Reset() { *m = ACLData{} } func (m *ACLData) String() string { return proto.CompactTextString(m) } func (*ACLData) ProtoMessage() {} func (*ACLData) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{5} } func (m *ACLData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLData.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLData) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLData.Merge(m, src) } func (m *ACLData) XXX_Size() int { return m.Size() } func (m *ACLData) XXX_DiscardUnknown() { xxx_messageInfo_ACLData.DiscardUnknown(m) } var xxx_messageInfo_ACLData proto.InternalMessageInfo func (m *ACLData) GetAclContent() []*ACLContentValue { if m != nil { return m.AclContent } return nil } type ACLState struct { ReadKeyHashes []uint64 `protobuf:"varint,1,rep,packed,name=readKeyHashes,proto3" json:"readKeyHashes,omitempty"` UserStates []*ACLUserState `protobuf:"bytes,2,rep,name=userStates,proto3" json:"userStates,omitempty"` Invites map[string]*ACLUserInvite `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 *ACLState) Reset() { *m = ACLState{} } func (m *ACLState) String() string { return proto.CompactTextString(m) } func (*ACLState) ProtoMessage() {} func (*ACLState) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{6} } func (m *ACLState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLState) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLState.Merge(m, src) } func (m *ACLState) XXX_Size() int { return m.Size() } func (m *ACLState) XXX_DiscardUnknown() { xxx_messageInfo_ACLState.DiscardUnknown(m) } var xxx_messageInfo_ACLState proto.InternalMessageInfo func (m *ACLState) GetReadKeyHashes() []uint64 { if m != nil { return m.ReadKeyHashes } return nil } func (m *ACLState) GetUserStates() []*ACLUserState { if m != nil { return m.UserStates } return nil } func (m *ACLState) GetInvites() map[string]*ACLUserInvite { if m != nil { return m.Invites } return nil } type ACLUserState struct { Identity []byte `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 ACLUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.ACLUserPermissions" json:"permissions,omitempty"` IsConfirmed bool `protobuf:"varint,5,opt,name=isConfirmed,proto3" json:"isConfirmed,omitempty"` } func (m *ACLUserState) Reset() { *m = ACLUserState{} } func (m *ACLUserState) String() string { return proto.CompactTextString(m) } func (*ACLUserState) ProtoMessage() {} func (*ACLUserState) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{7} } func (m *ACLUserState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLUserState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLUserState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLUserState) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLUserState.Merge(m, src) } func (m *ACLUserState) XXX_Size() int { return m.Size() } func (m *ACLUserState) XXX_DiscardUnknown() { xxx_messageInfo_ACLUserState.DiscardUnknown(m) } var xxx_messageInfo_ACLUserState proto.InternalMessageInfo func (m *ACLUserState) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLUserState) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } func (m *ACLUserState) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } func (m *ACLUserState) GetPermissions() ACLUserPermissions { if m != nil { return m.Permissions } return ACLUserPermissions_Admin } func (m *ACLUserState) GetIsConfirmed() bool { if m != nil { return m.IsConfirmed } return false } type ACLUserAdd struct { Identity []byte `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 ACLUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.ACLUserPermissions" json:"permissions,omitempty"` } func (m *ACLUserAdd) Reset() { *m = ACLUserAdd{} } func (m *ACLUserAdd) String() string { return proto.CompactTextString(m) } func (*ACLUserAdd) ProtoMessage() {} func (*ACLUserAdd) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{8} } func (m *ACLUserAdd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLUserAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLUserAdd.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLUserAdd) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLUserAdd.Merge(m, src) } func (m *ACLUserAdd) XXX_Size() int { return m.Size() } func (m *ACLUserAdd) XXX_DiscardUnknown() { xxx_messageInfo_ACLUserAdd.DiscardUnknown(m) } var xxx_messageInfo_ACLUserAdd proto.InternalMessageInfo func (m *ACLUserAdd) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLUserAdd) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } func (m *ACLUserAdd) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } func (m *ACLUserAdd) GetPermissions() ACLUserPermissions { if m != nil { return m.Permissions } return ACLUserPermissions_Admin } type ACLUserInvite 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 ACLUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.ACLUserPermissions" json:"permissions,omitempty"` InviteId string `protobuf:"bytes,5,opt,name=inviteId,proto3" json:"inviteId,omitempty"` } func (m *ACLUserInvite) Reset() { *m = ACLUserInvite{} } func (m *ACLUserInvite) String() string { return proto.CompactTextString(m) } func (*ACLUserInvite) ProtoMessage() {} func (*ACLUserInvite) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{9} } func (m *ACLUserInvite) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLUserInvite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLUserInvite.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLUserInvite) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLUserInvite.Merge(m, src) } func (m *ACLUserInvite) XXX_Size() int { return m.Size() } func (m *ACLUserInvite) XXX_DiscardUnknown() { xxx_messageInfo_ACLUserInvite.DiscardUnknown(m) } var xxx_messageInfo_ACLUserInvite proto.InternalMessageInfo func (m *ACLUserInvite) GetAcceptPublicKey() []byte { if m != nil { return m.AcceptPublicKey } return nil } func (m *ACLUserInvite) GetEncryptPublicKey() []byte { if m != nil { return m.EncryptPublicKey } return nil } func (m *ACLUserInvite) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } func (m *ACLUserInvite) GetPermissions() ACLUserPermissions { if m != nil { return m.Permissions } return ACLUserPermissions_Admin } func (m *ACLUserInvite) GetInviteId() string { if m != nil { return m.InviteId } return "" } type ACLUserJoin struct { Identity []byte `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"` InviteId string `protobuf:"bytes,4,opt,name=inviteId,proto3" json:"inviteId,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,5,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` } func (m *ACLUserJoin) Reset() { *m = ACLUserJoin{} } func (m *ACLUserJoin) String() string { return proto.CompactTextString(m) } func (*ACLUserJoin) ProtoMessage() {} func (*ACLUserJoin) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{10} } func (m *ACLUserJoin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLUserJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLUserJoin.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLUserJoin) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLUserJoin.Merge(m, src) } func (m *ACLUserJoin) XXX_Size() int { return m.Size() } func (m *ACLUserJoin) XXX_DiscardUnknown() { xxx_messageInfo_ACLUserJoin.DiscardUnknown(m) } var xxx_messageInfo_ACLUserJoin proto.InternalMessageInfo func (m *ACLUserJoin) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLUserJoin) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } func (m *ACLUserJoin) GetAcceptSignature() []byte { if m != nil { return m.AcceptSignature } return nil } func (m *ACLUserJoin) GetInviteId() string { if m != nil { return m.InviteId } return "" } func (m *ACLUserJoin) GetEncryptedReadKeys() [][]byte { if m != nil { return m.EncryptedReadKeys } return nil } type ACLUserRemove struct { Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` ReadKeyReplaces []*ACLReadKeyReplace `protobuf:"bytes,3,rep,name=readKeyReplaces,proto3" json:"readKeyReplaces,omitempty"` } func (m *ACLUserRemove) Reset() { *m = ACLUserRemove{} } func (m *ACLUserRemove) String() string { return proto.CompactTextString(m) } func (*ACLUserRemove) ProtoMessage() {} func (*ACLUserRemove) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{11} } func (m *ACLUserRemove) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLUserRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLUserRemove.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLUserRemove) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLUserRemove.Merge(m, src) } func (m *ACLUserRemove) XXX_Size() int { return m.Size() } func (m *ACLUserRemove) XXX_DiscardUnknown() { xxx_messageInfo_ACLUserRemove.DiscardUnknown(m) } var xxx_messageInfo_ACLUserRemove proto.InternalMessageInfo func (m *ACLUserRemove) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLUserRemove) GetReadKeyReplaces() []*ACLReadKeyReplace { if m != nil { return m.ReadKeyReplaces } return nil } type ACLReadKeyReplace struct { Identity []byte `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 *ACLReadKeyReplace) Reset() { *m = ACLReadKeyReplace{} } func (m *ACLReadKeyReplace) String() string { return proto.CompactTextString(m) } func (*ACLReadKeyReplace) ProtoMessage() {} func (*ACLReadKeyReplace) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{12} } func (m *ACLReadKeyReplace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLReadKeyReplace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLReadKeyReplace.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLReadKeyReplace) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLReadKeyReplace.Merge(m, src) } func (m *ACLReadKeyReplace) XXX_Size() int { return m.Size() } func (m *ACLReadKeyReplace) XXX_DiscardUnknown() { xxx_messageInfo_ACLReadKeyReplace.DiscardUnknown(m) } var xxx_messageInfo_ACLReadKeyReplace proto.InternalMessageInfo func (m *ACLReadKeyReplace) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLReadKeyReplace) GetEncryptionKey() []byte { if m != nil { return m.EncryptionKey } return nil } func (m *ACLReadKeyReplace) GetEncryptedReadKey() []byte { if m != nil { return m.EncryptedReadKey } return nil } type ACLUserPermissionChange struct { Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Permissions ACLUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=aclrecord.ACLUserPermissions" json:"permissions,omitempty"` } func (m *ACLUserPermissionChange) Reset() { *m = ACLUserPermissionChange{} } func (m *ACLUserPermissionChange) String() string { return proto.CompactTextString(m) } func (*ACLUserPermissionChange) ProtoMessage() {} func (*ACLUserPermissionChange) Descriptor() ([]byte, []int) { return fileDescriptor_14abe0d1b4206d54, []int{13} } func (m *ACLUserPermissionChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ACLUserPermissionChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ACLUserPermissionChange.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *ACLUserPermissionChange) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLUserPermissionChange.Merge(m, src) } func (m *ACLUserPermissionChange) XXX_Size() int { return m.Size() } func (m *ACLUserPermissionChange) XXX_DiscardUnknown() { xxx_messageInfo_ACLUserPermissionChange.DiscardUnknown(m) } var xxx_messageInfo_ACLUserPermissionChange proto.InternalMessageInfo func (m *ACLUserPermissionChange) GetIdentity() []byte { if m != nil { return m.Identity } return nil } func (m *ACLUserPermissionChange) GetPermissions() ACLUserPermissions { if m != nil { return m.Permissions } return ACLUserPermissions_Admin } func init() { proto.RegisterEnum("aclrecord.ACLUserPermissions", ACLUserPermissions_name, ACLUserPermissions_value) proto.RegisterType((*RawACLRecord)(nil), "aclrecord.RawACLRecord") proto.RegisterType((*RawACLRecordWithId)(nil), "aclrecord.RawACLRecordWithId") proto.RegisterType((*ACLRecord)(nil), "aclrecord.ACLRecord") proto.RegisterType((*ACLRoot)(nil), "aclrecord.ACLRoot") proto.RegisterType((*ACLContentValue)(nil), "aclrecord.ACLContentValue") proto.RegisterType((*ACLData)(nil), "aclrecord.ACLData") proto.RegisterType((*ACLState)(nil), "aclrecord.ACLState") proto.RegisterMapType((map[string]*ACLUserInvite)(nil), "aclrecord.ACLState.InvitesEntry") proto.RegisterType((*ACLUserState)(nil), "aclrecord.ACLUserState") proto.RegisterType((*ACLUserAdd)(nil), "aclrecord.ACLUserAdd") proto.RegisterType((*ACLUserInvite)(nil), "aclrecord.ACLUserInvite") proto.RegisterType((*ACLUserJoin)(nil), "aclrecord.ACLUserJoin") proto.RegisterType((*ACLUserRemove)(nil), "aclrecord.ACLUserRemove") proto.RegisterType((*ACLReadKeyReplace)(nil), "aclrecord.ACLReadKeyReplace") proto.RegisterType((*ACLUserPermissionChange)(nil), "aclrecord.ACLUserPermissionChange") } func init() { proto.RegisterFile("pkg/acl/aclrecordproto/protos/aclrecord.proto", fileDescriptor_14abe0d1b4206d54) } var fileDescriptor_14abe0d1b4206d54 = []byte{ // 862 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6e, 0x23, 0x45, 0x10, 0x76, 0x8f, 0x9d, 0x38, 0x53, 0xe3, 0xdd, 0x78, 0x5b, 0x90, 0x1d, 0x45, 0x8b, 0x65, 0x8d, 0x38, 0x58, 0x2b, 0xf0, 0x82, 0x41, 0x5a, 0x94, 0x03, 0xc8, 0x6b, 0x76, 0x65, 0x93, 0x1c, 0x56, 0x1d, 0x60, 0x11, 0xb7, 0xde, 0x99, 0x26, 0x69, 0xad, 0x3d, 0x33, 0xea, 0x6e, 0x1b, 0xf9, 0xc8, 0x1b, 0xf0, 0x0a, 0x3c, 0x08, 0x27, 0x2e, 0x1c, 0x73, 0x41, 0xe2, 0x08, 0xc9, 0x0b, 0x70, 0xe7, 0x82, 0xba, 0xe7, 0xdf, 0xe3, 0x58, 0x42, 0x8a, 0x90, 0x38, 0x24, 0x9e, 0xaa, 0xfa, 0xaa, 0xfc, 0xd5, 0xd7, 0x35, 0xd5, 0x86, 0xf7, 0xe3, 0x37, 0x17, 0x4f, 0xa8, 0x3f, 0xd7, 0x7f, 0x82, 0xf9, 0x91, 0x08, 0x62, 0x11, 0xa9, 0xe8, 0x89, 0xf9, 0x2f, 0x0b, 0xef, 0xd0, 0x38, 0xb0, 0x9d, 0x3b, 0xbc, 0x17, 0xd0, 0x21, 0xf4, 0xfb, 0xf1, 0xe4, 0x8c, 0x18, 0x1b, 0xbb, 0xd0, 0x8e, 0xe9, 0x7a, 0x1e, 0xd1, 0xc0, 0x45, 0x7d, 0x34, 0xe8, 0x90, 0xcc, 0xc4, 0x8f, 0xc0, 0x96, 0xfc, 0x22, 0xa4, 0x6a, 0x29, 0x98, 0x6b, 0x99, 0x58, 0xe1, 0xf0, 0x3e, 0x05, 0x5c, 0xae, 0xf3, 0x8a, 0xab, 0xcb, 0xd9, 0xae, 0x6a, 0xf7, 0xc1, 0xe2, 0x81, 0x29, 0x63, 0x13, 0x8b, 0x07, 0xde, 0x4f, 0x08, 0xec, 0x82, 0xc5, 0x11, 0xec, 0xc7, 0x82, 0xad, 0x66, 0x49, 0x9a, 0x4d, 0x52, 0x0b, 0x1f, 0xc3, 0x01, 0x0f, 0x58, 0xa8, 0xb8, 0x5a, 0xa7, 0x14, 0x72, 0x1b, 0x63, 0x68, 0x05, 0x54, 0x51, 0xb7, 0x69, 0xfc, 0xe6, 0x19, 0x0f, 0x01, 0xfb, 0x4b, 0x21, 0x58, 0xa8, 0x08, 0xa3, 0xc1, 0x29, 0x5b, 0x4f, 0xa9, 0xbc, 0x74, 0x5b, 0x7d, 0x34, 0x68, 0x91, 0x2d, 0x11, 0xdd, 0xa3, 0xe2, 0x0b, 0x26, 0x15, 0x5d, 0xc4, 0xee, 0x5e, 0x1f, 0x0d, 0x9a, 0xa4, 0x70, 0x78, 0x3f, 0x23, 0x68, 0x6b, 0x8e, 0x51, 0xa4, 0x2a, 0x4c, 0xd0, 0x06, 0x93, 0x77, 0xe1, 0x1e, 0x0b, 0x7d, 0xb1, 0x8e, 0x15, 0x8f, 0xc2, 0x53, 0x96, 0x51, 0xad, 0x3a, 0xb5, 0x36, 0x32, 0xa6, 0x3e, 0x9b, 0x05, 0x86, 0xb2, 0x4d, 0x32, 0x13, 0x3f, 0x86, 0x6e, 0x0a, 0x65, 0x41, 0xca, 0xce, 0x70, 0xee, 0x90, 0x9a, 0x5f, 0x63, 0x03, 0x26, 0xf8, 0x8a, 0xea, 0xb2, 0xe7, 0xfe, 0x25, 0x5b, 0x30, 0x43, 0xdc, 0x26, 0x35, 0xbf, 0xf7, 0x9b, 0x05, 0x87, 0xe3, 0xc9, 0xd9, 0x24, 0x0a, 0x15, 0x0b, 0xd5, 0xd7, 0x74, 0xbe, 0x64, 0xf8, 0x43, 0x68, 0x2f, 0x25, 0x13, 0xe3, 0x20, 0x91, 0xda, 0x19, 0xbd, 0x3d, 0x2c, 0xa6, 0x65, 0x3c, 0x39, 0xfb, 0x2a, 0x09, 0x4e, 0x1b, 0x24, 0xc3, 0xe1, 0x13, 0x00, 0xfd, 0x48, 0xd8, 0x22, 0x5a, 0x25, 0x93, 0xe0, 0x8c, 0xdc, 0x7a, 0x56, 0x12, 0x9f, 0x36, 0x48, 0x09, 0x8d, 0xbf, 0x81, 0xb7, 0xb4, 0xf5, 0x92, 0x89, 0x05, 0x97, 0x92, 0x47, 0xe1, 0xe4, 0x92, 0x86, 0x17, 0xcc, 0x28, 0xe0, 0x8c, 0xbc, 0x7a, 0x95, 0x4d, 0xe4, 0xb4, 0x41, 0xb6, 0x56, 0xc8, 0x58, 0xcd, 0xc2, 0x15, 0x57, 0xcc, 0xc8, 0xb5, 0x95, 0x55, 0x12, 0xcf, 0x58, 0x25, 0x16, 0xfe, 0x18, 0x0e, 0xb4, 0xf5, 0x45, 0xc4, 0x43, 0x23, 0x9e, 0x33, 0x3a, 0xaa, 0x67, 0xea, 0xe8, 0xb4, 0x41, 0x72, 0xe4, 0xb3, 0x36, 0xec, 0xad, 0xb4, 0x86, 0xde, 0x73, 0x33, 0x16, 0x9f, 0xeb, 0x81, 0x3b, 0x01, 0xa0, 0xfe, 0x3c, 0x55, 0xd8, 0x45, 0xfd, 0xe6, 0xc0, 0x19, 0x1d, 0x57, 0x6b, 0x95, 0xe5, 0x27, 0x25, 0xb4, 0xf7, 0x37, 0x82, 0x83, 0xf1, 0xe4, 0xec, 0x5c, 0x51, 0xc5, 0xf4, 0x0c, 0x89, 0x62, 0x30, 0x99, 0x34, 0xb5, 0x5a, 0xa4, 0xea, 0xc4, 0x4f, 0x93, 0xa6, 0x4d, 0x8a, 0x74, 0x2d, 0xf3, 0x75, 0x0f, 0xeb, 0xd4, 0x4d, 0x9c, 0x94, 0xa0, 0xf8, 0x04, 0xda, 0xdc, 0xf4, 0x2e, 0xdd, 0xa6, 0xc9, 0xea, 0x57, 0xb3, 0x0c, 0x6c, 0x98, 0xc8, 0x23, 0x9f, 0x87, 0x4a, 0xac, 0x49, 0x96, 0x70, 0xfc, 0x25, 0x74, 0xca, 0x01, 0xdc, 0x85, 0xe6, 0x1b, 0xb6, 0x4e, 0xdf, 0x54, 0xfd, 0x88, 0x87, 0xa9, 0x32, 0xb7, 0x0f, 0x47, 0x52, 0x80, 0x24, 0xb0, 0x13, 0xeb, 0x13, 0xe4, 0xfd, 0x89, 0xa0, 0x53, 0xa6, 0x7b, 0x07, 0x6f, 0xd8, 0x7b, 0xf0, 0x60, 0xf3, 0x7d, 0x49, 0xda, 0xed, 0x90, 0x7a, 0x00, 0x7f, 0x06, 0x4e, 0x9c, 0x0f, 0x95, 0x34, 0x13, 0x74, 0x7f, 0xf4, 0xce, 0xae, 0x89, 0x94, 0xa4, 0x9c, 0x81, 0xfb, 0xe0, 0x70, 0x39, 0x89, 0xc2, 0xef, 0xb8, 0x58, 0xb0, 0xc0, 0x0c, 0xd2, 0x01, 0x29, 0xbb, 0xf4, 0x02, 0x81, 0xe2, 0x9d, 0xfa, 0xdf, 0x75, 0xe8, 0xfd, 0x85, 0xe0, 0x5e, 0xe5, 0x00, 0xf1, 0x00, 0x0e, 0xa9, 0xef, 0xb3, 0x58, 0xbd, 0x5c, 0xbe, 0x9e, 0x73, 0xff, 0x94, 0x65, 0x9d, 0x6c, 0xba, 0x4b, 0x4b, 0xad, 0x80, 0x5a, 0x95, 0xa5, 0x56, 0x60, 0xff, 0xe3, 0x83, 0xd3, 0xe7, 0x60, 0xda, 0x99, 0x05, 0xe9, 0xee, 0xcc, 0x6d, 0xef, 0x17, 0x04, 0x4e, 0x69, 0x01, 0xdc, 0xc1, 0x99, 0xe5, 0x92, 0x9d, 0xe7, 0xb7, 0x69, 0xb3, 0x2c, 0x59, 0xee, 0xae, 0xf0, 0x6a, 0x55, 0x79, 0x6d, 0x97, 0x68, 0xef, 0x16, 0x89, 0x3c, 0x99, 0x9f, 0x5b, 0xba, 0x87, 0x77, 0xb5, 0xf1, 0x02, 0x0e, 0xd3, 0x2d, 0x43, 0x58, 0x3c, 0xa7, 0x7e, 0xbe, 0x23, 0x1e, 0x55, 0x35, 0x25, 0x15, 0x10, 0xd9, 0x4c, 0xf2, 0x7e, 0x40, 0xf0, 0xa0, 0x06, 0xbb, 0x03, 0x01, 0xb7, 0x5d, 0x8f, 0xcd, 0xed, 0xd7, 0xa3, 0xb7, 0x82, 0x87, 0xb7, 0x5c, 0x24, 0x3b, 0x89, 0x6c, 0x8c, 0x94, 0xf5, 0x6f, 0x47, 0xea, 0xf1, 0x53, 0xc0, 0x75, 0x08, 0xb6, 0x61, 0x6f, 0x1c, 0x2c, 0x78, 0xd8, 0x6d, 0x60, 0x80, 0xfd, 0x57, 0x82, 0x2b, 0x26, 0xba, 0x48, 0x3f, 0x6b, 0xbe, 0x4c, 0x74, 0xad, 0x67, 0x1f, 0xfc, 0x7a, 0xdd, 0x43, 0x57, 0xd7, 0x3d, 0xf4, 0xc7, 0x75, 0x0f, 0xfd, 0x78, 0xd3, 0x6b, 0x5c, 0xdd, 0xf4, 0x1a, 0xbf, 0xdf, 0xf4, 0x1a, 0xdf, 0x1e, 0x6d, 0xff, 0x8d, 0xf7, 0x7a, 0xdf, 0x7c, 0x7c, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x89, 0xed, 0xeb, 0x04, 0x0a, 0x00, 0x00, } func (m *RawACLRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *RawACLRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RawACLRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0x12 } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *RawACLRecordWithId) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *RawACLRecordWithId) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *RawACLRecordWithId) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x12 } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Timestamp != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x28 } if m.CurrentReadKeyHash != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.CurrentReadKeyHash)) i-- dAtA[i] = 0x20 } if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0x1a } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0x12 } if len(m.PrevId) > 0 { i -= len(m.PrevId) copy(dAtA[i:], m.PrevId) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.PrevId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLRoot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLRoot) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLRoot) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.DerivationScheme) > 0 { i -= len(m.DerivationScheme) copy(dAtA[i:], m.DerivationScheme) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.DerivationScheme))) i-- dAtA[i] = 0x2a } if len(m.EncryptedReadKey) > 0 { i -= len(m.EncryptedReadKey) copy(dAtA[i:], m.EncryptedReadKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) i-- dAtA[i] = 0x22 } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.SpaceId))) i-- dAtA[i] = 0x1a } if len(m.EncryptionKey) > 0 { i -= len(m.EncryptionKey) copy(dAtA[i:], m.EncryptionKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey))) i-- dAtA[i] = 0x12 } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLContentValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLContentValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Value != nil { { size := m.Value.Size() i -= size if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *ACLContentValue_UserAdd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLContentValue_UserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserAdd != nil { { size, err := m.UserAdd.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLContentValue_UserRemove) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLContentValue_UserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserRemove != nil { { size, err := m.UserRemove.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *ACLContentValue_UserPermissionChange) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLContentValue_UserPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserPermissionChange != nil { { size, err := m.UserPermissionChange.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *ACLContentValue_UserInvite) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLContentValue_UserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserInvite != nil { { size, err := m.UserInvite.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } return len(dAtA) - i, nil } func (m *ACLContentValue_UserJoin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLContentValue_UserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.UserJoin != nil { { size, err := m.UserJoin.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } return len(dAtA) - i, nil } func (m *ACLData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.AclContent) > 0 { for iNdEx := len(m.AclContent) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.AclContent[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *ACLState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLState) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Invites) > 0 { for k := range m.Invites { v := m.Invites[k] baseI := i if v != nil { { size, err := v.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } i -= len(k) copy(dAtA[i:], k) i = encodeVarintAclrecord(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = encodeVarintAclrecord(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a } } if len(m.UserStates) > 0 { for iNdEx := len(m.UserStates) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.UserStates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if len(m.ReadKeyHashes) > 0 { dAtA8 := make([]byte, len(m.ReadKeyHashes)*10) var j7 int for _, num := range m.ReadKeyHashes { for num >= 1<<7 { dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j7++ } dAtA8[j7] = uint8(num) j7++ } i -= j7 copy(dAtA[i:], dAtA8[:j7]) i = encodeVarintAclrecord(dAtA, i, uint64(j7)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLUserState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLUserState) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLUserState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.IsConfirmed { i-- if m.IsConfirmed { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x28 } if m.Permissions != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i-- dAtA[i] = 0x20 } if len(m.EncryptedReadKeys) > 0 { for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EncryptedReadKeys[iNdEx]) copy(dAtA[i:], m.EncryptedReadKeys[iNdEx]) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx]))) i-- dAtA[i] = 0x1a } } if len(m.EncryptionKey) > 0 { i -= len(m.EncryptionKey) copy(dAtA[i:], m.EncryptionKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey))) i-- dAtA[i] = 0x12 } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLUserAdd) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLUserAdd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLUserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Permissions != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i-- dAtA[i] = 0x20 } if len(m.EncryptedReadKeys) > 0 { for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EncryptedReadKeys[iNdEx]) copy(dAtA[i:], m.EncryptedReadKeys[iNdEx]) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx]))) i-- dAtA[i] = 0x1a } } if len(m.EncryptionKey) > 0 { i -= len(m.EncryptionKey) copy(dAtA[i:], m.EncryptionKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey))) i-- dAtA[i] = 0x12 } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLUserInvite) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLUserInvite) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.InviteId) > 0 { i -= len(m.InviteId) copy(dAtA[i:], m.InviteId) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteId))) i-- dAtA[i] = 0x2a } if m.Permissions != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i-- dAtA[i] = 0x20 } if len(m.EncryptedReadKeys) > 0 { for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EncryptedReadKeys[iNdEx]) copy(dAtA[i:], m.EncryptedReadKeys[iNdEx]) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx]))) i-- dAtA[i] = 0x1a } } if len(m.EncryptPublicKey) > 0 { i -= len(m.EncryptPublicKey) copy(dAtA[i:], m.EncryptPublicKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptPublicKey))) i-- dAtA[i] = 0x12 } if len(m.AcceptPublicKey) > 0 { i -= len(m.AcceptPublicKey) copy(dAtA[i:], m.AcceptPublicKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.AcceptPublicKey))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLUserJoin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLUserJoin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLUserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.EncryptedReadKeys) > 0 { for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EncryptedReadKeys[iNdEx]) copy(dAtA[i:], m.EncryptedReadKeys[iNdEx]) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx]))) i-- dAtA[i] = 0x2a } } if len(m.InviteId) > 0 { i -= len(m.InviteId) copy(dAtA[i:], m.InviteId) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteId))) i-- dAtA[i] = 0x22 } if len(m.AcceptSignature) > 0 { i -= len(m.AcceptSignature) copy(dAtA[i:], m.AcceptSignature) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.AcceptSignature))) i-- dAtA[i] = 0x1a } if len(m.EncryptionKey) > 0 { i -= len(m.EncryptionKey) copy(dAtA[i:], m.EncryptionKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey))) i-- dAtA[i] = 0x12 } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLUserRemove) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLUserRemove) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLUserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ReadKeyReplaces) > 0 { for iNdEx := len(m.ReadKeyReplaces) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.ReadKeyReplaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLReadKeyReplace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLReadKeyReplace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLReadKeyReplace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.EncryptedReadKey) > 0 { i -= len(m.EncryptedReadKey) copy(dAtA[i:], m.EncryptedReadKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) i-- dAtA[i] = 0x1a } if len(m.EncryptionKey) > 0 { i -= len(m.EncryptionKey) copy(dAtA[i:], m.EncryptionKey) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey))) i-- dAtA[i] = 0x12 } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ACLUserPermissionChange) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ACLUserPermissionChange) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ACLUserPermissionChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Permissions != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i-- dAtA[i] = 0x10 } if len(m.Identity) > 0 { i -= len(m.Identity) copy(dAtA[i:], m.Identity) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.Identity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintAclrecord(dAtA []byte, offset int, v uint64) int { offset -= sovAclrecord(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *RawACLRecord) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Payload) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.Signature) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *RawACLRecordWithId) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Payload) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.Id) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLRecord) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PrevId) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.Data) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if m.CurrentReadKeyHash != 0 { n += 1 + sovAclrecord(uint64(m.CurrentReadKeyHash)) } if m.Timestamp != 0 { n += 1 + sovAclrecord(uint64(m.Timestamp)) } return n } func (m *ACLRoot) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptionKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.SpaceId) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptedReadKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.DerivationScheme) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLContentValue) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != nil { n += m.Value.Size() } return n } func (m *ACLContentValue_UserAdd) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UserAdd != nil { l = m.UserAdd.Size() n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLContentValue_UserRemove) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UserRemove != nil { l = m.UserRemove.Size() n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLContentValue_UserPermissionChange) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UserPermissionChange != nil { l = m.UserPermissionChange.Size() n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLContentValue_UserInvite) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UserInvite != nil { l = m.UserInvite.Size() n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLContentValue_UserJoin) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UserJoin != nil { l = m.UserJoin.Size() n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLData) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.AclContent) > 0 { for _, e := range m.AclContent { l = e.Size() n += 1 + l + sovAclrecord(uint64(l)) } } return n } func (m *ACLState) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.ReadKeyHashes) > 0 { l = 0 for _, e := range m.ReadKeyHashes { l += sovAclrecord(uint64(e)) } n += 1 + sovAclrecord(uint64(l)) + l } if len(m.UserStates) > 0 { for _, e := range m.UserStates { l = e.Size() n += 1 + l + sovAclrecord(uint64(l)) } } if len(m.Invites) > 0 { for k, v := range m.Invites { _ = k _ = v l = 0 if v != nil { l = v.Size() l += 1 + sovAclrecord(uint64(l)) } mapEntrySize := 1 + len(k) + sovAclrecord(uint64(len(k))) + l n += mapEntrySize + 1 + sovAclrecord(uint64(mapEntrySize)) } } return n } func (m *ACLUserState) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptionKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if len(m.EncryptedReadKeys) > 0 { for _, b := range m.EncryptedReadKeys { l = len(b) n += 1 + l + sovAclrecord(uint64(l)) } } if m.Permissions != 0 { n += 1 + sovAclrecord(uint64(m.Permissions)) } if m.IsConfirmed { n += 2 } return n } func (m *ACLUserAdd) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptionKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if len(m.EncryptedReadKeys) > 0 { for _, b := range m.EncryptedReadKeys { l = len(b) n += 1 + l + sovAclrecord(uint64(l)) } } if m.Permissions != 0 { n += 1 + sovAclrecord(uint64(m.Permissions)) } return n } func (m *ACLUserInvite) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.AcceptPublicKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptPublicKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if len(m.EncryptedReadKeys) > 0 { for _, b := range m.EncryptedReadKeys { l = len(b) n += 1 + l + sovAclrecord(uint64(l)) } } if m.Permissions != 0 { n += 1 + sovAclrecord(uint64(m.Permissions)) } l = len(m.InviteId) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLUserJoin) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptionKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.AcceptSignature) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.InviteId) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if len(m.EncryptedReadKeys) > 0 { for _, b := range m.EncryptedReadKeys { l = len(b) n += 1 + l + sovAclrecord(uint64(l)) } } return n } func (m *ACLUserRemove) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if len(m.ReadKeyReplaces) > 0 { for _, e := range m.ReadKeyReplaces { l = e.Size() n += 1 + l + sovAclrecord(uint64(l)) } } return n } func (m *ACLReadKeyReplace) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptionKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } l = len(m.EncryptedReadKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } return n } func (m *ACLUserPermissionChange) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identity) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } if m.Permissions != 0 { n += 1 + sovAclrecord(uint64(m.Permissions)) } return n } func sovAclrecord(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozAclrecord(x uint64) (n int) { return sovAclrecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *RawACLRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: RawACLRecord: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RawACLRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) if m.Payload == nil { m.Payload = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RawACLRecordWithId) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: RawACLRecordWithId: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RawACLRecordWithId: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) if m.Payload == nil { m.Payload = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLRecord: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PrevId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.PrevId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) if m.Data == nil { m.Data = []byte{} } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentReadKeyHash", wireType) } m.CurrentReadKeyHash = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.CurrentReadKeyHash |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLRoot) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLRoot: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLRoot: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptionKey == nil { m.EncryptionKey = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptedReadKey == nil { m.EncryptedReadKey = []byte{} } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DerivationScheme", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.DerivationScheme = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLContentValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLContentValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLContentValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserAdd", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } v := &ACLUserAdd{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &ACLContentValue_UserAdd{v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserRemove", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } v := &ACLUserRemove{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &ACLContentValue_UserRemove{v} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserPermissionChange", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } v := &ACLUserPermissionChange{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &ACLContentValue_UserPermissionChange{v} iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserInvite", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } v := &ACLUserInvite{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &ACLContentValue_UserInvite{v} iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserJoin", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } v := &ACLUserJoin{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &ACLContentValue_UserJoin{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLData: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AclContent", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.AclContent = append(m.AclContent, &ACLContentValue{}) if err := m.AclContent[len(m.AclContent)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLState: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType == 0 { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.ReadKeyHashes = append(m.ReadKeyHashes, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + packedLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.ReadKeyHashes) == 0 { m.ReadKeyHashes = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= uint64(b&0x7F) << shift if b < 0x80 { break } } m.ReadKeyHashes = append(m.ReadKeyHashes, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyHashes", wireType) } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserStates", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.UserStates = append(m.UserStates, &ACLUserState{}) if err := m.UserStates[len(m.UserStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Invites", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } if m.Invites == nil { m.Invites = make(map[string]*ACLUserInvite) } var mapkey string var mapvalue *ACLUserInvite for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthAclrecord } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return ErrInvalidLengthAclrecord } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthAclrecord } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return ErrInvalidLengthAclrecord } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &ACLUserInvite{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Invites[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLUserState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLUserState: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLUserState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptionKey == nil { m.EncryptionKey = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx)) copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } m.Permissions = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Permissions |= ACLUserPermissions(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsConfirmed", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IsConfirmed = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLUserAdd) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLUserAdd: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLUserAdd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptionKey == nil { m.EncryptionKey = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx)) copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } m.Permissions = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Permissions |= ACLUserPermissions(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLUserInvite) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLUserInvite: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLUserInvite: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AcceptPublicKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.AcceptPublicKey = append(m.AcceptPublicKey[:0], dAtA[iNdEx:postIndex]...) if m.AcceptPublicKey == nil { m.AcceptPublicKey = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptPublicKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptPublicKey = append(m.EncryptPublicKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptPublicKey == nil { m.EncryptPublicKey = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx)) copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } m.Permissions = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Permissions |= ACLUserPermissions(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InviteId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.InviteId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLUserJoin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLUserJoin: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLUserJoin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptionKey == nil { m.EncryptionKey = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AcceptSignature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.AcceptSignature = append(m.AcceptSignature[:0], dAtA[iNdEx:postIndex]...) if m.AcceptSignature == nil { m.AcceptSignature = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InviteId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.InviteId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx)) copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLUserRemove) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLUserRemove: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLUserRemove: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyReplaces", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.ReadKeyReplaces = append(m.ReadKeyReplaces, &ACLReadKeyReplace{}) if err := m.ReadKeyReplaces[len(m.ReadKeyReplaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLReadKeyReplace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLReadKeyReplace: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLReadKeyReplace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptionKey == nil { m.EncryptionKey = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.EncryptedReadKey = append(m.EncryptedReadKey[:0], dAtA[iNdEx:postIndex]...) if m.EncryptedReadKey == nil { m.EncryptedReadKey = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ACLUserPermissionChange) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ACLUserPermissionChange: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ACLUserPermissionChange: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthAclrecord } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) if m.Identity == nil { m.Identity = []byte{} } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } m.Permissions = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Permissions |= ACLUserPermissions(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAclrecord } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipAclrecord(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowAclrecord } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowAclrecord } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowAclrecord } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthAclrecord } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupAclrecord } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthAclrecord } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthAclrecord = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAclrecord = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAclrecord = fmt.Errorf("proto: unexpected end of group") )