Documentation ¶
Overview ¶
Package header provides a library for working with GPT headers.
Index ¶
Constants ¶
View Source
const (
// HeaderSize is the GUID partition table header size in bytes.
HeaderSize = 92
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { Signature string // 0 Revision uint32 // 8 Size uint32 // 12 CRC uint32 // 16 Reserved uint32 // 20 CurrentLBA uint64 // 24 BackupLBA uint64 // 32 FirstUsableLBA uint64 // 40 LastUsableLBA uint64 // 48 GUUID uuid.UUID // 56 PartitionEntriesStartLBA uint64 // 72 NumberOfPartitionEntries uint32 // 80 PartitionEntrySize uint32 // 84 PartitionsArrayCRC uint32 // 88 TrailingBytes []byte // 92 *lba.LogicalBlockAddresser // contains filtered or unexported fields }
Header represents a GUID partition table.
func NewHeader ¶
func NewHeader(data []byte, lba *lba.LogicalBlockAddresser) *Header
NewHeader inializes and returns a GUID partition table header.
func (*Header) ArrayBytes ¶
ArrayBytes returns the GUID partition table partitions entries array as a byte slice.
type Option ¶
type Option func(*Options)
Option is the functional option func.
func WithHeaderArrayBytes ¶
WithHeaderArrayBytes sets the partition type.
func WithHeaderPrimary ¶
WithHeaderPrimary sets the primary option.
func WithHeaderTable ¶
WithHeaderTable sets the partition type.
Click to show internal directories.
Click to hide internal directories.