types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = 1
)

Variables

View Source
var (
	ErrFileIllegalMode = errors.New("illegal file mode")
)
View Source
var (
	ErrFilesystemInvalidFormat = errors.New("invalid filesystem format")
)
View Source
var (
	ErrPathRelative = errors.New("path not absolute")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Version  int      `json:"ignitionVersion"    yaml:"ignition_version"`
	Storage  Storage  `json:"storage,omitempty"  yaml:"storage"`
	Systemd  Systemd  `json:"systemd,omitempty"  yaml:"systemd"`
	Networkd Networkd `json:"networkd,omitempty" yaml:"networkd"`
	Passwd   Passwd   `json:"passwd,omitempty"   yaml:"passwd"`
}

type Disk

type Disk struct {
	Device     Path        `json:"device,omitempty"     yaml:"device"`
	WipeTable  bool        `json:"wipeTable,omitempty"  yaml:"wipe_table"`
	Partitions []Partition `json:"partitions,omitempty" yaml:"partitions"`
}

func (*Disk) UnmarshalJSON

func (n *Disk) UnmarshalJSON(data []byte) error

func (*Disk) UnmarshalYAML

func (n *Disk) UnmarshalYAML(unmarshal func(interface{}) error) error

type File

type File struct {
	Path     Path     `json:"path,omitempty"     yaml:"path"`
	Contents string   `json:"contents,omitempty" yaml:"contents"`
	Mode     FileMode `json:"mode,omitempty"     yaml:"mode"`
	Uid      int      `json:"uid,omitempty"      yaml:"uid"`
	Gid      int      `json:"gid,omitempty"      yaml:"gid"`
}

type FileMode

type FileMode os.FileMode

func (*FileMode) UnmarshalJSON

func (m *FileMode) UnmarshalJSON(data []byte) error

func (*FileMode) UnmarshalYAML

func (m *FileMode) UnmarshalYAML(unmarshal func(interface{}) error) error

type Filesystem

type Filesystem struct {
	Device Path              `json:"device,omitempty" yaml:"device"`
	Format FilesystemFormat  `json:"format,omitempty" yaml:"format"`
	Create *FilesystemCreate `json:"create,omitempty" yaml:"create"`
	Files  []File            `json:"files,omitempty"  yaml:"files"`
}

func (*Filesystem) UnmarshalJSON

func (f *Filesystem) UnmarshalJSON(data []byte) error

func (*Filesystem) UnmarshalYAML

func (f *Filesystem) UnmarshalYAML(unmarshal func(interface{}) error) error

type FilesystemCreate

type FilesystemCreate struct {
	Force   bool        `json:"force,omitempty"   yaml:"force"`
	Options MkfsOptions `json:"options,omitempty" yaml:"options"`
}

type FilesystemFormat

type FilesystemFormat string

func (*FilesystemFormat) UnmarshalJSON

func (f *FilesystemFormat) UnmarshalJSON(data []byte) error

func (*FilesystemFormat) UnmarshalYAML

func (f *FilesystemFormat) UnmarshalYAML(unmarshal func(interface{}) error) error

type Group

type Group struct {
	Name         string `json:"name,omitempty"          yaml:"name"`
	Gid          *uint  `json:"gid,omitempty"           yaml:"gid"`
	PasswordHash string `json:"passwordHash,omitempty"  yaml:"password_hash"`
	System       bool   `json:"system,omitempty"        yaml:"system"`
}

type MkfsOptions

type MkfsOptions []string

func (*MkfsOptions) UnmarshalJSON

func (o *MkfsOptions) UnmarshalJSON(data []byte) error

func (*MkfsOptions) UnmarshalYAML

func (o *MkfsOptions) UnmarshalYAML(unmarshal func(interface{}) error) error

type Networkd

type Networkd struct {
	Units []NetworkdUnit `json:"units,omitempty" yaml:"units"`
}

type NetworkdUnit

type NetworkdUnit struct {
	Name     NetworkdUnitName `json:"name,omitempty"     yaml:"name"`
	Contents string           `json:"contents,omitempty" yaml:"contents"`
}

type NetworkdUnitName

type NetworkdUnitName string

func (*NetworkdUnitName) UnmarshalJSON

func (n *NetworkdUnitName) UnmarshalJSON(data []byte) error

func (*NetworkdUnitName) UnmarshalYAML

func (n *NetworkdUnitName) UnmarshalYAML(unmarshal func(interface{}) error) error

type Partition

type Partition struct {
	Label    PartitionLabel     `json:"label,omitempty"    yaml:"label"`
	Number   int                `json:"number"             yaml:"number"`
	Size     PartitionDimension `json:"size"               yaml:"size"`
	Start    PartitionDimension `json:"start"              yaml:"start"`
	TypeGUID PartitionTypeGUID  `json:"typeGuid,omitempty" yaml:"type_guid"`
}

type PartitionDimension

type PartitionDimension uint64

func (*PartitionDimension) UnmarshalJSON

func (n *PartitionDimension) UnmarshalJSON(data []byte) error

