Review config file structure and improve worker pool

This commit is contained in:
CrazyMax
2019-06-28 17:07:20 +02:00
parent 3450fd425d
commit 889f595523
12 changed files with 283 additions and 303 deletions

20
internal/model/image.go Normal file
View File

@@ -0,0 +1,20 @@
package model
// RegOpts holds registry options configuration
type RegOpts struct {
Username string `yaml:"username,omitempty" json:",omitempty"`
Password string `yaml:"password,omitempty" json:",omitempty"`
InsecureTLS bool `yaml:"insecure_tls,omitempty" json:",omitempty"`
Timeout int `yaml:"timeout,omitempty" json:",omitempty"`
}
// Image holds image configuration
type Image struct {
Name string `yaml:"name,omitempty" json:",omitempty"`
RegOptsID string `yaml:"regopts_id,omitempty" json:",omitempty"`
WatchRepo bool `yaml:"watch_repo,omitempty" json:",omitempty"`
MaxTags int `yaml:"max_tags,omitempty" json:",omitempty"`
IncludeTags []string `yaml:"include_tags,omitempty" json:",omitempty"`
ExcludeTags []string `yaml:"exclude_tags,omitempty" json:",omitempty"`
RegOpts RegOpts `yaml:"-" json:"-"`
}