Documentation ¶
Overview ¶
Copyright (C) 2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
const ( TARFORMERS_CONFIGNAME = "tar-formers.yml" TARFORMERS_ENV_PREFIX = "TARFORMERS" )
Variables ¶
This section is empty.
Functions ¶
func GenDefault ¶
Types ¶
type CGeneral ¶
type CGeneral struct {
Debug bool `mapstructure:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"`
}
type CLogging ¶
type CLogging 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 Config ¶
type Config struct { Viper *v.Viper `yaml:"-" json:"-"` General CGeneral `mapstructure:"general" json:"general,omitempty" yaml:"general,omitempty"` Logging CLogging `mapstructure:"logging" json:"logging,omitempty" yaml:"logging,omitempty"` }
func (*Config) GetGeneral ¶
func (*Config) GetLogging ¶
type RenameRule ¶
type SpecFile ¶
type SpecFile struct { File string `yaml:"-" json:"-"` // Define the list of prefixes of the path to MatchPrefix []string `yaml:"match_prefix,omitempty" json:"match_prefix,omitempty"` IgnoreFiles []string `yaml:"ignore_files,omitempty" json:"ignore_files,omitempty"` Rename []RenameRule `yaml:"rename,omitempty" json:"rename,omitempty"` RemapUids map[string]string `yaml:"remap_uids,omitempty" json:"remap_uids,omitempty"` RemapGids map[string]string `yaml:"remap_gids,omitempty" json:"remap_gids,omitempty"` RemapUsers map[string]string `yaml:"remap_users,omitempty" json:"remap_users,omitempty"` RemapGroups map[string]string `yaml:"remap_groups,omitempty" json:"remap_groups,omitempty"` SameOwner bool `yaml:"same_owner,omitempty" json:"same_owner,omitempty"` SameChtimes bool `yaml:"same_chtimes,omitempty" json:"same_chtimes,omitempty"` MapEntities bool `yaml:"map_entities,omitempty" json:"map_entities,omitempty"` }
func NewSpecFile ¶
func NewSpecFile() *SpecFile