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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFilesystemInvalidFormat = errors.New("invalid filesystem format")
	ErrFilesystemNoMountPath   = errors.New("filesystem is missing mount or path")
	ErrFilesystemMountAndPath  = errors.New("filesystem has both mount and path defined")
)
View Source
var (
	ErrHashMalformed    = errors.New("malformed hash specifier")
	ErrHashWrongSize    = errors.New("incorrect size for hash sum")
	ErrHashUnrecognized = errors.New("unrecognized hash function")
)
View Source
var (
	ErrOldVersion = errors.New("incorrect config version (too old)")
	ErrNewVersion = errors.New("incorrect config version (too new)")
)
View Source
var (
	ErrCompressionInvalid = errors.New("invalid compression method")
)
View Source
var (
	ErrFileIllegalMode = errors.New("illegal file mode")
)
View Source
var (
	ErrPathRelative = errors.New("path not absolute")
)
View Source
var (
	MaxVersion = semver.Version{
		Major: 2,
		Minor: 0,
	}
)

Functions

This section is empty.

Types

type Compression

type Compression string

func (*Compression) UnmarshalJSON

func (c *Compression) UnmarshalJSON(data []byte) error

func (*Compression) UnmarshalYAML

func (c *Compression) UnmarshalYAML(unmarshal func(interface{}) error) error

type Config

type Config struct {
	Ignition Ignition `json:"ignition"           yaml:"ignition"`
	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 ConfigReference

type ConfigReference struct {
	Source       Url          `json:"source,omitempty"       yaml:"source"`
	Verification Verification `json:"verification,omitempty" yaml:"verification"`
}

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 {
	Filesystem string       `json:"filesystem,omitempty" yaml:"filesystem"`
	Path       Path         `json:"path,omitempty"       yaml:"path"`
	Contents   FileContents `json:"contents,omitempty"   yaml:"contents"`
	Mode       FileMode     `json:"mode,omitempty"       yaml:"mode"`
	User       FileUser     `json:"user,omitempty"       yaml:"uid"`
	Group      FileGroup    `json:"group,omitempty"      yaml:"gid"`
}

type FileContents

type FileContents struct {
	Compression  Compression  `json:"compression,omitempty"  yaml:"compression"`
	Source       Url          `json:"source,omitempty"       yaml:"source"`
	Verification Verification `json:"verification,omitempty" yaml:"verification"`
}

type FileGroup

type FileGroup struct {
	Id int `json:"id,omitempty" yaml:"id"`
}

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 FileUser

type FileUser struct {
	Id int `json:"id,omitempty" yaml:"id"`
}

type Filesystem

type Filesystem struct {
	Name  string           `json:"name,omitempty"  yaml:"name"`
	Mount *FilesystemMount `json:"mount,omitempty" yaml:"mount"`
	Path  Path             `json:"path,omitempty"  yaml:"path"`
}

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 FilesystemMount

type FilesystemMount struct {
	Device Path              `json:"device,omitempty" yaml:"device"`
	Format FilesystemFormat  `json:"format,omitempty" yaml:"format"`
	Create *FilesystemCreate `json:"create,omitempty" yaml:"create"`
}

func (*FilesystemMount) UnmarshalJSON

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

func (*FilesystemMount) UnmarshalYAML

func (f *FilesystemMount) 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 Hash

type Hash struct {
	Function string
	Sum      string
}

func (Hash) MarshalJSON

func (h Hash) MarshalJSON() ([]byte, error)

func (*Hash) UnmarshalJSON

func (h *Hash) UnmarshalJSON(data []byte) error

func (*Hash) UnmarshalYAML

func (h *Hash) UnmarshalYAML(unmarshal func(interface{}) error) error

type Ignition

type Ignition struct {
	Version IgnitionVersion `json:"version,omitempty" yaml:"version" merge:"old"`
	Config  IgnitionConfig  `json:"config,omitempty"  yaml:"config"  merge:"new"`
}

type IgnitionConfig

type IgnitionConfig struct {
	Append  []ConfigReference `json:"append,omitempty"  yaml:"append"`
	Replace *ConfigReference  `json:"replace,omitempty" yaml:"replace"`
}

type IgnitionVersion

type IgnitionVersion semver.Version

func (IgnitionVersion) AssertValid

func (v IgnitionVersion) AssertValid() error

func (IgnitionVersion) MarshalJSON

func (v IgnitionVersion) MarshalJSON() ([]byte, error)

func (*IgnitionVersion) UnmarshalJSON

func (v *IgnitionVersion) UnmarshalJSON(data []byte) error

func (*IgnitionVersion) UnmarshalYAML

func (v *IgnitionVersion) UnmarshalYAML(unmarshal func(interface{}) error) error

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) MarshalJSON

func (p Path) MarshalJSON() ([]byte, error)

func (*Path) UnmarshalJSON

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

func (*Path) UnmarshalYAML

func (p *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"`
	Files       []File       `json:"files,omitempty"       yaml:"files"`
}

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 Url

type Url url.URL

func (Url) MarshalJSON

func (u Url) MarshalJSON() ([]byte, error)

func (Url) String

func (u Url) String() string

func (*Url) UnmarshalJSON

func (u *Url) UnmarshalJSON(data []byte) error

func (*Url) UnmarshalYAML

func (u *Url) 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"`
}

type Verification

type Verification struct {
	Hash *Hash `json:"hash,omitempty" yaml:"hash"`
}

Jump to

Keyboard shortcuts

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