specs

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

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

View Source
const (
	MACARONICTL_CONFIGNAME = "macaronios"
	MACARONICTL_ENV_PREFIX = "MACARONICTL"
)

Variables

This section is empty.

Functions

func GenDefault

func GenDefault(viper *v.Viper)

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 (s *Stone) GetLabelValue(label string) string

func (*Stone) GetName added in v0.8.0

func (s *Stone) GetName() string

func (*Stone) GetVersion added in v0.9.0

func (s *Stone) GetVersion() string

func (*Stone) HumanReadableString added in v0.8.0

func (s *Stone) HumanReadableString() string

type StonesMap added in v0.9.0

type StonesMap struct {
	Stones map[string][]*Stone `json:"stones" yaml:"stones"`
}

func (*StonesMap) Add added in v0.9.0

func (sm *StonesMap) Add(s *Stone)

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

Jump to

Keyboard shortcuts

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