mirror of https://github.com/perkeep/perkeep.git
Add new camli/search package and start of interface.
This commit is contained in:
parent
6a661c9d42
commit
195987bb1b
3
build.pl
3
build.pl
|
@ -314,6 +314,9 @@ TARGET: lib/go/blobserver
|
|||
- lib/go/blobref
|
||||
- lib/go/testing
|
||||
|
||||
TARGET: lib/go/search
|
||||
- lib/go/blobref
|
||||
|
||||
TARGET: lib/go/blobserver/handlers
|
||||
- server/go/auth
|
||||
- server/go/httputil
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
include $(GOROOT)/src/Make.inc
|
||||
|
||||
PREREQ=$(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)/camli/blobref.a
|
||||
|
||||
TARG=camli/search
|
||||
GOFILES=\
|
||||
search.go\
|
||||
|
||||
include $(GOROOT)/src/Make.pkg
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Copyright 2011 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package search
|
||||
|
||||
import (
|
||||
"camli/blobref"
|
||||
"os"
|
||||
)
|
||||
|
||||
type Result struct {
|
||||
BlobRef *blobref.BlobRef
|
||||
LastModTime int64 // nanos since epoch
|
||||
}
|
||||
|
||||
type Index interface {
|
||||
// dest is closed
|
||||
// limit is <= 0 for default. smallest possible default is 0
|
||||
GetRecentPermanodes(dest chan *Result,
|
||||
owner []*blobref.BlobRef,
|
||||
limit int) os.Error
|
||||
}
|
Loading…
Reference in New Issue