Home Download Docs Code Community
     1	/*
     2	Copyright 2011 The Perkeep Authors
     3	
     4	Licensed under the Apache License, Version 2.0 (the "License");
     5	you may not use this file except in compliance with the License.
     6	You may obtain a copy of the License at
     7	
     8	     http://www.apache.org/licenses/LICENSE-2.0
     9	
    10	Unless required by applicable law or agreed to in writing, software
    11	distributed under the License is distributed on an "AS IS" BASIS,
    12	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13	See the License for the specific language governing permissions and
    14	limitations under the License.
    15	*/
    16	
    17	/*
    18	Package index provides a generic indexing system on top of the abstract sorted.KeyValue interface.
    19	
    20	The following keys & values are populated by receiving blobs and queried
    21	for search operations:
    22	
    23	  - Recent Permanodes
    24	    "recpn|<pgp-keyid>|<reverse-modtime>|<claim-blobref>" -> "<permanode-blobref>"
    25	    where reverse-modtime flips each digit to '9'-<digit> and prepends "rt" (for reverse time)
    26	    "2011-11-27T01:23:45Z" = "rt7988-88-72T98:76:54Z"
    27	
    28	  - signer blobref of ascii public key -> gpg key id
    29	    "signerkeyid:sha224-a794846212ff67acdd00c6b90eee492baf674d41da8a621d2e8042dd" = "2931A67C26F5ABDA"
    30	
    31	  - PermanodeOfSignerAttrValue:
    32	    "signerattrvalue|<keyid>|<URLEscape(attr)>|<URLEscape(value)>|<reverse-claimtime>|<claim-blobref>" -> "<permanode>"
    33	    e.g.
    34	    "signerattrvalue|2931A67C26F5ABDA|camliRoot|rootval|"+
    35	    "rt7988-88-71T98:67:60.999876543Z|sha224-d78d192115bd8773d7b98b7b9812d1c9d137e8a930041e04a03b8428" =
    36	    "sha224-a794846212ff67acdd00c6b90eee492baf674d41da8a621d2e8042dd"
    37	
    38	  - Other:
    39	    "meta:<blobref>" -> "<size>|<mimetype>"
    40	    "have:<blobref>" -> "<size>" or "<size>|indexed" (used for enumeration, which doesn't need mime type and for marking indexed blobs)
    41	
    42	  - Permanode Claims:
    43	    "claim|<permanode-blobref>|<keyid>|<date>|<claim-blobref>" -> "<URL:type>|<URL:attr>|<URL:value>"
    44	*/
    45	package index // import "perkeep.org/pkg/index"
Website layout inspired by memcached.
Content by the authors.