Documentation ¶
Index ¶
- Variables
- type Config
- type ConfigReference
- type Create
- type CreateOption
- type Device
- type Directory
- type DirectoryEmbedded1
- type Disk
- type Dropin
- type File
- type FileContents
- type FileEmbedded1
- type Filesystem
- type Ignition
- type IgnitionConfig
- type Link
- type LinkEmbedded1
- type Mount
- type MountOption
- type Networkd
- type Networkdunit
- type Node
- type NodeGroup
- type NodeUser
- type Partition
- type Passwd
- type PasswdGroup
- type PasswdUser
- type PasswdUserGroup
- type Raid
- type SSHAuthorizedKey
- type Storage
- type Systemd
- type Timeouts
- type Unit
- type Usercreate
- type UsercreateGroup
- type Verification
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") ErrExt4LabelTooLong = errors.New("filesystem labels cannot be longer than 16 characters when using ext4") ErrBtrfsLabelTooLong = errors.New("filesystem labels cannot be longer than 256 characters when using btrfs") ErrXfsLabelTooLong = errors.New("filesystem labels cannot be longer than 12 characters when using xfs") ErrSwapLabelTooLong = errors.New("filesystem labels cannot be longer than 15 characters when using swap") ErrVfatLabelTooLong = errors.New("filesystem labels cannot be longer than 11 characters when using vfat") )
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,
}
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type ConfigReference ¶
type ConfigReference struct { Source string `json:"source,omitempty"` Verification Verification `json:"verification,omitempty"` }
func (ConfigReference) ValidateSource ¶
func (c ConfigReference) ValidateSource() report.Report
type Create ¶
type Create struct { Force bool `json:"force,omitempty"` Options []CreateOption `json:"options,omitempty"` }
type CreateOption ¶
type CreateOption string
type DirectoryEmbedded1 ¶
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) ValidateDevice ¶
func (Disk) ValidatePartitions ¶
type Dropin ¶
type FileContents ¶
type FileContents struct { Compression string `json:"compression,omitempty"` Source string `json:"source,omitempty"` Verification Verification `json:"verification,omitempty"` }
func (FileContents) ValidateCompression ¶
func (fc FileContents) ValidateCompression() report.Report
func (FileContents) ValidateSource ¶
func (fc FileContents) ValidateSource() report.Report
type FileEmbedded1 ¶
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 ¶
func (f Filesystem) Validate() report.Report
func (Filesystem) ValidatePath ¶
func (f Filesystem) ValidatePath() report.Report
type Ignition ¶
type Ignition struct { Config IgnitionConfig `json:"config,omitempty"` Timeouts Timeouts `json:"timeouts,omitempty"` Version string `json:"version,omitempty"` }
type IgnitionConfig ¶
type IgnitionConfig struct { Append []ConfigReference `json:"append,omitempty"` Replace *ConfigReference `json:"replace,omitempty"` }
type Link ¶
type Link struct { Node LinkEmbedded1 }
type LinkEmbedded1 ¶
type Mount ¶
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) ValidateDevice ¶
func (Mount) ValidateLabel ¶
type MountOption ¶
type MountOption string
type Networkd ¶
type Networkd struct {
Units []Networkdunit `json:"units,omitempty"`
}
type Networkdunit ¶
type Networkdunit struct { Contents string `json:"contents,omitempty"` Name string `json:"name,omitempty"` }
func (Networkdunit) Validate ¶
func (u Networkdunit) Validate() report.Report
type Node ¶
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) ValidateFilesystem ¶
func (Node) ValidatePath ¶
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 ¶
func (Partition) ValidateLabel ¶
func (Partition) ValidateTypeGUID ¶
type Passwd ¶
type Passwd struct { Groups []PasswdGroup `json:"groups,omitempty"` Users []PasswdUser `json:"users,omitempty"` }
type PasswdGroup ¶
type PasswdUser ¶
type PasswdUser struct { Create *Usercreate `json:"create,omitempty"` Gecos string `json:"gecos,omitempty"` Groups []PasswdUserGroup `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 ¶
func (p PasswdUser) Validate() report.Report
type PasswdUserGroup ¶
type PasswdUserGroup string
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 ¶
func (Raid) ValidateLevel ¶
type SSHAuthorizedKey ¶
type SSHAuthorizedKey string
type Unit ¶
type Unit struct { Contents string `json:"contents,omitempty"` Dropins []Dropin `json:"dropins,omitempty"` Enable bool `json:"enable,omitempty"` Enabled *bool `json:"enabled,omitempty"` Mask bool `json:"mask,omitempty"` Name string `json:"name,omitempty"` }
func (Unit) ValidateContents ¶
func (Unit) ValidateName ¶
type Usercreate ¶
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 ¶
type UsercreateGroup string
type Verification ¶
type Verification struct {
Hash *string `json:"hash,omitempty"`
}
func (Verification) HashParts ¶
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 ¶
func (v Verification) Validate() report.Report
Click to show internal directories.
Click to hide internal directories.