cfg

package
v0.0.0-...-6ae7817 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigContent

func GetDefaultConfigContent() string

func New

func New(
	ci *common.ConfigInfo,
	sourceID string,
	applicationName string,
	vfs storage.VirtualFS,
) (common.ConfigRunner, error)

Types

type MsAdvancedConfig

type MsAdvancedConfig struct {
	Abort         bool               `mapstructure:"abort-on-error"`
	LabelsCFG     MsLabelsConfig     `mapstructure:"labels"`
	ExtensionsCFG MsExtensionsConfig `mapstructure:"extensions"`
	ExecutableCFG MsExecutableConfig `mapstructure:"executable"`
}

func (*MsAdvancedConfig) AbortOnError

func (c *MsAdvancedConfig) AbortOnError() bool

func (*MsAdvancedConfig) AdhocLabel

func (c *MsAdvancedConfig) AdhocLabel() string

func (*MsAdvancedConfig) Executable

func (c *MsAdvancedConfig) Executable() common.ExecutableConfig

func (*MsAdvancedConfig) Extensions

func (c *MsAdvancedConfig) Extensions() common.ExtensionsConfig

func (*MsAdvancedConfig) FakeLabel

func (c *MsAdvancedConfig) FakeLabel() string

func (*MsAdvancedConfig) JournalLabel

func (c *MsAdvancedConfig) JournalLabel() string

func (*MsAdvancedConfig) LegacyLabel

func (c *MsAdvancedConfig) LegacyLabel() string

func (*MsAdvancedConfig) SampleLabel

func (c *MsAdvancedConfig) SampleLabel() string

func (*MsAdvancedConfig) SupplementLabel

func (c *MsAdvancedConfig) SupplementLabel() string

func (*MsAdvancedConfig) TrashLabel

func (c *MsAdvancedConfig) TrashLabel() string

type MsExecutableConfig

type MsExecutableConfig struct {
	ProgramName      string `mapstructure:"program-name"`
	Timeout          string `mapstructure:"timeout"`
	NoProgramRetries uint   `mapstructure:"no-retries"`
}

func (*MsExecutableConfig) NoRetries

func (c *MsExecutableConfig) NoRetries() uint

func (*MsExecutableConfig) ProgramTimeout

func (c *MsExecutableConfig) ProgramTimeout() (duration time.Duration, err error)

func (*MsExecutableConfig) Symbol

func (c *MsExecutableConfig) Symbol() string

type MsExtensionsConfig

type MsExtensionsConfig struct {
	FileSuffixes  string            `mapstructure:"suffixes-csv"`
	TransformsCSV string            `mapstructure:"transforms-csv"`
	Remap         map[string]string `mapstructure:"map"`
}

func (*MsExtensionsConfig) Map

func (c *MsExtensionsConfig) Map() map[string]string

func (*MsExtensionsConfig) Suffixes

func (c *MsExtensionsConfig) Suffixes() string

func (*MsExtensionsConfig) Transforms

func (c *MsExtensionsConfig) Transforms() string

type MsInteractionConfig

type MsInteractionConfig struct {
	Tui MsTuiConfig `mapstructure:"tui"`
}

func (*MsInteractionConfig) TuiConfig

func (c *MsInteractionConfig) TuiConfig() common.TuiConfig

type MsLabelsConfig

type MsLabelsConfig struct {
	Adhoc      string `mapstructure:"adhoc"`
	Journal    string `mapstructure:"journal-suffix"`
	Legacy     string `mapstructure:"legacy"`
	Trash      string `mapstructure:"trash"`
	Fake       string `mapstructure:"fake"`
	Supplement string `mapstructure:"supplement"`
	Sample     string `mapstructure:"sample"`
}

type MsLoggingConfig

type MsLoggingConfig struct {
	LogPath    string `mapstructure:"log-path"`
	MaxSize    uint   `mapstructure:"max-size-in-mb"`
	MaxBackups uint   `mapstructure:"max-backups"`
	MaxAge     uint   `mapstructure:"max-age-in-days"`
	LogLevel   string `mapstructure:"level"`
	Format     string `mapstructure:"time-format"`
}

func (*MsLoggingConfig) Level

func (c *MsLoggingConfig) Level() string

func (*MsLoggingConfig) MaxAgeInDays

func (c *MsLoggingConfig) MaxAgeInDays() uint

func (*MsLoggingConfig) MaxNoOfBackups

func (c *MsLoggingConfig) MaxNoOfBackups() uint

func (*MsLoggingConfig) MaxSizeInMb

func (c *MsLoggingConfig) MaxSizeInMb() uint

func (*MsLoggingConfig) Path

func (c *MsLoggingConfig) Path() string

func (*MsLoggingConfig) TimeFormat

func (c *MsLoggingConfig) TimeFormat() string

type MsMasterConfig

type MsMasterConfig struct {
	Profiles    ProfilesConfigMap   `mapstructure:"profiles"`
	Schemes     SchemesConfigMap    `mapstructure:"schemes"`
	Sampler     MsSamplerConfig     `mapstructure:"sampler"`
	Interaction MsInteractionConfig `mapstructure:"interaction"`
	Advanced    MsAdvancedConfig    `mapstructure:"advanced"`
	Logging     MsLoggingConfig     `mapstructure:"logging"`
}

func (*MsMasterConfig) Read

type MsProfilesConfig

type MsProfilesConfig struct {
	Profiles ProfilesConfigMap
}

func (MsProfilesConfig) Profile

func (c MsProfilesConfig) Profile(name string) (clif.ChangedFlagsMap, bool)

type MsSamplerConfig

type MsSamplerConfig struct {
	Files   uint `mapstructure:"files"`
	Folders uint `mapstructure:"folders"`
}

func (*MsSamplerConfig) NoFiles

func (c *MsSamplerConfig) NoFiles() uint

func (*MsSamplerConfig) NoFolders

func (c *MsSamplerConfig) NoFolders() uint

type MsSchemeConfig

type MsSchemeConfig struct {
	ProfilesData []string `mapstructure:"profiles"`
}

func (*MsSchemeConfig) Profiles

func (c *MsSchemeConfig) Profiles() []string

type MsSchemesConfig

type MsSchemesConfig map[string]common.SchemeConfig

func (MsSchemesConfig) Scheme

func (c MsSchemesConfig) Scheme(name string) (common.SchemeConfig, bool)

func (MsSchemesConfig) Validate

func (c MsSchemesConfig) Validate(name string, profiles common.ProfilesConfig) error

type MsTuiConfig

type MsTuiConfig struct {
	Delay string `mapstructure:"per-item-delay"`
}

func (*MsTuiConfig) PerItemDelay

func (c *MsTuiConfig) PerItemDelay() time.Duration

type ProfilesConfigMap

type ProfilesConfigMap map[string]clif.ChangedFlagsMap

type ProfilesFlagOptionAsAnyPair

type ProfilesFlagOptionAsAnyPair = map[string]any

type SchemesConfigMap

type SchemesConfigMap map[string][]string

Jump to

Keyboard shortcuts

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