Documentation ¶
Index ¶
- Constants
- func CloseOnceFile(f EdsFile) *closeOnceFile
- func ReadEds(_ context.Context, r io.Reader, edsSize int) (*rsmt2d.ExtendedDataSquare, error)
- type CacheFile
- func (f *CacheFile) AxisHalf(ctx context.Context, axisType rsmt2d.Axis, axisIdx int) ([]share.Share, error)
- func (f *CacheFile) Data(ctx context.Context, namespace share.Namespace, rowIdx int) (share.NamespacedRow, error)
- func (f *CacheFile) EDS(ctx context.Context) (*rsmt2d.ExtendedDataSquare, error)
- func (f *CacheFile) Share(ctx context.Context, x, y int) (*share.ShareWithProof, error)
- type Codec
- type EdsFile
- type Header
- type MemFile
- func (f *MemFile) AxisHalf(_ context.Context, axisType rsmt2d.Axis, axisIdx int) ([]share.Share, error)
- func (f *MemFile) Close() error
- func (f *MemFile) Data(_ context.Context, namespace share.Namespace, rowIdx int) (share.NamespacedRow, error)
- func (f *MemFile) DataHash() share.DataHash
- func (f *MemFile) EDS(_ context.Context) (*rsmt2d.ExtendedDataSquare, error)
- func (f *MemFile) Height() uint64
- func (f *MemFile) Reader() (io.Reader, error)
- func (f *MemFile) Share(_ context.Context, x, y int) (*share.ShareWithProof, error)
- func (f *MemFile) Size() int
- type OdsFile
- func (f *OdsFile) AxisHalf(ctx context.Context, axisType rsmt2d.Axis, axisIdx int) ([]share.Share, error)
- func (f *OdsFile) Close() error
- func (f *OdsFile) Data(ctx context.Context, namespace share.Namespace, rowIdx int) (share.NamespacedRow, error)
- func (f *OdsFile) DataHash() share.DataHash
- func (f *OdsFile) EDS(_ context.Context) (*rsmt2d.ExtendedDataSquare, error)
- func (f *OdsFile) Height() uint64
- func (f *OdsFile) Reader() (io.Reader, error)
- func (f *OdsFile) Share(ctx context.Context, x, y int) (*share.ShareWithProof, error)
- func (f *OdsFile) Size() int
Constants ¶
View Source
const (
FileV0 fileVersion = iota
)
View Source
const HeaderSize = 64
Variables ¶
This section is empty.
Functions ¶
func CloseOnceFile ¶
func CloseOnceFile(f EdsFile) *closeOnceFile
Types ¶
type CacheFile ¶
type CacheFile struct { EdsFile // contains filtered or unexported fields }
func NewCacheFile ¶
type EdsFile ¶
type EdsFile interface { io.Closer // Reader returns binary reader for the file. Reader() (io.Reader, error) // Size returns square size of the file. Size() int // Height returns height of the file. Height() uint64 // DataHash returns data hash of the file. DataHash() share.DataHash Share(ctx context.Context, x, y int) (*share.ShareWithProof, error) // AxisHalf returns shares for the first half of the axis of the given type and index. AxisHalf(ctx context.Context, axisType rsmt2d.Axis, axisIdx int) ([]share.Share, error) // Data returns data for the given namespace and row index. Data(ctx context.Context, namespace share.Namespace, rowIdx int) (share.NamespacedRow, error) // EDS returns extended data square stored in the file. EDS(ctx context.Context) (*rsmt2d.ExtendedDataSquare, error) }
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
func (*Header) SquareSize ¶
type MemFile ¶
type MemFile struct { Eds *rsmt2d.ExtendedDataSquare // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.