Documentation ¶
Index ¶
- type Blob
- type FakeIndex
- func (fi *FakeIndex) AddClaim(owner, permanode *blobref.BlobRef, claimType, attr, value string)
- func (fi *FakeIndex) AddMeta(blob *blobref.BlobRef, mime string, size int64)
- func (fi *FakeIndex) AddSignerAttrValue(signer *blobref.BlobRef, attr, val string, latest *blobref.BlobRef)
- func (fi *FakeIndex) EdgesTo(ref *blobref.BlobRef, opts *search.EdgesToOpts) ([]*search.Edge, error)
- func (fi *FakeIndex) ExistingFileSchemas(bytesRef *blobref.BlobRef) ([]*blobref.BlobRef, error)
- func (fi *FakeIndex) GetBlobMIMEType(blob *blobref.BlobRef) (mime string, size int64, err error)
- func (fi *FakeIndex) GetFileInfo(fileRef *blobref.BlobRef) (*search.FileInfo, error)
- func (fi *FakeIndex) GetImageInfo(fileRef *blobref.BlobRef) (*search.ImageInfo, error)
- func (fi *FakeIndex) GetOwnerClaims(permaNode, owner *blobref.BlobRef) (search.ClaimList, error)
- func (fi *FakeIndex) GetRecentPermanodes(dest chan *search.Result, owner *blobref.BlobRef, limit int) error
- func (fi *FakeIndex) PathLookup(signer, base *blobref.BlobRef, suffix string, at time.Time) (*search.Path, error)
- func (fi *FakeIndex) PathsLookup(signer, base *blobref.BlobRef, suffix string) ([]*search.Path, error)
- func (fi *FakeIndex) PathsOfSignerTarget(signer, target *blobref.BlobRef) ([]*search.Path, error)
- func (fi *FakeIndex) PermanodeOfSignerAttrValue(signer *blobref.BlobRef, attr, val string) (*blobref.BlobRef, error)
- func (fi *FakeIndex) SearchPermanodesWithAttr(dest chan<- *blobref.BlobRef, request *search.PermanodeByAttrRequest) error
- type Fetcher
- func (tf *Fetcher) AddBlob(b *Blob)
- func (tf *Fetcher) BlobContents(br *blobref.BlobRef) (contents string, ok bool)
- func (tf *Fetcher) Fetch(ref *blobref.BlobRef) (file blobref.ReadSeekCloser, size int64, err error)
- func (tf *Fetcher) FetchStreaming(ref *blobref.BlobRef) (file io.ReadCloser, size int64, err error)
- func (tf *Fetcher) ReceiveBlob(br *blobref.BlobRef, source io.Reader) (blobref.SizedBlobRef, error)
- func (tf *Fetcher) StatBlobs(dest chan<- blobref.SizedBlobRef, blobs []*blobref.BlobRef, wait time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct {
Contents string // the contents of the blob
}
Blob is a utility class for unit tests.
func (*Blob) AssertMatches ¶
func (tb *Blob) AssertMatches(t *testing.T, sb *blobref.SizedBlobRef)
func (*Blob) BlobRefSlice ¶
type FakeIndex ¶
type FakeIndex struct {
// contains filtered or unexported fields
}
A FakeIndex implements parts of search.Index and provides methods to controls the results, such as AddMeta, AddClaim, AddSignerAttrValue.
func NewFakeIndex ¶
func NewFakeIndex() *FakeIndex
func (*FakeIndex) AddSignerAttrValue ¶
func (*FakeIndex) ExistingFileSchemas ¶
func (*FakeIndex) GetBlobMIMEType ¶
func (*FakeIndex) GetFileInfo ¶
func (*FakeIndex) GetImageInfo ¶
func (*FakeIndex) GetOwnerClaims ¶
func (*FakeIndex) GetRecentPermanodes ¶
func (*FakeIndex) PathLookup ¶
func (*FakeIndex) PathsLookup ¶
func (*FakeIndex) PathsOfSignerTarget ¶
func (*FakeIndex) PermanodeOfSignerAttrValue ¶
func (*FakeIndex) SearchPermanodesWithAttr ¶
func (fi *FakeIndex) SearchPermanodesWithAttr(dest chan<- *blobref.BlobRef, request *search.PermanodeByAttrRequest) error
TODO(mpl): write real tests
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
func (*Fetcher) BlobContents ¶
func (*Fetcher) FetchStreaming ¶
func (*Fetcher) ReceiveBlob ¶
Click to show internal directories.
Click to hide internal directories.