Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoMajorMinorPatchElementsFound = errors.New("No Major.Minor.Patch elements found")
)
Functions ¶
This section is empty.
Types ¶
type ForcePolicy ¶
type ForcePolicy struct {
// contains filtered or unexported fields
}
func NewForcePolicy ¶
func NewForcePolicy(matchTag bool) *ForcePolicy
func (*ForcePolicy) Name ¶
func (fp *ForcePolicy) Name() string
func (*ForcePolicy) ShouldUpdate ¶
func (fp *ForcePolicy) ShouldUpdate(current, new string) (bool, error)
func (*ForcePolicy) Type ¶
func (fp *ForcePolicy) Type() PolicyType
type GlobPolicy ¶
type GlobPolicy struct {
// contains filtered or unexported fields
}
func NewGlobPolicy ¶
func NewGlobPolicy(policy string) (*GlobPolicy, error)
func (*GlobPolicy) Name ¶
func (p *GlobPolicy) Name() string
func (*GlobPolicy) ShouldUpdate ¶
func (p *GlobPolicy) ShouldUpdate(current, new string) (bool, error)
func (*GlobPolicy) Type ¶
func (p *GlobPolicy) Type() PolicyType
type NilPolicy ¶
type NilPolicy struct{}
func (*NilPolicy) Type ¶
func (np *NilPolicy) Type() PolicyType
type Options ¶
type Options struct {
MatchTag bool
}
Options - additional options when parsing policy
type Policy ¶
type Policy interface { ShouldUpdate(current, new string) (bool, error) Name() string Type() PolicyType }
func GetPolicyFromLabelsOrAnnotations ¶
func GetPolicyFromLabelsOrAnnotations(labels map[string]string, annotations map[string]string) Policy
GetPolicyFromLabelsOrAnnotations - gets policy from k8s labels or annotations
func ParseSemverPolicy ¶
ParseSemverPolicy - parse policy type
type PolicyType ¶
type PolicyType int
const ( PolicyTypeNone PolicyType = iota PolicyTypeSemver PolicyTypeForce PolicyTypeGlob PolicyTypeRegexp )
func (PolicyType) MarshalJSON ¶
func (r PolicyType) MarshalJSON() ([]byte, error)
MarshalJSON is generated so PolicyType satisfies json.Marshaler.
func (*PolicyType) UnmarshalJSON ¶
func (r *PolicyType) UnmarshalJSON(data []byte) error
UnmarshalJSON is generated so PolicyType satisfies json.Unmarshaler.
type RegexpPolicy ¶
type RegexpPolicy struct {
// contains filtered or unexported fields
}
RegexpPolicy - regular expression based pattern
func NewRegexpPolicy ¶
func NewRegexpPolicy(policy string) (*RegexpPolicy, error)
func (*RegexpPolicy) Name ¶
func (p *RegexpPolicy) Name() string
func (*RegexpPolicy) ShouldUpdate ¶
func (p *RegexpPolicy) ShouldUpdate(current, new string) (bool, error)
func (*RegexpPolicy) Type ¶
func (p *RegexpPolicy) Type() PolicyType
type SemverPolicy ¶
type SemverPolicy struct {
// contains filtered or unexported fields
}
func NewSemverPolicy ¶
func NewSemverPolicy(spt SemverPolicyType) *SemverPolicy
func (*SemverPolicy) Name ¶
func (sp *SemverPolicy) Name() string
func (*SemverPolicy) ShouldUpdate ¶
func (sp *SemverPolicy) ShouldUpdate(current, new string) (bool, error)
func (*SemverPolicy) Type ¶
func (sp *SemverPolicy) Type() PolicyType
type SemverPolicyType ¶
type SemverPolicyType int
SemverPolicyType - policy type
const ( SemverPolicyTypeNone SemverPolicyType = iota SemverPolicyTypeAll SemverPolicyTypeMajor SemverPolicyTypeMinor SemverPolicyTypePatch )
available policies
func (SemverPolicyType) MarshalJSON ¶
func (r SemverPolicyType) MarshalJSON() ([]byte, error)
MarshalJSON is generated so SemverPolicyType satisfies json.Marshaler.
func (SemverPolicyType) String ¶
func (t SemverPolicyType) String() string
func (*SemverPolicyType) UnmarshalJSON ¶
func (r *SemverPolicyType) UnmarshalJSON(data []byte) error
UnmarshalJSON is generated so SemverPolicyType satisfies json.Unmarshaler.
Click to show internal directories.
Click to hide internal directories.