Versions in this module Expand all Collapse all v2 v2.0.0 Feb 4, 2022 Changes in this version + var ErrRequestExpired = fmt.Errorf("request expired") + var ErrResourceDeleted = fmt.Errorf("resource was deleted") + var ErrResponseMismatch = fmt.Errorf("response checksums do not match") + var ErrUploadPending = errors.New("Resource not available because upload is not yet complete") + func NewPutResponse(requestId int64, sha384hash string) putResponse + type ManagedResource struct + BucketUUID string + Path string + User string + type ManagedStorage interface + GetForBucket func(bucketUUID, path string) (r io.ReadCloser, length int64, err error) + ProofOfAccessResponse func(putResponse) error + PutForBucket func(bucketUUID, path string, r io.Reader, length int64) error + PutForBucketAndCheckHash func(bucketUUID, path string, r io.Reader, length int64, checkHash string) error + PutForBucketRequest func(bucketUUID, path string, hash string) (*RequestResponse, error) + RemoveForBucket func(bucketUUID, path string) error + func NewManagedStorage(db *mgo.Database, rs ResourceStorage) ManagedStorage + type PutRequest struct + type RequestResponse struct + RangeLength int64 + RangeStart int64 + RequestId int64 + type Resource struct + Length int64 + Path string + SHA384Hash string + type ResourceCatalog interface + Find func(hash string) (id string, err error) + Get func(id string) (*Resource, error) + Put func(hash string, length int64) (id, path string, err error) + Remove func(id string) (wasDeleted bool, path string, err error) + UploadComplete func(id, path string) error + type ResourceStorage interface + Get func(path string) (io.ReadCloser, error) + Put func(path string, r io.Reader, length int64) (checksum string, err error) + Remove func(path string) error + func NewGridFS(dbName, namespace string, session *mgo.Session) ResourceStorage Other modules containing this package github.com/juju/blobstore/v3