func (*PartitionDimension) UnmarshalYAML

func (n *PartitionDimension) UnmarshalYAML(unmarshal func(interface{}) error) error

type PartitionLabel

type PartitionLabel string

func (*PartitionLabel) UnmarshalJSON

func (n *PartitionLabel) UnmarshalJSON(data []byte) error

func (*PartitionLabel) UnmarshalYAML

func (n *PartitionLabel) UnmarshalYAML(unmarshal func(interface{}) error) error

type PartitionTypeGUID

type PartitionTypeGUID string

func (*PartitionTypeGUID) UnmarshalJSON

func (d *PartitionTypeGUID) UnmarshalJSON(data []byte) error

func (*PartitionTypeGUID) UnmarshalYAML

func (d *PartitionTypeGUID) UnmarshalYAML(unmarshal func(interface{}) error) error

type Passwd

type Passwd struct {
	Users  []User  `json:"users,omitempty"  yaml:"users"`
	Groups []Group `json:"groups,omitempty" yaml:"groups"`
}

type Path

type Path string

func (*Path) UnmarshalJSON

func (d *Path) UnmarshalJSON(data []byte) error

func (*Path) UnmarshalYAML

func (d *Path) UnmarshalYAML(unmarshal func(interface{}) error) error

type Raid

type Raid struct {
	Name    string `json:"name"              yaml:"name"`
	Level   string `json:"level"             yaml:"level"`
	Devices []Path `json:"devices,omitempty" yaml:"devices"`
	Spares  int    `json:"spares,omitempty"  yaml:"spares"`
}

func (*Raid) UnmarshalJSON

func (n *Raid) UnmarshalJSON(data []byte) error

func (*Raid) UnmarshalYAML

func (n *Raid) UnmarshalYAML(unmarshal func(interface{}) error) error

type Storage

type Storage struct {
	Disks       []Disk       `json:"disks,omitempty"       yaml:"disks"`
	Arrays      []Raid       `json:"raid,omitempty"        yaml:"raid"`
	Filesystems []Filesystem `json:"filesystems,omitempty" yaml:"filesystems"`
}

type Systemd

type Systemd struct {
	Units []SystemdUnit `json:"units,omitempty" yaml:"units"`
}

type SystemdUnit

type SystemdUnit struct {
	Name     SystemdUnitName     `json:"name,omitempty"     yaml:"name"`
	Enable   bool                `json:"enable,omitempty"   yaml:"enable"`
	Mask     bool                `json:"mask,omitempty"     yaml:"mask"`
	Contents string              `json:"contents,omitempty" yaml:"contents"`
	DropIns  []SystemdUnitDropIn `json:"dropins,omitempty"  yaml:"dropins"`
}

type SystemdUnitDropIn

type SystemdUnitDropIn struct {
	Name     SystemdUnitDropInName `json:"name,omitempty"     yaml:"name"`
	Contents string                `json:"contents,omitempty" yaml:"contents"`
}

type SystemdUnitDropInName

type SystemdUnitDropInName string

func (*SystemdUnitDropInName) UnmarshalJSON

func (n *SystemdUnitDropInName) UnmarshalJSON(data []byte) error

func (*SystemdUnitDropInName) UnmarshalYAML

func (n *SystemdUnitDropInName) UnmarshalYAML(unmarshal func(interface{}) error) error

type SystemdUnitName

type SystemdUnitName string

func (*SystemdUnitName) UnmarshalJSON

func (n *SystemdUnitName) UnmarshalJSON(data []byte) error

func (*SystemdUnitName) UnmarshalYAML

func (n *SystemdUnitName) UnmarshalYAML(unmarshal func(interface{}) error) error

type User

type User struct {
	Name              string      `json:"name,omitempty"              yaml:"name"`
	PasswordHash      string      `json:"passwordHash,omitempty"      yaml:"password_hash"`
	SSHAuthorizedKeys []string    `json:"sshAuthorizedKeys,omitempty" yaml:"ssh_authorized_keys"`
	Create            *UserCreate `json:"create,omitempty"            yaml:"create"`
}

type UserCreate

type UserCreate struct {
	Uid          *uint    `json:"uid,omitempty"          yaml:"uid"`
	GECOS        string   `json:"gecos,omitempty"        yaml:"gecos"`
	Homedir      string   `json:"homeDir,omitempty"      yaml:"home_dir"`
	NoCreateHome bool     `json:"noCreateHome,omitempty" yaml:"no_create_home"`
	PrimaryGroup string   `json:"primaryGroup,omitempty" yaml:"primary_group"`
	Groups       []string `json:"groups,omitempty"       yaml:"groups"`
	NoUserGroup  bool     `json:"noUserGroup,omitempty"  yaml:"no_user_group"`
	System       bool     `json:"system,omitempty"       yaml:"system"`
	NoLogInit    bool     `json:"noLogInit,omitempty"    yaml:"no_log_init"`
	Shell        string   `json:"shell,omitempty"        yaml:"shell"`
}

Jump to

Keyboard shortcuts

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