Documentation
¶
Overview ¶
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Index ¶
- Constants
- func GenDefault(viper *v.Viper)
- type Bind
- type EnvVar
- type Hook
- type HookFile
- type HookType
- type Job
- type JobOutput
- type JobRendered
- func (j *JobRendered) GetBindsMap() map[string]string
- func (j *JobRendered) GetOptionsEnvsMap() map[string]string
- func (j *JobRendered) GetPostChrootHooks() *[]*Hook
- func (j *JobRendered) GetPreChrootHooks() *[]*Hook
- func (j *JobRendered) Json() ([]byte, error)
- func (j *JobRendered) Yaml() ([]byte, error)
- type JobSource
- type MarkDevkitConfig
- type MarkDevkitGeneral
- type MarkDevkitLogging
- type MetroSpec
Constants ¶
View Source
const ( MARKDEVKIT_CONFIGNAME = "mark-devkit" MARKDEVKIT_ENV_PREFIX = "MARKDEVKIT" MARKDEVKIT_VERSION = `0.2.1` )
View Source
const ( HookInnerChroot = "inner-chroot" HookOuterChroot = "outer-chroot" HookOuterPostChroot = "outer-post-chroot" HookOuterPreChroot = "outer-pre-chroot" )
Variables ¶
This section is empty.
Functions ¶
func GenDefault ¶
Types ¶
type Hook ¶
type Hook struct {
File string `yaml:"-" json:"-"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Type HookType `yaml:"type,omitempty" json:"type,omitempty"`
Commands []string `yaml:"commands,omitempty" json:"commands,omitempty"`
Entrypoint []string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
Binds []Bind `yaml:"chroot_binds,omitempty" json:"chroot_binds,omitempty"`
}
func (*Hook) GetCommands ¶
func (*Hook) GetDescription ¶
func (*Hook) GetEntrypoint ¶
type HookFile ¶
type HookFile struct {
File string `yaml:"-" json:"-"`
Hooks []Hook `yaml:"hooks,omitempty" json:"hooks,omitempty"`
}
func NewHookFileFromFile ¶
type Job ¶
type Job struct {
Name string `yaml:"name" json:"name"`
Source JobSource `yaml:"source,omitempty" json:"source,omitempty"`
Output JobOutput `yaml:"output,omitempty" json:"omitempty,omitempty"`
Options map[string]interface{} `yaml:"options,omitempty" json:"options,omitempty"`
Envs []*EnvVar `yaml:"environments,omitempty" json:"environments,omitempty"`
ChrootBinds []Bind `yaml:"chroot_binds,omitempty" json:"chroot_binds,omitempty"`
WorkspaceDir string `yaml:"workspacedir,omitempty" json:"workspacedir,omitempty"`
HooksBasedir string `yaml:"hooks_basedir,omitempty" json:"hooks_basedir,omitempty"`
Hooks []string `yaml:"hooks_files,omitempty" json:"hooks_files,omitempty"`
}
type JobOutput ¶
type JobOutput struct {
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Dir string `yaml:"dir,omitempty" json:"dir,omitempty"`
TarformersSpec *tarf_specs.SpecFile `yaml:"tarformers_specs,omitempty" json:"tarformers_specs,omitempty"`
}
type JobRendered ¶
type JobRendered struct {
*Job
HookFile []*HookFile `yaml:"hooks,omitempty" json:"hooks,omitempty"`
}
func (*JobRendered) GetBindsMap ¶
func (j *JobRendered) GetBindsMap() map[string]string
func (*JobRendered) GetOptionsEnvsMap ¶
func (j *JobRendered) GetOptionsEnvsMap() map[string]string
func (*JobRendered) GetPostChrootHooks ¶
func (j *JobRendered) GetPostChrootHooks() *[]*Hook
func (*JobRendered) GetPreChrootHooks ¶
func (j *JobRendered) GetPreChrootHooks() *[]*Hook
func (*JobRendered) Json ¶
func (j *JobRendered) Json() ([]byte, error)
func (*JobRendered) Yaml ¶
func (j *JobRendered) Yaml() ([]byte, error)
type JobSource ¶
type JobSource struct {
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Uri string `yaml:"uri,omitempty" json:"uri,omitempty"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
// Anisie specific options
AniseConfigPath string `yaml:"anise_config,omitempty" json:"anise_config,omitempty"`
AniseRepositories []string `yaml:"anise_repos,omitempty" json:"anise_repos,omitempty"`
AnisePackages []string `yaml:"anise_packages,omitempty" json:"anise_packages,omitempty"`
}
type MarkDevkitConfig ¶
type MarkDevkitConfig struct {
Viper *v.Viper `yaml:"-" json:"-"`
General MarkDevkitGeneral `mapstructure:"general" json:"general,omitempty" yaml:"general,omitempty"`
Logging MarkDevkitLogging `mapstructure:"logging" json:"logging,omitempty" yaml:"logging,omitempty"`
}
func NewMarkDevkitConfig ¶
func NewMarkDevkitConfig(viper *v.Viper) *MarkDevkitConfig
func (*MarkDevkitConfig) GetGeneral ¶
func (c *MarkDevkitConfig) GetGeneral() *MarkDevkitGeneral
func (*MarkDevkitConfig) GetLogging ¶
func (c *MarkDevkitConfig) GetLogging() *MarkDevkitLogging
func (*MarkDevkitConfig) Unmarshal ¶
func (c *MarkDevkitConfig) Unmarshal() error
func (*MarkDevkitConfig) Yaml ¶
func (c *MarkDevkitConfig) Yaml() ([]byte, error)
type MarkDevkitGeneral ¶
type MarkDevkitGeneral struct {
Debug bool `mapstructure:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"`
}
func (*MarkDevkitGeneral) HasDebug ¶
func (g *MarkDevkitGeneral) HasDebug() bool
type MarkDevkitLogging ¶
type MarkDevkitLogging 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"`
}
Click to show internal directories.
Click to hide internal directories.