Documentation ¶
Index ¶
- type AggregateError
- type ItemBlock
- type ItemBlockMetadata
- type ItemReferenceBlockStore
- func (i ItemReferenceBlockStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (i ItemReferenceBlockStore) DeleteBlock(ctx context.Context, cid cid.Cid) error
- func (i ItemReferenceBlockStore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error)
- func (i ItemReferenceBlockStore) GetSize(ctx context.Context, c cid.Cid) (int, error)
- func (i ItemReferenceBlockStore) Has(ctx context.Context, cid cid.Cid) (bool, error)
- func (i ItemReferenceBlockStore) HashOnRead(enabled bool)
- func (i ItemReferenceBlockStore) Put(ctx context.Context, block blocks.Block) error
- func (i ItemReferenceBlockStore) PutMany(ctx context.Context, i2 []blocks.Block) error
- type PieceBlock
- type PieceReader
- type RawBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateError ¶
type AggregateError struct {
Errors []error
}
func (AggregateError) Error ¶
func (a AggregateError) Error() string
type ItemBlock ¶
type ItemBlock struct { PieceOffset int64 `json:"pieceOffset"` SourceHandler datasource.Handler `json:"-"` Item *model.Item `json:"item"` Meta []ItemBlockMetadata `json:"meta"` }
func (ItemBlock) GetPieceOffset ¶
type ItemBlockMetadata ¶
type ItemBlockMetadata struct { PieceOffset int64 `json:"pieceOffset"` Varint []byte `json:"varint"` Cid cid.Cid `json:"cid"` ItemOffset int64 `json:"itemOffset"` ItemLength int32 `json:"itemLength"` }
func (ItemBlockMetadata) BlockOffset ¶
func (i ItemBlockMetadata) BlockOffset() int64
func (ItemBlockMetadata) CidOffset ¶
func (i ItemBlockMetadata) CidOffset() int64
func (ItemBlockMetadata) EndOffset ¶
func (i ItemBlockMetadata) EndOffset() int64
func (ItemBlockMetadata) GetPieceOffset ¶
func (i ItemBlockMetadata) GetPieceOffset() int64
func (ItemBlockMetadata) Length ¶
func (i ItemBlockMetadata) Length() int
type ItemReferenceBlockStore ¶
type ItemReferenceBlockStore struct { DB *gorm.DB HandlerResolver datasource.HandlerResolver }
func (ItemReferenceBlockStore) AllKeysChan ¶
func (i ItemReferenceBlockStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
func (ItemReferenceBlockStore) DeleteBlock ¶
func (i ItemReferenceBlockStore) DeleteBlock(ctx context.Context, cid cid.Cid) error
func (ItemReferenceBlockStore) GetSize ¶
func (i ItemReferenceBlockStore) GetSize(ctx context.Context, c cid.Cid) (int, error)
func (ItemReferenceBlockStore) Has ¶
func (i ItemReferenceBlockStore) Has(ctx context.Context, cid cid.Cid) (bool, error)
func (ItemReferenceBlockStore) HashOnRead ¶
func (i ItemReferenceBlockStore) HashOnRead(enabled bool)
type PieceBlock ¶
type PieceBlock interface {
GetPieceOffset() int64
}
type PieceReader ¶
type PieceReader struct { Blocks []PieceBlock `json:"blocks"` Header []byte `json:"header"` // contains filtered or unexported fields }
func NewPieceReader ¶
func NewPieceReader( ctx context.Context, car model.Car, carBlocks []model.CarBlock, resolver datasource.HandlerResolver, ) ( *PieceReader, error, )
func (*PieceReader) Close ¶
func (pr *PieceReader) Close() error
func (*PieceReader) MakeCopy ¶
func (pr *PieceReader) MakeCopy(ctx context.Context, offset int64) (*PieceReader, error)
type RawBlock ¶
type RawBlock struct { PieceOffset int64 `json:"pieceOffset"` Varint []byte `json:"varint"` Cid cid.Cid `json:"cid"` BlockData []byte `json:"blockData"` }
func (RawBlock) BlockOffset ¶
func (RawBlock) GetPieceOffset ¶
Click to show internal directories.
Click to hide internal directories.