Documentation ¶
Overview ¶
Copyright (C) 2017-2019 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) 2017-2019 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 ¶
- type SarkBuild
- type SarkBuildEmerge
- type SarkBuildEquo
- type SarkBuildEquoDepsInstall
- type SarkBuildEquoPackage
- type SarkBuildScript
- type SarkConfig
- func NewSarkConfig(viper *v.Viper, filterType string) (*SarkConfig, error)
- func NewSarkConfigFromBytes(viper *v.Viper, data []byte) (*SarkConfig, error)
- func NewSarkConfigFromFile(viper *v.Viper, file string) (*SarkConfig, error)
- func NewSarkConfigFromResource(viper *v.Viper, resource, apiKey string, opts commons.HttpClientOpts) (*SarkConfig, error)
- func NewSarkConfigFromString(viper *v.Viper, config string) (*SarkConfig, error)
- type SarkFilterRuleConf
- type SarkInjectConfig
- type SarkInjectFilterConfig
- type SarkRepository
- type SarkRepositoryMaintenance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SarkBuild ¶
type SarkBuild struct { Script SarkBuildScript `mapstructure:"script" yaml:"script,omitempty"` Verbose int `mapstructure:"verbose" yaml:"verbose,omitempty"` QA_Checks int `mapstructure:"qa_checks" yaml:"qa_checks,omitempty"` Overlays []string `mapstructure:"overlays" yaml:"overlays,omitempty"` TargetPkgs []string `mapstructure:"target" yaml:"target,omitempty"` Equo SarkBuildEquo `mapstructure:"equo" yaml:"equo,omitempty"` Emerge SarkBuildEmerge `mapstructure:"emerge" yaml:"emerge,omitempty"` }
type SarkBuildEmerge ¶
type SarkBuildEmerge struct { DefaultArgs string `mapstructure:"default_args" yaml:"default_args,omitempty"` SplitInstall int `mapstructure:"split_install" yaml:"split_install,omitempty"` Features string `mapstructure:"features" yaml:"features,omitempty"` Profile string `mapstructure:"profile" yaml:"profile,omitempty"` Jobs int `mapstructure:"jobs" yaml:"jobs,omitempty"` PreserverdRebuild int `mapstructure:"preserved_rebuild" yaml:"preserved_rebuild,omitempty"` SkipSync int `mapstructure:"skip_sync" yaml:"skip_sync,omitempty"` WebRsync int `mapstructure:"webrsync" yaml:"webrsync,omitempty"` RemoteOverlay []string `mapstructure:"remote_overlay" yaml:"remote_overlay,omitempty"` RemoveRemoveOverlay []string `mapstructure:"remove_remote_overlay" yaml:"remove_remote_overlay,omitempty"` RemoveLaymanOverlay []string `mapstructure:"remove_layman_overlay" yaml:"remove_layman_overlay,omitempty"` RemovePkgs []string `mapstructure:"remove" yaml:"remove,omitempty"` }
type SarkBuildEquo ¶
type SarkBuildEquo struct { EnmanAddRepositories []string `mapstructure:"repositories" yaml:"repositories,omitempty"` EnmanDelRepositories []string `mapstructure:"remove_repositories" yaml:"remove_repositories,omitempty"` EnmanSelf int `mapstructure:"enman_self" yaml:"enman_self,omitempty"` Packages SarkBuildEquoPackage `mapstructure:"package" yaml:"package,omitempty"` Repository string `mapstructure:"repository" yaml:"repository,omitempty"` DependencyInstall SarkBuildEquoDepsInstall `mapstructure:"dependency_install" yaml:"dependency_install,omitempty"` }
type SarkBuildEquoDepsInstall ¶
type SarkBuildEquoDepsInstall struct { Enable int `mapstructure:"enable" yaml:"enable,omitempty"` InstallAtoms int `mapstructure:"install_atoms" yaml:"install_atoms,omitempty"` DependencyScanDepth int `mapstructure:"dependency_scan_depth" yaml:"dependency_scan_depth,omitempty"` DependencyIgnoreVersions int `mapstructure:"dependency_ignore_versions" yaml:"dependency_ignore_versions,omitempty"` PruneVirtuals int `mapstructure:"prune_virtuals" yaml:"prune_virtuals,omitempty"` InstallVersion int `mapstructure:"install_version" yaml:"install_version,omitempty"` SplitInstall int `mapstructure:"split_install" yaml:"split_install,omitempty"` }
type SarkBuildEquoPackage ¶
type SarkBuildScript ¶
type SarkConfig ¶
type SarkConfig struct { Viper *v.Viper Id string Repository SarkRepository `mapstructure:"repository" yaml:"repository,omitempty"` Build SarkBuild `mapstructure:"build" yaml:"build,omitempty"` Injector SarkInjectConfig `mapstructure:"injector" yaml:"injector,omitempty"` }
func NewSarkConfig ¶
func NewSarkConfig(viper *v.Viper, filterType string) (*SarkConfig, error)
func NewSarkConfigFromBytes ¶
func NewSarkConfigFromBytes(viper *v.Viper, data []byte) (*SarkConfig, error)
func NewSarkConfigFromFile ¶
func NewSarkConfigFromFile(viper *v.Viper, file string) (*SarkConfig, error)
func NewSarkConfigFromResource ¶
func NewSarkConfigFromResource(viper *v.Viper, resource, apiKey string, opts commons.HttpClientOpts) (*SarkConfig, error)
func NewSarkConfigFromString ¶
func NewSarkConfigFromString(viper *v.Viper, config string) (*SarkConfig, error)
func (*SarkConfig) ToString ¶
func (s *SarkConfig) ToString() (string, error)
type SarkFilterRuleConf ¶
type SarkFilterRuleConf struct { Descr string `mapstructure:"description" yaml:"description,omitempty"` Packages []string `mapstructure:"pkgs" yaml:"pkgs,omitempty"` Categories []string `mapstructure:"categories" yaml:"categories,omitempty"` Files []string `mapstructure:"files" yaml:"files,omitempty"` Urls []string `mapstructure:"urls" yaml:"urls,omitempty"` }
func NewSarkFilterRuleConf ¶
func NewSarkFilterRuleConf(desc string) *SarkFilterRuleConf
func (*SarkFilterRuleConf) AddCategory ¶
func (f *SarkFilterRuleConf) AddCategory(category string)
func (*SarkFilterRuleConf) AddFile ¶
func (f *SarkFilterRuleConf) AddFile(file string)
func (*SarkFilterRuleConf) AddPackage ¶
func (f *SarkFilterRuleConf) AddPackage(pkg string)
func (*SarkFilterRuleConf) AddUrl ¶
func (f *SarkFilterRuleConf) AddUrl(url string)
type SarkInjectConfig ¶
type SarkInjectConfig struct {
Filter SarkInjectFilterConfig `mapstructure:"filter" yaml:"filter,omitempty"`
}
func NewSarkInjectConfig ¶
func NewSarkInjectConfig(filterType string) *SarkInjectConfig
type SarkInjectFilterConfig ¶
type SarkInjectFilterConfig struct { FilterType string `mapstructure:"type" yaml:"type,omitempty"` // values whitelist|blacklist Rules []SarkFilterRuleConf `mapstructure:"rules" yaml:"rules,omitempty"` }
https://github.com/mitchellh/mapstructure/pull/145 (omitempty is not yet supported)
type SarkRepository ¶
type SarkRepository struct { Description string `mapstructure:"description" yaml:"description,omitempty"` Maintenance SarkRepositoryMaintenance `mapstructure:"maintenance" yaml:"maintenance,omitempty"` }
type SarkRepositoryMaintenance ¶
type SarkRepositoryMaintenance struct { CheckDiffs int `mapstructure:"check_diffs" yaml:"check_diffs,omitempty"` CleanCache int `mapstructure:"clean_cache" yaml:"clean_cache,omitempty"` KeepPreviousVersions int `mapstructure:"keep_previous_versions" yaml:"keep_previous_versions,omitempty"` RemovePkgs []string `mapstructure:"remove" yaml:"remove,omitempty"` }