types

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: Apache-2.0 Imports: 14 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")
	ErrUsedCreateAndMountOpts      = errors.New("cannot use both create object and mount-level options field")
	ErrUsedCreateAndWipeFilesystem = errors.New("cannot use both create object and wipeFilesystem field")
	ErrWarningCreateDeprecated     = errors.New("the create object has been deprecated in favor of mount-level options")
)
View Source
var (
	ErrOldVersion     = errors.New("incorrect config version (too old)")
	ErrNewVersion     = errors.New("incorrect config version (too new)")
	ErrInvalidVersion = errors.New("invalid config version (couldn't parse)")
)
View Source
var (
	ErrNoFilesystem     = errors.New("no filesystem specified")
	ErrBothIDAndNameSet = errors.New("cannot set both id and name")
)
View Source
var (
	ErrLabelTooLong         = errors.New("partition labels may not exceed 36 characters")
	ErrDoesntMatchGUIDRegex = errors.New("doesn't match the form \"01234567-89AB-CDEF-EDCB-A98765432101\"")
)
View Source
var (
	ErrPasswdCreateDeprecated      = errors.New("the create object has been deprecated in favor of user-level options")
	ErrPasswdCreateAndGecos        = errors.New("cannot use both the create object and the user-level gecos field")
	ErrPasswdCreateAndGroups       = errors.New("cannot use both the create object and the user-level groups field")
	ErrPasswdCreateAndHomeDir      = errors.New("cannot use both the create object and the user-level homeDir field")
	ErrPasswdCreateAndNoCreateHome = errors.New("cannot use both the create object and the user-level noCreateHome field")
	ErrPasswdCreateAndNoLogInit    = errors.New("cannot use both the create object and the user-level noLogInit field")
	ErrPasswdCreateAndNoUserGroup  = errors.New("cannot use both the create object and the user-level noUserGroup field")
	ErrPasswdCreateAndPrimaryGroup = errors.New("cannot use both the create object and the user-level primaryGroup field")
	ErrPasswdCreateAndShell        = errors.New("cannot use both the create object and the user-level shell field")
	ErrPasswdCreateAndSystem       = errors.New("cannot use both the create object and the user-level system field")
	ErrPasswdCreateAndUID          = errors.New("cannot use both the create object and the user-level uid field")
)
View Source
var (
	ErrInvalidSystemdExt  = errors.New("invalid systemd unit extension")
	ErrInvalidNetworkdExt = errors.New("invalid networkd unit extension")
)
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 (
	ErrCompressionInvalid = errors.New("invalid compression method")
)
View Source
var (
	ErrFileIllegalMode = errors.New("illegal file mode")
)
View Source
var (
	ErrInvalidScheme = errors.New("invalid url scheme")
)
View Source
var (
	ErrPathRelative = errors.New("path not absolute")
)
View Source
var (
	MaxVersion = semver.Version{
		Major:      2,
		Minor:      1,
		PreRelease: "experimental",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Ignition Ignition `json:"ignition"`
	Networkd Networkd `json:"networkd,omitempty"`
	Passwd   Passwd   `json:"passwd,omitempty"`
	Storage  Storage  `json:"storage,omitempty"`
	Systemd  Systemd  `json:"systemd,omitempty"`
}

func (Config) Validate added in v0.9.0

func (c Config) Validate() report.Report

type ConfigReference

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

func (ConfigReference) ValidateSource added in v0.15.0

func (c ConfigReference) ValidateSource() report.Report

type Create added in v0.15.0

type Create struct {
	Force   bool           `json:"force,omitempty"`
	Options []CreateOption `json:"options,omitempty"`
}

type CreateOption added in v0.15.0

type CreateOption string

type Device added in v0.15.0

type Device string

type Directory added in v0.13.0

type Directory struct {
	Node
	DirectoryEmbedded1
}

func (Directory) ValidateMode added in v0.15.0

func (d Directory) ValidateMode() report.Report

type DirectoryEmbedded1 added in v0.15.0

type DirectoryEmbedded1 struct {
	Mode int `json:"mode,omitempty"`
}

type Disk

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

func (Disk) Validate added in v0.9.0

func (n Disk) Validate() report.Report

func (Disk) ValidateDevice added in v0.15.0

func (n Disk) ValidateDevice() report.Report

func (Disk) ValidatePartitions added in v0.15.0

func (n Disk) ValidatePartitions() report.Report

type Dropin added in v0.15.0

type Dropin struct {
	Contents string `json:"contents,omitempty"`
	Name     string `json:"name,omitempty"`
}

func (Dropin) Validate added in v0.15.0

func (d Dropin) Validate() report.Report

type File

type File struct {
	Node
	FileEmbedded1
}

func (File) ValidateMode added in v0.15.0

func (f File) ValidateMode() report.Report

type FileContents

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

func (FileContents) ValidateCompression added in v0.15.0

func (fc FileContents) ValidateCompression() report.Report

func (FileContents) ValidateSource added in v0.15.0

func (fc FileContents) ValidateSource() report.Report

type FileEmbedded1 added in v0.15.0

type FileEmbedded1 struct {
	Contents FileContents `json:"contents,omitempty"`
	Mode     int          `json:"mode,omitempty"`
}

type Filesystem

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

func (Filesystem) Validate added in v0.9.0

func (f Filesystem) Validate() report.Report

func (Filesystem) ValidatePath added in v0.15.0

func (f Filesystem) ValidatePath() report.Report

type Group

type Group string

type Ignition

type Ignition struct {
	Config   IgnitionConfig `json:"config,omitempty"`
	Timeouts Timeouts       `json:"timeouts,omitempty"`
	Version  string         `json:"version,omitempty"`
}

func (Ignition) Semver added in v0.15.0

func (v Ignition) Semver() (*semver.Version, error)

func (Ignition) Validate added in v0.15.0

func (v Ignition) Validate() report.Report

type IgnitionConfig

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

func (Link) Validate added in v0.15.0

func (s Link) Validate() report.Report

type LinkEmbedded1 added in v0.15.0

type LinkEmbedded1 struct {
	Hard   bool   `json:"hard,omitempty"`
	Target string `json:"target,omitempty"`
}

type Mount added in v0.15.0

type Mount struct {
	Create         *Create       `json:"create,omitempty"`
	Device         string        `json:"device,omitempty"`
	Format         string        `json:"format,omitempty"`
	Label          *string       `json:"label,omitempty"`
	Options        []MountOption `json:"options,omitempty"`
	UUID           *string       `json:"uuid,omitempty"`
	WipeFilesystem bool          `json:"wipeFilesystem,omitempty"`
}

func (Mount) Validate added in v0.15.0

func (m Mount) Validate() report.Report

func (Mount) ValidateDevice added in v0.15.0

func (m Mount) ValidateDevice() report.Report

type MountOption added in v0.15.0

type MountOption string

type Networkd

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

type Networkdunit added in v0.15.0

type Networkdunit struct {
	Contents string `json:"contents,omitempty"`
	Name     string `json:"name,omitempty"`
}

func (Networkdunit) Validate added in v0.15.0

func (u Networkdunit) Validate() report.Report

type Node added in v0.13.0

type Node struct {
	Filesystem string    `json:"filesystem,omitempty"`
	Group      NodeGroup `json:"group,omitempty"`
	Path       string    `json:"path,omitempty"`
	User       NodeUser  `json:"user,omitempty"`
}

func (Node) Depth added in v0.15.0

func (n Node) Depth() int

func (Node) ValidateFilesystem added in v0.15.0

func (n Node) ValidateFilesystem() report.Report

func (Node) ValidatePath added in v0.15.0

func (n Node) ValidatePath() report.Report

type NodeGroup added in v0.13.0

type NodeGroup struct {
	ID   *int   `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

func (NodeGroup) Validate added in v0.15.0

func (ng NodeGroup) Validate() report.Report

type NodeUser added in v0.13.0

type NodeUser struct {
	ID   *int   `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

func (NodeUser) Validate added in v0.15.0

func (nu NodeUser) Validate() report.Report

type Partition

type Partition struct {
	GUID     string `json:"guid,omitempty"`
	Label    string `json:"label,omitempty"`
	Number   int    `json:"number,omitempty"`
	Size     int    `json:"size,omitempty"`
	Start    int    `json:"start,omitempty"`
	TypeGUID string `json:"typeGuid,omitempty"`
}

func (Partition) ValidateGUID added in v0.15.0

func (p Partition) ValidateGUID() report.Report

func (Partition) ValidateLabel added in v0.15.0

func (p Partition) ValidateLabel() report.Report

func (Partition) ValidateTypeGUID added in v0.15.0

func (p Partition) ValidateTypeGUID() report.Report

type Passwd

type Passwd struct {
	Groups []PasswdGroup `json:"groups,omitempty"`
	Users  []PasswdUser  `json:"users,omitempty"`
}

type PasswdGroup added in v0.15.0

type PasswdGroup struct {
	Gid          *int   `json:"gid,omitempty"`
	Name         string `json:"name,omitempty"`
	PasswordHash string `json:"passwordHash,omitempty"`
	System       bool   `json:"system,omitempty"`
}

type PasswdUser added in v0.15.0

type PasswdUser struct {
	Create            *Usercreate        `json:"create,omitempty"`
	Gecos             string             `json:"gecos,omitempty"`
	Groups            []Group            `json:"groups,omitempty"`
	HomeDir           string             `json:"homeDir,omitempty"`
	Name              string             `json:"name,omitempty"`
	NoCreateHome      bool               `json:"noCreateHome,omitempty"`
	NoLogInit         bool               `json:"noLogInit,omitempty"`
	NoUserGroup       bool               `json:"noUserGroup,omitempty"`
	PasswordHash      *string            `json:"passwordHash,omitempty"`
	PrimaryGroup      string             `json:"primaryGroup,omitempty"`
	SSHAuthorizedKeys []SSHAuthorizedKey `json:"sshAuthorizedKeys,omitempty"`
	Shell             string             `json:"shell,omitempty"`
	System            bool               `json:"system,omitempty"`
	UID               *int               `json:"uid,omitempty"`
}

func (PasswdUser) Validate added in v0.15.0

func (p PasswdUser) Validate() report.Report

type Raid

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

func (Raid) ValidateDevices added in v0.15.0

func (n Raid) ValidateDevices() report.Report

func (Raid) ValidateLevel added in v0.15.0

func (n Raid) ValidateLevel() report.Report

type SSHAuthorizedKey added in v0.15.0

type SSHAuthorizedKey string

type Storage

type Storage struct {
	Directories []Directory  `json:"directories,omitempty"`
	Disks       []Disk       `json:"disks,omitempty"`
	Files       []File       `json:"files,omitempty"`
	Filesystems []Filesystem `json:"filesystems,omitempty"`
	Links       []Link       `json:"links,omitempty"`
	Raid        []Raid       `json:"raid,omitempty"`
}

type Systemd

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

type Timeouts added in v0.13.0

type Timeouts struct {
	HTTPResponseHeaders *int `json:"httpResponseHeaders,omitempty"`
	HTTPTotal           *int `json:"httpTotal,omitempty"`
}

type Unit added in v0.15.0

type Unit struct {
	Contents string   `json:"contents,omitempty"`
	Dropins  []Dropin `json:"dropins,omitempty"`
	Enable   bool     `json:"enable,omitempty"`
	Mask     bool     `json:"mask,omitempty"`
	Name     string   `json:"name,omitempty"`
}

func (Unit) ValidateContents added in v0.15.0

func (u Unit) ValidateContents() report.Report

func (Unit) ValidateName added in v0.15.0

func (u Unit) ValidateName() report.Report

type Usercreate added in v0.15.0

type Usercreate struct {
	Gecos        string            `json:"gecos,omitempty"`
	Groups       []UsercreateGroup `json:"groups,omitempty"`
	HomeDir      string            `json:"homeDir,omitempty"`
	NoCreateHome bool              `json:"noCreateHome,omitempty"`
	NoLogInit    bool              `json:"noLogInit,omitempty"`
	NoUserGroup  bool              `json:"noUserGroup,omitempty"`
	PrimaryGroup string            `json:"primaryGroup,omitempty"`
	Shell        string            `json:"shell,omitempty"`
	System       bool              `json:"system,omitempty"`
	UID          *int              `json:"uid,omitempty"`
}

type UsercreateGroup added in v0.15.0

type UsercreateGroup string

type Verification

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

func (Verification) HashParts added in v0.15.0

func (v Verification) HashParts() (string, string, error)

HashParts will return the sum and function (in that order) of the hash stored in this Verification, or an error if there is an issue during parsing.

func (Verification) Validate added in v0.15.0

func (v Verification) Validate() report.Report

Jump to

Keyboard shortcuts

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