Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SkyfileLayoutSize describes the amount of space within the first sector // of a skyfile used to describe the rest of the skyfile. SkyfileLayoutSize = 99 // SkyfileVersion establishes the current version for creating skyfiles. // The skyfile versions are different from the siafile versions. SkyfileVersion = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SkyfileLayout ¶
type SkyfileLayout struct { Version uint8 Filesize uint64 MetadataSize uint64 FanoutSize uint64 FanoutDataPieces uint8 FanoutParityPieces uint8 CipherType crypto.CipherType KeyData [layoutKeyDataSize]byte // keyData is incompatible with ciphers that need keys larger than 64 bytes }
SkyfileLayout explains the layout information that is used for storing data inside of the skyfile. The SkyfileLayout always appears as the first bytes of the leading chunk.
func ParseSkyfileMetadata ¶
func ParseSkyfileMetadata(baseSector []byte) (sl SkyfileLayout, fanoutBytes []byte, sm modules.SkyfileMetadata, baseSectorPayload []byte, err error)
ParseSkyfileMetadata will pull the metadata (including layout and fanout) out of a skyfile.
func (*SkyfileLayout) Decode ¶
func (sl *SkyfileLayout) Decode(b []byte)
Decode will take a []byte and load the layout from that []byte.
func (*SkyfileLayout) Encode ¶
func (sl *SkyfileLayout) Encode() []byte
Encode will return a []byte that has compactly encoded all of the layout data.
Click to show internal directories.
Click to hide internal directories.