migrations

package
v1.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CIDInfoMigrations is the list of migrations for migrating CIDInfos

PieceInfoMigrations is the list of migrations for migrating PieceInfos

Functions

func MigrateCidInfo0To1

func MigrateCidInfo0To1(oldCi *CIDInfo0) (*piecestore.CIDInfo, error)

MigrateCidInfo0To1 migrates a tuple encoded cid info to a map encoded cid info

func MigratePieceInfo0To1

func MigratePieceInfo0To1(oldPi *PieceInfo0) (*piecestore.PieceInfo, error)

MigratePieceInfo0To1 migrates a tuple encoded piece info to a map encoded piece info

Types

type BlockLocation0

type BlockLocation0 struct {
	RelOffset uint64
	BlockSize uint64
}

BlockLocation0 is version 0 of BlockLocation

func (*BlockLocation0) MarshalCBOR

func (t *BlockLocation0) MarshalCBOR(w io.Writer) error

func (*BlockLocation0) UnmarshalCBOR

func (t *BlockLocation0) UnmarshalCBOR(r io.Reader) error

type CIDInfo0

type CIDInfo0 struct {
	CID                 cid.Cid
	PieceBlockLocations []PieceBlockLocation0
}

CIDInfo0 is version 0 of CIDInfo

func (*CIDInfo0) MarshalCBOR

func (t *CIDInfo0) MarshalCBOR(w io.Writer) error

func (*CIDInfo0) UnmarshalCBOR

func (t *CIDInfo0) UnmarshalCBOR(r io.Reader) error

type DealInfo0

type DealInfo0 struct {
	DealID   abi.DealID
	SectorID abi.SectorNumber
	Offset   abi.PaddedPieceSize
	Length   abi.PaddedPieceSize
}

DealInfo0 is version 0 of DealInfo

func (*DealInfo0) MarshalCBOR

func (t *DealInfo0) MarshalCBOR(w io.Writer) error

func (*DealInfo0) UnmarshalCBOR

func (t *DealInfo0) UnmarshalCBOR(r io.Reader) error

type PieceBlockLocation0

type PieceBlockLocation0 struct {
	BlockLocation0
	PieceCID cid.Cid
}

PieceBlockLocation0 is version 0 of PieceBlockLocation is inside of

func (*PieceBlockLocation0) MarshalCBOR

func (t *PieceBlockLocation0) MarshalCBOR(w io.Writer) error

func (*PieceBlockLocation0) UnmarshalCBOR

func (t *PieceBlockLocation0) UnmarshalCBOR(r io.Reader) error

type PieceInfo0

type PieceInfo0 struct {
	PieceCID cid.Cid
	Deals    []DealInfo0
}

PieceInfo0 is version 0 of PieceInfo

func (*PieceInfo0) MarshalCBOR

func (t *PieceInfo0) MarshalCBOR(w io.Writer) error

func (*PieceInfo0) UnmarshalCBOR

func (t *PieceInfo0) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL