Documentation
¶
Overview ¶
Copyright © 2021 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2021-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Index ¶
- Constants
- func GenDefault(viper *v.Viper)
- type KernelAnnotation
- type MacaroniCtlConfig
- func (c *MacaroniCtlConfig) GetEnvUpdate() *MacaroniCtlEnvUpdate
- func (c *MacaroniCtlConfig) GetGeneral() *MacaroniCtlGeneral
- func (c *MacaroniCtlConfig) GetKernelProfilesDir() string
- func (c *MacaroniCtlConfig) GetLogging() *MacaroniCtlLogging
- func (c *MacaroniCtlConfig) Unmarshal() error
- func (c *MacaroniCtlConfig) Yaml() ([]byte, error)
- type MacaroniCtlEnvUpdate
- type MacaroniCtlGeneral
- type MacaroniCtlLogging
- type Stone
- type StonesMap
- type StonesPack
Constants ¶
View Source
const ( MACARONICTL_CONFIGNAME = "macaronios" MACARONICTL_ENV_PREFIX = "MACARONICTL" )
Variables ¶
This section is empty.
Functions ¶
func GenDefault ¶
Types ¶
type KernelAnnotation ¶ added in v0.7.0
type KernelAnnotation struct {
EoL string `json:"eol,omitempty" yaml:"eol,omitempty"`
Lts bool `json:"lts" yaml:"lts"`
Released string `json:"released,omitempty" yaml:"released,omitempty"`
Suffix string `json:"suffix,omitempty" yaml:"suffix,omitempty"`
Type string `json:"vanilla,omitempty" yaml:"vanilla,omitempty"`
}
type MacaroniCtlConfig ¶
type MacaroniCtlConfig struct {
Viper *v.Viper `yaml:"-" json:"-"`
General MacaroniCtlGeneral `mapstructure:"general" json:"general,omitempty" yaml:"general,omitempty"`
Logging MacaroniCtlLogging `mapstructure:"logging" json:"logging,omitempty" yaml:"logging,omitempty"`
EnvUpdate MacaroniCtlEnvUpdate `mapstructure:"env-update,omitempty" json:"env-update,omitempty" yaml:"env-update,omitempty"`
KernelProfilesDir string `mapstructure:"kernel-profiles-dir,omitempty" json:"kernel-profiles-dir,omitempty" yaml:"kernel-profiles-dir,omitempty"`
}
func NewMacaroniCtlConfig ¶
func NewMacaroniCtlConfig(viper *v.Viper) *MacaroniCtlConfig
func (*MacaroniCtlConfig) GetEnvUpdate ¶
func (c *MacaroniCtlConfig) GetEnvUpdate() *MacaroniCtlEnvUpdate
func (*MacaroniCtlConfig) GetGeneral ¶
func (c *MacaroniCtlConfig) GetGeneral() *MacaroniCtlGeneral
func (*MacaroniCtlConfig) GetKernelProfilesDir ¶
func (c *MacaroniCtlConfig) GetKernelProfilesDir() string
func (*MacaroniCtlConfig) GetLogging ¶
func (c *MacaroniCtlConfig) GetLogging() *MacaroniCtlLogging
func (*MacaroniCtlConfig) Unmarshal ¶
func (c *MacaroniCtlConfig) Unmarshal() error
func (*MacaroniCtlConfig) Yaml ¶
func (c *MacaroniCtlConfig) Yaml() ([]byte, error)
type MacaroniCtlEnvUpdate ¶
type MacaroniCtlEnvUpdate struct {
Ldconfig bool `mapstructure:"ldconfig,omitempty" json:"ldconfig,omitempty" yaml:"ldconfig,omitempty"`
Csh bool `mapstructure:"csh,omitempty" json:"csh,omitempty" yaml:"csh,omitempty"`
Prelink bool `mapstructure:"prelink,omitempty" json:"prelink,omitempty" yaml:"prelink,omitempty"`
Systemd bool `mapstructure:"systemd,omitempty" json:"systemd,omitempty" yaml:"systemd,omitempty"`
}
type MacaroniCtlGeneral ¶
type MacaroniCtlGeneral struct {
Debug bool `mapstructure:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"`
}
func (*MacaroniCtlGeneral) HasDebug ¶
func (g *MacaroniCtlGeneral) HasDebug() bool
type MacaroniCtlLogging ¶
type MacaroniCtlLogging struct {
// Path of the logfile
Path string `mapstructure:"path,omitempty" json:"path,omitempty" yaml:"path,omitempty"`
// Enable/Disable logging to file
EnableLogFile bool `mapstructure:"enable_logfile,omitempty" json:"enable_logfile,omitempty" yaml:"enable_logfile,omitempty"`
// Enable JSON format logging in file
JsonFormat bool `mapstructure:"json_format,omitempty" json:"json_format,omitempty" yaml:"json_format,omitempty"`
// Log level
Level string `mapstructure:"level,omitempty" json:"level,omitempty" yaml:"level,omitempty"`
// Enable emoji
EnableEmoji bool `mapstructure:"enable_emoji,omitempty" json:"enable_emoji,omitempty" yaml:"enable_emoji,omitempty"`
// Enable/Disable color in logging
Color bool `mapstructure:"color,omitempty" json:"color,omitempty" yaml:"color,omitempty"`
}
type Stone ¶ added in v0.7.0
type Stone struct {
Name string `json:"name" yaml:"name"`
Category string `json:"category" yaml:"category"`
Version string `json:"version" yaml:"version"`
License string `json:"license,omitempty" yaml:"license,omitempty"`
Repository string `json:"repository,omitempty" yaml:"repository"`
Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`
Files []string `json:"files,omitempty" yaml:"files,omitempty"`
Annotations map[string]interface{} `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
UseFlags []string `json:"use_flags,omitempty" yaml:"use_flags,omitempty"`
Provides []*Stone `json:"provides,omitempty" yaml:"provides,omitempty"`
Requires []*Stone `json:"requires,omitempty" yaml:"requires,omitempty"`
Conflicts []*Stone `json:"conflicts,omitempty" yaml:"conflicts,omitempty"`
}
func (*Stone) GetLabelValue ¶ added in v0.10.0
func (*Stone) GetVersion ¶ added in v0.9.0
func (*Stone) HumanReadableString ¶ added in v0.8.0
type StonesPack ¶ added in v0.7.0
type StonesPack struct {
Stones []*Stone `json:"stones" yaml:"stones"`
}
func (*StonesPack) ToMap ¶ added in v0.9.0
func (sp *StonesPack) ToMap() *StonesMap
Click to show internal directories.
Click to hide internal directories.