coreosutils

package
v0.0.0-...-6410feb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SCloudConfig

type SCloudConfig struct {
	Hostname       string                 `yaml:"hostname,omitempty"`
	Users          []SUser                `yaml:"users,omitempty"`
	Coreos         map[string]interface{} `yaml:"coreos,omitempty"`
	WriteFiles     []SWriteFile           `yaml:"write_files,omitempty"`
	ManageEtcHosts string                 `yaml:"manage_etc_hosts,omitempty"`
}

func NewCloudConfig

func NewCloudConfig() *SCloudConfig

func (*SCloudConfig) AddConfig

func (c *SCloudConfig) AddConfig(name, cfg string)

func (*SCloudConfig) AddPartition

func (c *SCloudConfig) AddPartition(dev, mtpath, fs string)

func (*SCloudConfig) AddSwap

func (c *SCloudConfig) AddSwap(dev string)

func (*SCloudConfig) AddUnits

func (c *SCloudConfig) AddUnits(name string, mask, enable, runtime *bool, content, command string, dropins *SUnitDropins)

func (*SCloudConfig) AddUser

func (c *SCloudConfig) AddUser(name, passwd string, pubkeys []string, nohash bool)

func (*SCloudConfig) AddWriteFile

func (c *SCloudConfig) AddWriteFile(spath, content, prem, owner string, base64 bool)

func (*SCloudConfig) HasUser

func (c *SCloudConfig) HasUser(name string) bool

func (*SCloudConfig) HasWriteFile

func (c *SCloudConfig) HasWriteFile(spath string) bool

func (*SCloudConfig) SetEtcHosts

func (c *SCloudConfig) SetEtcHosts(line string)

func (*SCloudConfig) SetHostname

func (c *SCloudConfig) SetHostname(hn string)

func (*SCloudConfig) SetTimezone

func (c *SCloudConfig) SetTimezone(tz string)

func (*SCloudConfig) String

func (c *SCloudConfig) String() string

func (*SCloudConfig) YunionInit

func (c *SCloudConfig) YunionInit()

type SUnitDropins

type SUnitDropins struct {
	Name    string `yaml:"name,omitempty"`
	Content string `yaml:"content,omitempty"`
}

type SUnits

type SUnits struct {
	Name    string `yaml:"name,omitempty"`
	Mask    *bool  `yaml:"mask,omitempty"`
	Enable  *bool  `yaml:"enable,omitempty"`
	Runtime *bool  `yaml:"runtime,omitempty"`
	Command string `yaml:"command,omitempty"`
	Content string `yaml:"content,omitempty"`
	// contains filtered or unexported fields
}

type SUser

type SUser struct {
	Name              string   `yaml:"name,omitempty"`
	Passwd            string   `yaml:"passwd,omitempty"`
	SshAuthorizedKeys []string `yaml:"ssh_authorized_keys,omitempty"`
}

func NewUser

func NewUser(name, passwd string, pubkeys []string, nohash bool) SUser

type SWriteFile

type SWriteFile struct {
	Path        string `yaml:"path,omitempty"`
	Content     string `yaml:"content,omitempty"`
	Permissions string `yaml:"permissions,omitempty"`
	Owner       string `yaml:"owner,omitempty"`
	Encoding    string `yaml:"encoding,omitempty"`
}

func NewWriteFile

func NewWriteFile(spath, content, perm, owner string, isbase64 bool) SWriteFile

Jump to

Keyboard shortcuts

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