github.com/cs3org/reva/v2@v2.27.7/pkg/storage/utils/decomposedfs/metadata/prefixes/prefixes.go (about) 1 // Copyright 2018-2021 CERN 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 // In applying this license, CERN does not waive the privileges and immunities 16 // granted to it by virtue of its status as an Intergovernmental Organization 17 // or submit itself to any jurisdiction. 18 19 package prefixes 20 21 // Declare a list of xattr keys 22 // TODO the below comment is currently copied from the owncloud driver, revisit 23 // Currently,extended file attributes have four separated 24 // namespaces (user, trusted, security and system) followed by a dot. 25 // A non root user can only manipulate the user. namespace, which is what 26 // we will use to store ownCloud specific metadata. To prevent name 27 // collisions with other apps We are going to introduce a sub namespace 28 // "user.ocis." in the xattrs_prefix*.go files. 29 const ( 30 TypeAttr string = OcisPrefix + "type" 31 IDAttr string = OcisPrefix + "id" 32 ParentidAttr string = OcisPrefix + "parentid" 33 OwnerIDAttr string = OcisPrefix + "owner.id" 34 OwnerIDPAttr string = OcisPrefix + "owner.idp" 35 OwnerTypeAttr string = OcisPrefix + "owner.type" 36 // the base name of the node 37 // updated when the file is renamed or moved 38 NameAttr string = OcisPrefix + "name" 39 40 BlobIDAttr string = OcisPrefix + "blobid" 41 BlobsizeAttr string = OcisPrefix + "blobsize" 42 43 // statusPrefix is the prefix for the node status 44 StatusPrefix string = OcisPrefix + "nodestatus" 45 46 // scanPrefix is the prefix for the virus scan status and date 47 ScanStatusPrefix string = OcisPrefix + "scanstatus" 48 ScanDatePrefix string = OcisPrefix + "scandate" 49 50 // grantPrefix is the prefix for sharing related extended attributes 51 GrantPrefix string = OcisPrefix + "grant." 52 GrantUserAcePrefix string = OcisPrefix + "grant." + UserAcePrefix 53 GrantGroupAcePrefix string = OcisPrefix + "grant." + GroupAcePrefix 54 MetadataPrefix string = OcisPrefix + "md." 55 56 // favorite flag, per user 57 FavPrefix string = OcisPrefix + "fav." 58 59 // a temporary etag for a folder that is removed when the mtime propagation happens 60 TmpEtagAttr string = OcisPrefix + "tmp.etag" 61 ReferenceAttr string = OcisPrefix + "cs3.ref" // arbitrary metadata 62 ChecksumPrefix string = OcisPrefix + "cs." // followed by the algorithm, eg. ocis.cs.sha1 63 TrashOriginAttr string = OcisPrefix + "trash.origin" // trash origin 64 65 // we use a single attribute to enable or disable propagation of both: synctime and treesize 66 // The propagation attribute is set to '1' at the top of the (sub)tree. Propagation will stop at 67 // that node. 68 PropagationAttr string = OcisPrefix + "propagation" 69 70 // we need mtime to keep mtime in sync with the metadata 71 MTimeAttr string = OcisPrefix + "mtime" 72 // the tree modification time of the tree below this node, 73 // propagated when synctime_accounting is true and 74 // user.ocis.propagation=1 is set 75 // stored as a readable time.RFC3339Nano 76 TreeMTimeAttr string = OcisPrefix + "tmtime" 77 78 // the deletion/disabled time of a space or node 79 // used to mark space roots as disabled 80 // stored as a readable time.RFC3339Nano 81 DTimeAttr string = OcisPrefix + "dtime" 82 83 // the size of the tree below this node, 84 // propagated when treesize_accounting is true and 85 // user.ocis.propagation=1 is set 86 // stored as uint64, little endian 87 TreesizeAttr string = OcisPrefix + "treesize" 88 89 // the quota for the storage space / tree, regardless who accesses it 90 QuotaAttr string = OcisPrefix + "quota" 91 92 // the name given to a storage space. It should not contain any semantics as its only purpose is to be read. 93 SpaceIDAttr string = OcisPrefix + "space.id" 94 SpaceNameAttr string = OcisPrefix + "space.name" 95 SpaceTypeAttr string = OcisPrefix + "space.type" 96 SpaceDescriptionAttr string = OcisPrefix + "space.description" 97 SpaceReadmeAttr string = OcisPrefix + "space.readme" 98 SpaceImageAttr string = OcisPrefix + "space.image" 99 SpaceAliasAttr string = OcisPrefix + "space.alias" 100 101 UserAcePrefix string = "u:" 102 GroupAcePrefix string = "g:" 103 )