otkdisk

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Const

type Const struct {
	KernelOptsList []string `json:"kernel_opts_list"`

	// PartitionMap is generated for convenient indexing of certain partitions
	// with predictable names in otk, such as
	// "filesystem.partition_map.boot.uuid"
	PartitionMap map[string]Partition `json:"partition_map"`

	// Internal representation of the full partition table. The representation
	// is internal to the partition tools and should not be used by otk
	// directly. It makes no external API guarantees about the content or
	// structure.
	Internal Internal `json:"internal"`

	// Filename for the disk image.
	Filename string `json:"filename"`
}

Const contains partition table data that is considered "constant", i.e. that should not be modified by the consumer as there may be inter-dependencies between the values

type Data

type Data struct {
	Const Const `json:"const"`
}

Data contains the full description of the partition table as well as extra options and a PartitionMap for easier access. The data under Const should not be modified by a consumer of this data structure.

type Internal

type Internal struct {
	PartitionTable *disk.PartitionTable `json:"partition-table"`
}

Interal contains partition table data that is stricly internal and may change in non-backward compatible ways. No "otk" manifest should ever use this directly, it's strictly meant for the "otk-{gen,make}-*" tools for their data exchange.

type PartType

type PartType string

PartType represents a partition type

const (
	PartTypeUnset PartType = ""
	PartTypeGPT   PartType = "gpt"
	PartTypeDOS   PartType = "dos"
)

func (PartType) Validate

func (p PartType) Validate() error

Validate validates that the given PartType is valid

type Partition

type Partition struct {
	// NOTE: Not a UUID type because fat UUIDs are not compliant
	UUID string `json:"uuid"`
}

Partition represents an exported view of a partition. This is an API so only add things here that are necessary for convenient external access and unlikely to change.

Jump to

Keyboard shortcuts

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