Documentation ¶
Index ¶
- func ApplyUpdates(dir string, config Config, cacheProvider CacheProvider, ...) error
- func FileList(dir string, includes []regexp.Regexp, excludes []regexp.Regexp) (*[]string, error)
- func FileResolvePath(dir string, file string) string
- func VisitYaml(yamlNode *yaml.Node, fn func(trace yamlTrace, yamlNode *yaml.Node) error) error
- type Action
- type Cache
- type CacheProvider
- type CacheResource
- type Change
- type Changes
- type Config
- type ConfigFiles
- type DockerImageFormat
- type DockerRegistry
- type Extract
- type ExtractStrategy
- type FileCacheProvider
- type Format
- type Git
- type GitAuthor
- type GitHubGitProvider
- type GitHubTagRegistry
- type GitProvider
- type HelmRegistry
- type HttpBasicCredentials
- type LexicographicExtractStrategy
- type LocalGitProvider
- type NumericExtractStrategy
- type PlainFormat
- type Policy
- func (p Policy) FilterAndSort(currentVersion string, availableVersions []string, prefix string, ...) (*[]string, error)
- func (p Policy) FindNext(currentVersion string, availableVersions []string, prefix string, ...) (*string, error)
- func (p Policy) Parse(version string, prefix string, suffix string) (*[]string, error)
- type RawConfig
- type RawConfigFiles
- type RawConfigGit
- type RawConfigGitAuthor
- type RawConfigGitGitHub
- type RawConfigHttpCredentials
- type RawConfigPolicy
- type RawConfigPolicyExtractLexicographicStrategy
- type RawConfigPolicyExtractNumericStrategy
- type RawConfigPolicyExtractSemverStrategy
- type RawConfigRegistryDocker
- type RawConfigRegistryGitHubTag
- type RawConfigRegistryHelm
- type RegexpFormat
- type Registry
- type SemverExtractStrategy
- type UpdateVersionsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyUpdates ¶
func ApplyUpdates(dir string, config Config, cacheProvider CacheProvider, opts UpdateVersionsOptions) error
func FileResolvePath ¶
Types ¶
type Cache ¶
type Cache struct {
Resources []CacheResource `yaml:"resources"`
}
func (Cache) FindResource ¶
func (c Cache) FindResource(registryName string, resourceName string) *CacheResource
func (Cache) UpdateResource ¶
func (c Cache) UpdateResource(r CacheResource) Cache
type CacheProvider ¶
type CacheResource ¶
type Change ¶
type Change struct { RegistryName string ResourceName string OldVersion string NewVersion string File string Trace yamlTrace OldValue string NewValue string Action Action }
func (Change) Identifier ¶
type Changes ¶
type Changes []Change
func DetectUpdates ¶
func DetectUpdates(dir string, config Config, cacheProvider CacheProvider) (*Changes, error)
type Config ¶
type Config struct { Files ConfigFiles Registries map[string]Registry Policies map[string]Policy Git Git }
func LoadConfig ¶
type DockerImageFormat ¶
type DockerImageFormat struct{}
func (DockerImageFormat) ExtractVersion ¶
func (f DockerImageFormat) ExtractVersion(str string) (*string, error)
func (DockerImageFormat) ReplaceVersion ¶
func (f DockerImageFormat) ReplaceVersion(str string, version string) (*string, error)
type DockerRegistry ¶
type DockerRegistry struct { Interval time.Duration Url string Credentials HttpBasicCredentials }
func (DockerRegistry) FetchVersions ¶
func (r DockerRegistry) FetchVersions(repository string) (*[]string, error)
func (DockerRegistry) GetInterval ¶
func (r DockerRegistry) GetInterval() time.Duration
type ExtractStrategy ¶
type FileCacheProvider ¶
type FileCacheProvider struct {
File string
}
func (FileCacheProvider) Load ¶
func (p FileCacheProvider) Load() (*Cache, error)
func (FileCacheProvider) Save ¶
func (p FileCacheProvider) Save(cache Cache) error
type Git ¶
type Git struct {
Provider GitProvider
}
type GitHubGitProvider ¶
type GitHubTagRegistry ¶
type GitHubTagRegistry struct { Interval time.Duration Url string Credentials HttpBasicCredentials }
func (GitHubTagRegistry) FetchVersions ¶
func (r GitHubTagRegistry) FetchVersions(repository string) (*[]string, error)
func (GitHubTagRegistry) GetInterval ¶
func (r GitHubTagRegistry) GetInterval() time.Duration
type GitProvider ¶
type HelmRegistry ¶
type HelmRegistry struct { Interval time.Duration Url string Credentials HttpBasicCredentials }
func (HelmRegistry) FetchVersions ¶
func (r HelmRegistry) FetchVersions(chart string) (*[]string, error)
func (HelmRegistry) GetInterval ¶
func (r HelmRegistry) GetInterval() time.Duration
type HttpBasicCredentials ¶
type LexicographicExtractStrategy ¶
type LexicographicExtractStrategy struct {
Pin bool
}
func (LexicographicExtractStrategy) Compare ¶
func (str LexicographicExtractStrategy) Compare(v1 string, v2 string) int
func (LexicographicExtractStrategy) IsCompatible ¶
func (str LexicographicExtractStrategy) IsCompatible(v1 string, v2 string) bool
func (LexicographicExtractStrategy) IsValid ¶
func (str LexicographicExtractStrategy) IsValid(v string) bool
type LocalGitProvider ¶
type LocalGitProvider struct {
Author GitAuthor
}
type NumericExtractStrategy ¶
type NumericExtractStrategy struct {
Pin bool
}
func (NumericExtractStrategy) Compare ¶
func (str NumericExtractStrategy) Compare(v1 string, v2 string) int
func (NumericExtractStrategy) IsCompatible ¶
func (str NumericExtractStrategy) IsCompatible(v1 string, v2 string) bool
func (NumericExtractStrategy) IsValid ¶
func (str NumericExtractStrategy) IsValid(v string) bool
type PlainFormat ¶
type PlainFormat struct{}
func (PlainFormat) ExtractVersion ¶
func (f PlainFormat) ExtractVersion(str string) (*string, error)
func (PlainFormat) ReplaceVersion ¶
func (f PlainFormat) ReplaceVersion(str string, version string) (*string, error)
type RawConfig ¶
type RawConfig struct { Files RawConfigFiles `yaml:"files"` Registries map[string]map[string]interface{} `yaml:"registries"` Policies map[string]RawConfigPolicy `yaml:"policies"` Git RawConfigGit `yaml:"git"` }
type RawConfigFiles ¶
type RawConfigGit ¶
type RawConfigGit struct { Author RawConfigGitAuthor `yaml:"author"` GitHub *RawConfigGitGitHub `yaml:"gitHub"` }
type RawConfigGitAuthor ¶
type RawConfigGitGitHub ¶
type RawConfigPolicy ¶
type RawConfigRegistryDocker ¶
type RawConfigRegistryDocker struct { Interval time.Duration `yaml:"interval"` Url string `yaml:"url"` Credentials RawConfigHttpCredentials `yaml:"credentials"` }
type RawConfigRegistryGitHubTag ¶
type RawConfigRegistryGitHubTag struct { Interval time.Duration `yaml:"interval"` Url string `yaml:"url"` Credentials RawConfigHttpCredentials `yaml:"credentials"` }
type RawConfigRegistryHelm ¶
type RawConfigRegistryHelm struct { Interval time.Duration `yaml:"interval"` Url string `yaml:"url"` Credentials RawConfigHttpCredentials `yaml:"credentials"` }
type RegexpFormat ¶
func (RegexpFormat) ExtractVersion ¶
func (f RegexpFormat) ExtractVersion(str string) (*string, error)
func (RegexpFormat) ReplaceVersion ¶
func (f RegexpFormat) ReplaceVersion(str string, version string) (*string, error)
type SemverExtractStrategy ¶
type SemverExtractStrategy struct { PinMajor bool PinMinor bool PinPatch bool AllowPrereleases bool }
func (SemverExtractStrategy) Compare ¶
func (str SemverExtractStrategy) Compare(v1 string, v2 string) int
func (SemverExtractStrategy) IsCompatible ¶
func (str SemverExtractStrategy) IsCompatible(v1 string, v2 string) bool
func (SemverExtractStrategy) IsValid ¶
func (str SemverExtractStrategy) IsValid(v string) bool
type UpdateVersionsOptions ¶
type UpdateVersionsOptions struct {
DryRun bool
}
Click to show internal directories.
Click to hide internal directories.