Documentation ¶
Overview ¶
Copyright (C) 2022 Storj Labs, Inc. See LICENSE for copying information.
Copyright (C) 2022 Storj Labs, Inc. See LICENSE for copying information.
Copyright (C) 2022 Storj Labs, Inc. See LICENSE for copying information.
Copyright (C) 2022 Storj Labs, Inc. See LICENSE for copying information.
Index ¶
- Constants
- Variables
- type Block
- type DB
- func (db *DB) Delete(ctx context.Context, key ds.Key) (err error)
- func (db *DB) DeleteBlock(ctx context.Context, cid string) (err error)
- func (db *DB) Get(ctx context.Context, key ds.Key) (data []byte, err error)
- func (db *DB) GetBlock(ctx context.Context, cid string) (block *Block, err error)
- func (db *DB) GetBlockSize(ctx context.Context, cid string) (size int, err error)
- func (db *DB) GetCreatedTime(ctx context.Context) (created time.Time, err error)
- func (db *DB) GetNotPackedBlocksTotalSize(ctx context.Context) (unpackedSize, packingSize int64, err error)
- func (db *DB) GetSize(ctx context.Context, key ds.Key) (size int, err error)
- func (db *DB) GetUnpackedBlocksUpToMaxSize(ctx context.Context, maxSize int) (cids []string, err error)
- func (db *DB) Has(ctx context.Context, key ds.Key) (exists bool, err error)
- func (db *DB) HasBlock(ctx context.Context, cid string) (exists bool, err error)
- func (db *DB) MigrateToLatest(ctx context.Context) (err error)
- func (db *DB) Migration() *migrate.Migration
- func (db *DB) Put(ctx context.Context, key ds.Key, value []byte) (err error)
- func (db *DB) PutBlock(ctx context.Context, cid string, value []byte) (err error)
- func (db *DB) QueryDatastore(ctx context.Context, q dsq.Query) (result dsq.Results, err error)
- func (db *DB) QueryPackingBlocksData(ctx context.Context, maxSize, maxBlocks int, result map[string][]byte) (err error)
- func (db *DB) QueryUnpackedBlocksData(ctx context.Context, cids []string, result map[string][]byte) (err error)
- func (db *DB) TestingDeleteAll(ctx context.Context) (err error)
- func (db *DB) TestingUpdateBlockPackStatus(ctx context.Context, cid string, newStatus int) (err error)
- func (db *DB) UpdatePackedBlocks(ctx context.Context, packObjectKey string, cidOffs map[string]int) (err error)
Constants ¶
View Source
const ( UnpackedStatus = 0 PackingStatus = 1 PackedStatus = 2 )
Variables ¶
View Source
var Error = errs.Class("db")
Error is the error class for datastore database.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB is the datastore database for mapping IPFS blocks to Storj object packs.
func (*DB) GetBlockSize ¶
func (*DB) GetCreatedTime ¶
GetCreatedTime returns the time when the database was created.
func (*DB) GetNotPackedBlocksTotalSize ¶
func (*DB) GetUnpackedBlocksUpToMaxSize ¶
func (*DB) MigrateToLatest ¶
MigrateToLatest migrates pindb to the latest version.
func (*DB) QueryDatastore ¶
func (*DB) QueryPackingBlocksData ¶
func (*DB) QueryUnpackedBlocksData ¶
func (*DB) TestingDeleteAll ¶
TestingDeleteAll deletes all data from the database.
Click to show internal directories.
Click to hide internal directories.