Documentation ¶
Index ¶
- func ApplyUpdate(dir string, config Config, cacheProvider CacheProvider, action Action, ...) error
- func FileResolvePath(dir string, file string) string
- func LogDebug(msg string, args ...interface{})
- func LogError(msg string, args ...interface{})
- func LogInfo(msg string, args ...interface{})
- func LogWarning(msg string, args ...interface{})
- func MapMap[K comparable, V any, E any](slice map[K]V, mapFn func(v V, k K) E) []E
- func SetLogVerbosity(value bool)
- func SliceFilter[E any](slice []E, filterFn func(e E) bool) []E
- func SliceFlatMap[E any, E2 any](slice []E, mapFn func(e E) []E2) []E2
- func SliceGroupBy[E any](slice []E, keyFn func(e E) string) map[string][]E
- func SliceMap[E any, E2 any](slice []E, mapFn func(e E) E2) []E2
- func SliceUnique[E comparable](slice []E) []E
- type Action
- type Augmenter
- type Cache
- type CacheProvider
- type CacheResource
- type Change
- type ChangeSet
- func (cs ChangeSet) Branch(prefix string) string
- func (cs ChangeSet) BranchFindPrefix(prefix string) string
- func (cs ChangeSet) GroupHash() string
- func (cs ChangeSet) Hash() string
- func (cs ChangeSet) Message() (string, string)
- func (cs ChangeSet) Push(dir string, fileHooks ...func(file string) error) error
- func (cs ChangeSet) Title() string
- type Config
- type ConfigFiles
- type DockerImageFormat
- type DockerRegistry
- type Extract
- type ExtractStrategy
- type FileCacheProvider
- type FileFormat
- type FileFormatAnnotation
- type Format
- type Git
- type GitAuthor
- type GitHubGitProvider
- type GitHubGitProviderInheritLabels
- type GitHubTagRegistry
- type GitLabGitProvider
- type GitProvider
- type GithubAugmenter
- type GithubLink
- type GithubPullRequestReference
- type HelmRegistry
- type HttpBasicCredentials
- type LexicographicExtractStrategy
- type LocalGitProvider
- type NumericExtractStrategy
- type PlainFormat
- type Policy
- func (p Policy) Compare(v1 string, v2 string, prefix string, suffix string) int
- 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) (map[string]string, []string, error)
- type PushAction
- type RawConfig
- type RawConfigAugmenterGithub
- type RawConfigFiles
- type RawConfigGit
- type RawConfigGitAuthor
- type RawConfigGitGitHub
- type RawConfigGitGitHubInheritLabels
- type RawConfigGitGitLab
- type RawConfigHttpCredentials
- type RawConfigPolicy
- type RawConfigPolicyExtractLexicographicStrategy
- type RawConfigPolicyExtractNumericStrategy
- type RawConfigPolicyExtractSemverStrategy
- type RawConfigRegistryDocker
- type RawConfigRegistryGitHubTag
- type RawConfigRegistryHelm
- type RegexpFormat
- type Registry
- type RequestAction
- type SemverExtractStrategy
- type UpdateVersionResult
- type YamlFileFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyUpdate ¶ added in v0.4.1
func FileResolvePath ¶
func LogWarning ¶
func LogWarning(msg string, args ...interface{})
func MapMap ¶ added in v0.7.0
func MapMap[K comparable, V any, E any](slice map[K]V, mapFn func(v V, k K) E) []E
func SetLogVerbosity ¶
func SetLogVerbosity(value bool)
func SliceFilter ¶ added in v0.7.0
func SliceFlatMap ¶ added in v0.7.0
func SliceGroupBy ¶ added in v0.7.0
func SliceUnique ¶ added in v0.7.0
func SliceUnique[E comparable](slice []E) []E
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 ChangeSet ¶ added in v0.7.0
func (ChangeSet) BranchFindPrefix ¶ added in v0.7.0
type Config ¶
type Config struct { Files ConfigFiles Registries map[string]Registry Policies map[string]Policy Augmenters []Augmenter 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
func (DockerRegistry) RetrieveLabels ¶ added in v0.5.0
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 FileFormat ¶ added in v0.2.0
type FileFormat interface { ExtractAnnotations(all []string) ([]FileFormatAnnotation, error) ReadValue(lines []string, lineNum int) (string, error) WriteValue(lines []string, lineNum int, value string) error }
func GuessFileFormatFromExtension ¶ added in v0.2.0
func GuessFileFormatFromExtension(file string) (FileFormat, error)
type FileFormatAnnotation ¶ added in v0.2.0
type Git ¶
type Git struct {
Provider GitProvider
}
type GitHubGitProvider ¶
type GitHubGitProvider struct { Author GitAuthor AccessToken string InheritLabels GitHubGitProviderInheritLabels }
func (*GitHubGitProvider) ExtractInheritedLabels ¶ added in v0.6.1
func (p *GitHubGitProvider) ExtractInheritedLabels(pullRequests []*github.PullRequest) []string
type GitHubGitProviderInheritLabels ¶ added in v0.6.1
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 GitLabGitProvider ¶ added in v0.2.1
type GitProvider ¶
type GithubAugmenter ¶ added in v0.5.0
type GithubAugmenter struct {
AccessToken string
}
func (GithubAugmenter) ExtractPullRequestReferences ¶ added in v0.7.1
func (a GithubAugmenter) ExtractPullRequestReferences(text string) (string, []GithubPullRequestReference)
func (GithubAugmenter) RenderMessage ¶ added in v0.5.0
type GithubLink ¶ added in v0.5.0
func (GithubLink) Render ¶ added in v0.5.0
func (l GithubLink) Render() string
type GithubPullRequestReference ¶ added in v0.7.1
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 PushAction ¶
type PushAction struct {
// contains filtered or unexported fields
}
func (PushAction) Identifier ¶ added in v0.4.1
func (c PushAction) Identifier() string
type RawConfig ¶
type RawConfig struct { Files RawConfigFiles `yaml:"files"` Registries map[string]map[string]interface{} `yaml:"registries"` Policies map[string]RawConfigPolicy `yaml:"policies"` Augmenters []map[string]interface{} `yaml:"augmenters"` Git RawConfigGit `yaml:"git"` }
type RawConfigAugmenterGithub ¶ added in v0.5.0
type RawConfigAugmenterGithub struct {
AccessToken string `yaml:"accessToken"`
}
type RawConfigFiles ¶
type RawConfigGit ¶
type RawConfigGit struct { Author RawConfigGitAuthor `yaml:"author"` SignKey string `yaml:"signKey"` GitHub *RawConfigGitGitHub `yaml:"gitHub"` GitLab *RawConfigGitGitLab `yaml:"gitLab"` }
type RawConfigGitAuthor ¶
type RawConfigGitGitHub ¶
type RawConfigGitGitHub struct { Owner string `yaml:"owner"` Repo string `yaml:"repo"` AccessToken string `yaml:"accessToken"` InheritLabels RawConfigGitGitHubInheritLabels `yaml:"inheritLabels"` }
type RawConfigGitGitHubInheritLabels ¶ added in v0.6.1
type RawConfigGitGitLab ¶ added in v0.2.1
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 RequestAction ¶
type RequestAction struct {
// contains filtered or unexported fields
}
func (RequestAction) Identifier ¶ added in v0.4.1
func (c RequestAction) Identifier() string
type SemverExtractStrategy ¶
type SemverExtractStrategy struct { Relaxed bool 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 UpdateVersionResult ¶
func DetectUpdates ¶
func DetectUpdates(dir string, config Config, cacheProvider CacheProvider) []UpdateVersionResult
type YamlFileFormat ¶ added in v0.2.0
type YamlFileFormat struct{}
func (YamlFileFormat) ExtractAnnotations ¶ added in v0.2.0
func (f YamlFileFormat) ExtractAnnotations(lines []string) ([]FileFormatAnnotation, error)
func (YamlFileFormat) ReadValue ¶ added in v0.2.0
func (f YamlFileFormat) ReadValue(lines []string, lineNum int) (string, error)
func (YamlFileFormat) WriteValue ¶ added in v0.2.0
func (f YamlFileFormat) WriteValue(lines []string, lineNum int, value string) error
Click to show internal directories.
Click to hide internal directories.