types

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxVersion = semver.Version{
		Major: 3,
		Minor: 0,
	}
)

Functions

This section is empty.

Types

type CaReference

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

func (CaReference) Key

func (c CaReference) Key() string

func (CaReference) Validate

func (ca CaReference) Validate(c path.ContextPath) (r report.Report)

type Config

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

func (Config) Validate added in v2.15.0

func (cfg Config) Validate(c path.ContextPath) (r report.Report)

type ConfigReference

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

func (ConfigReference) Key

func (c ConfigReference) Key() string

func (ConfigReference) Validate

func (cr ConfigReference) Validate(c path.ContextPath) (r report.Report)

type Device

type Device string

func (Device) Validate

func (d Device) Validate(c path.ContextPath) (r report.Report)

type Directory

type Directory struct {
	Node
	DirectoryEmbedded1
}

func (Directory) Validate

func (d Directory) Validate(c path.ContextPath) (r report.Report)

type DirectoryEmbedded1

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

type Disk

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

func (Disk) Key

func (d Disk) Key() string

func (Disk) Validate

func (n Disk) Validate(c path.ContextPath) (r report.Report)

type Dropin

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

func (Dropin) Key

func (d Dropin) Key() string

func (Dropin) Validate

func (d Dropin) Validate(c cpath.ContextPath) (r report.Report)

type File

type File struct {
	Node
	FileEmbedded1
}

func (File) Validate

func (f File) Validate(c path.ContextPath) (r report.Report)

type FileContents

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

func (FileContents) Validate

func (fc FileContents) Validate(c path.ContextPath) (r report.Report)

type FileEmbedded1

type FileEmbedded1 struct {
	Append   []FileContents `json:"append,omitempty"`
	Contents FileContents   `json:"contents,omitempty"`
	Mode     *int           `json:"mode,omitempty"`
}

func (FileEmbedded1) IgnoreDuplicates

func (f FileEmbedded1) IgnoreDuplicates() map[string]struct{}

type Filesystem

type Filesystem struct {
	Device         string             `json:"device"`
	Format         *string            `json:"format,omitempty"`
	Label          *string            `json:"label,omitempty"`
	Options        []FilesystemOption `json:"options,omitempty"`
	Path           *string            `json:"path,omitempty"`
	UUID           *string            `json:"uuid,omitempty"`
	WipeFilesystem *bool              `json:"wipeFilesystem,omitempty"`
}

func (Filesystem) IgnoreDuplicates

func (f Filesystem) IgnoreDuplicates() map[string]struct{}

func (Filesystem) Key

func (f Filesystem) Key() string

func (Filesystem) Validate

func (f Filesystem) Validate(c path.ContextPath) (r report.Report)

type FilesystemOption

type FilesystemOption string

type Group

type Group string

type Ignition

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

func (Ignition) Semver

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

func (Ignition) Validate

func (v Ignition) Validate(c path.ContextPath) (r report.Report)

type IgnitionConfig

type IgnitionConfig struct {
	Merge   []ConfigReference `json:"merge,omitempty"`
	Replace ConfigReference   `json:"replace,omitempty"`
}
type Link struct {
	Node
	LinkEmbedded1
}

type LinkEmbedded1

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

type Node

type Node struct {
	Group     NodeGroup `json:"group,omitempty"`
	Overwrite *bool     `json:"overwrite,omitempty"`
	Path      string    `json:"path"`
	User      NodeUser  `json:"user,omitempty"`
}

func (Node) Depth

func (n Node) Depth() int

func (Node) Key

func (n Node) Key() string

func (Node) Validate

func (n Node) Validate(c vpath.ContextPath) (r report.Report)

type NodeGroup

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

func (NodeGroup) Validate

func (ng NodeGroup) Validate(c vpath.ContextPath) (r report.Report)

type NodeUser

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

func (NodeUser) Validate

func (nu NodeUser) Validate(c vpath.ContextPath) (r report.Report)

type Partition

type Partition struct {
	GUID               *string `json:"guid,omitempty"`
	Label              *string `json:"label,omitempty"`
	Number             int     `json:"number,omitempty"`
	ShouldExist        *bool   `json:"shouldExist,omitempty"`
	SizeMiB            *int    `json:"sizeMiB,omitempty"`
	StartMiB           *int    `json:"startMiB,omitempty"`
	TypeGUID           *string `json:"typeGuid,omitempty"`
	WipePartitionEntry *bool   `json:"wipePartitionEntry,omitempty"`
}

func (Partition) Key

func (p Partition) Key() string

func (Partition) Validate

func (p Partition) Validate(c path.ContextPath) (r report.Report)

type Passwd

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

type PasswdGroup

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

func (PasswdGroup) Key

func (g PasswdGroup) Key() string

type PasswdUser

type PasswdUser struct {
	Gecos             *string            `json:"gecos,omitempty"`
	Groups            []Group            `json:"groups,omitempty"`
	HomeDir           *string            `json:"homeDir,omitempty"`
	Name              string             `json:"name"`
	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) Key

func (p PasswdUser) Key() string

type Raid

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

func (Raid) IgnoreDuplicates

func (r Raid) IgnoreDuplicates() map[string]struct{}

func (Raid) Key

func (r Raid) Key() string

func (Raid) Validate

func (ra Raid) Validate(c path.ContextPath) (r report.Report)

type RaidOption

type RaidOption string

type SSHAuthorizedKey

type SSHAuthorizedKey string

type Security

type Security struct {
	TLS TLS `json:"tls,omitempty"`
}

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"`
}

func (Storage) MergedKeys

func (s Storage) MergedKeys() map[string]string

func (Storage) Validate

func (s Storage) Validate(c vpath.ContextPath) (r report.Report)

type Systemd

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

func (Systemd) Validate added in v2.15.0

func (s Systemd) Validate(c vpath.ContextPath) (r report.Report)

type TLS

type TLS struct {
	CertificateAuthorities []CaReference `json:"certificateAuthorities,omitempty"`
}

type Timeouts

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

type Unit

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

func (Unit) Key

func (u Unit) Key() string

func (Unit) Validate

func (u Unit) Validate(c cpath.ContextPath) (r report.Report)

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(c path.ContextPath) (r report.Report)

Jump to

Keyboard shortcuts

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