specs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright © 2021 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 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"`
}

Jump to

Keyboard shortcuts

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