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: 16 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Clevis

type Clevis struct {
	Custom    ClevisCustom `json:"custom,omitempty"`
	Tang      []Tang       `json:"tang,omitempty"`
	Threshold *int         `json:"threshold,omitempty"`
	Tpm2      *bool        `json:"tpm2,omitempty"`
}

func (Clevis) IsPresent

func (c Clevis) IsPresent() bool

type ClevisCustom

type ClevisCustom struct {
	Config       *string `json:"config,omitempty"`
	NeedsNetwork *bool   `json:"needsNetwork,omitempty"`
	Pin          *string `json:"pin,omitempty"`
}

func (ClevisCustom) Validate

func (cu ClevisCustom) Validate(c path.ContextPath) (r report.Report)

type Config

type Config struct {
	Ignition        Ignition        `json:"ignition"`
	KernelArguments KernelArguments `json:"kernelArguments,omitempty"`
	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 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 FileEmbedded1

type FileEmbedded1 struct {
	Append   []Resource `json:"append,omitempty"`
	Contents Resource   `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"`
	MountOptions   []MountOption      `json:"mountOptions,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 HTTPHeader

type HTTPHeader struct {
	Name  string  `json:"name"`
	Value *string `json:"value,omitempty"`
}

func (HTTPHeader) Key

func (h HTTPHeader) Key() string

func (HTTPHeader) Validate

func (h HTTPHeader) Validate(c path.ContextPath) (r report.Report)

type HTTPHeaders

type HTTPHeaders []HTTPHeader

func (HTTPHeaders) Parse

func (hs HTTPHeaders) Parse() (http.Header, error)

Parse generates standard net/http headers from the data in HTTPHeaders

type Ignition

type Ignition struct {
	Config   IgnitionConfig `json:"config,omitempty"`
	Proxy    Proxy          `json:"proxy,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   []Resource `json:"merge,omitempty"`
	Replace Resource   `json:"replace,omitempty"`
}

func (IgnitionConfig) Validate

func (ic IgnitionConfig) Validate(c path.ContextPath) (r report.Report)

type KernelArgument

type KernelArgument string

type KernelArguments

type KernelArguments struct {
	ShouldExist    []KernelArgument `json:"shouldExist,omitempty"`
	ShouldNotExist []KernelArgument `json:"shouldNotExist,omitempty"`
}

func (KernelArguments) MergedKeys

func (k KernelArguments) MergedKeys() map[string]string
type Link struct {
	Node
	LinkEmbedded1
}

type LinkEmbedded1

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

type Luks

type Luks struct {
	Clevis     Clevis       `json:"clevis,omitempty"`
	Device     *string      `json:"device,omitempty"`
	KeyFile    Resource     `json:"keyFile,omitempty"`
	Label      *string      `json:"label,omitempty"`
	Name       string       `json:"name"`
	Options    []LuksOption `json:"options,omitempty"`
	UUID       *string      `json:"uuid,omitempty"`
	WipeVolume *bool        `json:"wipeVolume,omitempty"`
}

func (Luks) IgnoreDuplicates

func (l Luks) IgnoreDuplicates() map[string]struct{}

func (Luks) Key

func (l Luks) Key() string

func (Luks) Validate

func (l Luks) Validate(c path.ContextPath) (r report.Report)

type LuksOption

type LuksOption string

type MountOption

type MountOption string

type NoProxyItem

type NoProxyItem string

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"`
	Resize             *bool   `json:"resize,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"`
	ShouldExist  *bool   `json:"shouldExist,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"`
	ShouldExist       *bool              `json:"shouldExist,omitempty"`
	System            *bool              `json:"system,omitempty"`
	UID               *int               `json:"uid,omitempty"`
}

func (PasswdUser) Key

func (p PasswdUser) Key() string

type Proxy

type Proxy struct {
	HTTPProxy  *string       `json:"httpProxy,omitempty"`
	HTTPSProxy *string       `json:"httpsProxy,omitempty"`
	NoProxy    []NoProxyItem `json:"noProxy,omitempty"`
}

func (Proxy) Validate

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

type Raid

type Raid struct {
	Devices []Device     `json:"devices,omitempty"`
	Level   *string      `json:"level,omitempty"`
	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 Resource

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

func (Resource) Key

func (res Resource) Key() string

func (Resource) Validate

func (res Resource) Validate(c path.ContextPath) (r report.Report)

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"`
	Luks        []Luks       `json:"luks,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 []Resource `json:"certificateAuthorities,omitempty"`
}

func (TLS) Validate

func (tls TLS) Validate(c path.ContextPath) (r report.Report)

type Tang

type Tang struct {
	Thumbprint *string `json:"thumbprint,omitempty"`
	URL        string  `json:"url,omitempty"`
}

func (Tang) Key

func (t Tang) Key() string

func (Tang) Validate

func (t Tang) Validate(c path.ContextPath) (r report.Report)

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