Documentation ¶
Index ¶
- Constants
- Variables
- func Boolean(policy Policy) bool
- func Tag(policy Policy) bool
- type GlobPattern
- type Pattern
- type Policy
- type RegexpPattern
- type SemverPattern
- type Set
- func (s Set) Add(ps ...Policy) Set
- func (s Set) Get(p Policy) (string, bool)
- func (s Set) Has(needle Policy) bool
- func (s Set) Set(p Policy, v string) Set
- func (s Set) String() string
- func (s Set) ToStringMap() map[string]string
- func (s *Set) UnmarshalJSON(in []byte) error
- func (s Set) Without(omit Policy) Set
- type Update
- type Updates
Constants ¶
Variables ¶
View Source
var ( // PatternAll matches everything. PatternAll = NewPattern(globPrefix + "*") PatternLatest = NewPattern(globPrefix + "latest") )
Functions ¶
Types ¶
type GlobPattern ¶
type GlobPattern string
func (GlobPattern) Matches ¶
func (g GlobPattern) Matches(tag string) bool
func (GlobPattern) String ¶
func (g GlobPattern) String() string
func (GlobPattern) Valid ¶
func (g GlobPattern) Valid() bool
type Pattern ¶
type Pattern interface { // Matches returns true if the given image tag matches the pattern. Matches(tag string) bool // String returns the prefixed string representation. String() string // Newer returns true if image `a` is newer than image `b`. Newer(a, b *image.Info) bool // Valid returns true if the pattern is considered valid. Valid() bool }
Pattern provides an interface to match image tags.
func GetTagPattern ¶
func NewPattern ¶
NewPattern instantiates a Pattern according to the prefix it finds. The prefix can be either `glob:` (default if omitted), `semver:` or `regexp:`.
type Policy ¶
type Policy string
Policy is an string, denoting the current deployment policy of a service, e.g. automated, or locked.
type RegexpPattern ¶
type RegexpPattern struct {
// contains filtered or unexported fields
}
RegexpPattern matches by regular expression.
func (RegexpPattern) Matches ¶
func (r RegexpPattern) Matches(tag string) bool
func (RegexpPattern) String ¶
func (r RegexpPattern) String() string
func (RegexpPattern) Valid ¶
func (r RegexpPattern) Valid() bool
type SemverPattern ¶
type SemverPattern struct {
// contains filtered or unexported fields
}
SemverPattern matches by semantic versioning. See https://semver.org/
func (SemverPattern) Matches ¶
func (s SemverPattern) Matches(tag string) bool
func (SemverPattern) String ¶
func (s SemverPattern) String() string
func (SemverPattern) Valid ¶
func (s SemverPattern) Valid() bool
type Set ¶
func (Set) Has ¶
Has returns true if a resource has a particular policy present, and for boolean policies, if it is set to true.
func (Set) ToStringMap ¶
func (*Set) UnmarshalJSON ¶
We used to specify a set of policies as []Policy, and in some places it may be so serialised.
type Updates ¶
type Updates map[flux.ResourceID]Update
Click to show internal directories.
Click to hide internal directories.