Documentation
¶
Index ¶
- type Config
- type GCSDatastore
- func (gd *GCSDatastore) Batch(_ context.Context) (ds.Batch, error)
- func (gd *GCSDatastore) CheckBucket() error
- func (gd *GCSDatastore) Close() error
- func (gd *GCSDatastore) Delete(ctx context.Context, k ds.Key) error
- func (gd *GCSDatastore) GCSPath(key string) string
- func (gd *GCSDatastore) Get(ctx context.Context, k ds.Key) ([]byte, error)
- func (gd *GCSDatastore) GetSize(ctx context.Context, k ds.Key) (size int, err error)
- func (gd *GCSDatastore) Has(ctx context.Context, k ds.Key) (exists bool, err error)
- func (gd *GCSDatastore) LoadMetadata() error
- func (gd *GCSDatastore) Put(ctx context.Context, k ds.Key, value []byte) error
- func (gd *GCSDatastore) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)
- func (gd *GCSDatastore) Sync(ctx context.Context, prefix ds.Key) error
- type Metadata
- type MetadataCache
- func (md *MetadataCache) Delete(key string)
- func (md *MetadataCache) Get(key string) (*Metadata, error)
- func (md *MetadataCache) Has(key string) bool
- func (md *MetadataCache) Iterator(prefix string, limit int) func() *Metadata
- func (md *MetadataCache) Put(key string, size int64)
- func (md *MetadataCache) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCSDatastore ¶
type GCSDatastore struct { Config // contains filtered or unexported fields }
func NewGCSDatastore ¶
func NewGCSDatastore(cfg Config) (*GCSDatastore, error)
func (*GCSDatastore) CheckBucket ¶
func (gd *GCSDatastore) CheckBucket() error
CheckBucket checks that the GCS bucket exists and is accessible.
func (*GCSDatastore) Close ¶
func (gd *GCSDatastore) Close() error
func (*GCSDatastore) GCSPath ¶
func (gd *GCSDatastore) GCSPath(key string) string
func (*GCSDatastore) LoadMetadata ¶
func (gd *GCSDatastore) LoadMetadata() error
LoadMetadata pre-loads metadata for all objects in the ipfs prefix.
type MetadataCache ¶
type MetadataCache struct {
// contains filtered or unexported fields
}
func NewMetadataCache ¶
func NewMetadataCache() *MetadataCache
func (*MetadataCache) Delete ¶
func (md *MetadataCache) Delete(key string)
func (*MetadataCache) Has ¶
func (md *MetadataCache) Has(key string) bool
func (*MetadataCache) Iterator ¶
func (md *MetadataCache) Iterator(prefix string, limit int) func() *Metadata
Offset not supported, for now.
func (*MetadataCache) Put ¶
func (md *MetadataCache) Put(key string, size int64)
func (*MetadataCache) Size ¶
func (md *MetadataCache) Size() int
Click to show internal directories.
Click to hide internal directories.