Documentation ¶
Overview ¶
Package gpt provides a library for working with GPT partitions.
Index ¶
- type GPT
- func (gpt *GPT) Add(size uint64, setters ...interface{}) (table.Partition, error)
- func (gpt *GPT) Bytes() []byte
- func (gpt *GPT) Delete(partition table.Partition) error
- func (gpt *GPT) Header() table.Header
- func (gpt *GPT) InformKernelOfAdd(devname string, partition table.Partition) error
- func (gpt *GPT) InformKernelOfDelete(devname string, partition table.Partition) error
- func (gpt *GPT) InformKernelOfResize(devname string, partition table.Partition) error
- func (gpt *GPT) Partitions() []table.Partition
- func (gpt *GPT) PhysicalBlockSize() int
- func (gpt *GPT) Read() error
- func (gpt *GPT) Repair() error
- func (gpt *GPT) Resize(p table.Partition) error
- func (gpt *GPT) Type() table.Type
- func (gpt *GPT) Write() error
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPT ¶
type GPT struct {
// contains filtered or unexported fields
}
GPT represents the GUID partition table.
func (*GPT) InformKernelOfAdd ¶
InformKernelOfAdd invokes the BLKPG_ADD_PARTITION ioctl.
func (*GPT) InformKernelOfDelete ¶
InformKernelOfDelete invokes the BLKPG_DEL_PARTITION ioctl.
func (*GPT) InformKernelOfResize ¶
InformKernelOfResize invokes the BLKPG_RESIZE_PARTITION ioctl.
func (*GPT) Partitions ¶
Partitions returns the partitions.
func (*GPT) PhysicalBlockSize ¶
PhysicalBlockSize returns the physical block size.
type Option ¶
type Option func(*Options)
Option is the functional option func.
func WithLogicalBlockSize ¶
WithLogicalBlockSize sets the logical block size.
func WithPhysicalBlockSize ¶
WithPhysicalBlockSize sets the physical block size.
func WithPrimaryGPT ¶
WithPrimaryGPT sets the contents of offset 24 in the GPT header to the location of the primary header.
Directories ¶
Path | Synopsis |
---|---|
Package header provides a library for working with GPT headers.
|
Package header provides a library for working with GPT headers. |
Package partition provides a library for working with GPT partitions.
|
Package partition provides a library for working with GPT partitions. |
Click to show internal directories.
Click to hide internal directories.