示例#1
0
文件: match.go 项目: glyn/bloblets
func (m matcher) matchResources(ifs []IntegrityFields) ([]IntegrityFields, error) {
	matched := make([]IntegrityFields, 0, len(m))
	for _, f := range ifs {

		if f.Size > 65535 && blobstore.Present(f.Sha1) {
			matched = append(matched, f)
		}
	}

	return matched, nil
}
示例#2
0
文件: main.go 项目: glyn/bloblets
func main() {
	defer blobstore.Terminate()

	blobstore.Add("key name", os.Args[1])

	present := blobstore.Present("key name")
	if !present {
		panic("Head request failed")
	}

	blobstore.Get("key name", os.Args[2])
}