Documentation
¶
Index ¶
- type Condition
- func (this *Condition) AddModificationHandler(h ModificationHandler)
- func (this *Condition) Assure() error
- func (this *Condition) AssureInterface() interface{}
- func (this *Condition) Delete() (bool, error)
- func (this *Condition) Get(name string) interface{}
- func (this *Condition) GetLastUpdateTime() time.Time
- func (this *Condition) GetMessage() string
- func (this *Condition) GetReason() string
- func (this *Condition) GetStatus() string
- func (this *Condition) GetStringField(name string) string
- func (this *Condition) GetTimeField(name string) time.Time
- func (this *Condition) GetTransitionTime() time.Time
- func (this *Condition) Has() bool
- func (this *Condition) Interface() interface{}
- func (this *Condition) IsModified() bool
- func (this *Condition) Modify(m bool)
- func (this *Condition) Name() string
- func (this *Condition) RemoveModificationHandler(h ModificationHandler)
- func (this *Condition) ResetModified()
- func (this *Condition) Set(name string, value interface{}) error
- func (this *Condition) SetLastUpdateTime(v time.Time) error
- func (this *Condition) SetMessage(v string) error
- func (this *Condition) SetReason(v string) error
- func (this *Condition) SetStatus(v string) error
- func (this *Condition) SetTransitionTime(v time.Time) error
- type ConditionLayout
- type ConditionType
- func (this *ConditionType) Assure(o interface{}) *Condition
- func (this *ConditionType) AssureInterface(o interface{}) interface{}
- func (this *ConditionType) DeleteCondition(o interface{}) bool
- func (this *ConditionType) Get(o interface{}) *Condition
- func (this *ConditionType) GetInterface(o interface{}) interface{}
- func (this *ConditionType) GetLastUpdateTime(o interface{}) time.Time
- func (this *ConditionType) GetMessage(o interface{}) string
- func (this *ConditionType) GetReason(o interface{}) string
- func (this *ConditionType) GetStatus(o interface{}) string
- func (this *ConditionType) GetStringField(o interface{}, name string) string
- func (this *ConditionType) GetTimeField(o interface{}, name string) time.Time
- func (this *ConditionType) GetTransitionTime(o interface{}) time.Time
- func (this *ConditionType) GetValue(o interface{}, name string) interface{}
- func (this *ConditionType) Has(o interface{}) bool
- func (this *ConditionType) Name() string
- func (this *ConditionType) SetLastUpdateTime(o interface{}, v time.Time) error
- func (this *ConditionType) SetMessage(o interface{}, v string) error
- func (this *ConditionType) SetReason(o interface{}, v string) error
- func (this *ConditionType) SetStatus(o interface{}, v string) error
- func (this *ConditionType) SetTransitionTime(o interface{}, v time.Time) error
- func (this *ConditionType) SetValue(o interface{}, name string, value interface{}) error
- type Conditions
- func (this *Conditions) AddModificationHandler(h ModificationHandler)
- func (this *Conditions) Delete(name string) bool
- func (this *Conditions) Get(name string) *Condition
- func (this *Conditions) GetLastUpdateTime(ctype string) time.Time
- func (this *Conditions) GetMessage(ctype string) string
- func (this *Conditions) GetReason(ctype string) string
- func (this *Conditions) GetStatus(ctype string) string
- func (this *Conditions) GetStringField(ctype, name string) string
- func (this *Conditions) GetTimeField(ctype string, name string) time.Time
- func (this *Conditions) GetTransitionTime(ctype string) time.Time
- func (this *Conditions) GetValue(ctype, name string) interface{}
- func (this *Conditions) IsModified() bool
- func (this *Conditions) Modify(m bool) bool
- func (this *Conditions) RemoveModificationHandler(h ModificationHandler)
- func (this *Conditions) ResetModified() bool
- func (this *Conditions) SetLastUpdateTime(ctype string, v time.Time) error
- func (this *Conditions) SetMessage(ctype, v string) error
- func (this *Conditions) SetReason(ctype, v string) error
- func (this *Conditions) SetStatus(ctype, v string) error
- func (this *Conditions) SetTransitionTime(ctype string, v time.Time) error
- func (this *Conditions) SetValue(ctype, name string, value interface{}) error
- func (this *Conditions) Types() utils.StringSet
- type ModificationHandler
- type ModificationHandlers
- type TweakFunction
- func ConditionsField(field string) TweakFunction
- func Inherit(b *ConditionLayout) TweakFunction
- func LastUpdateTimeField(field string) TweakFunction
- func MessageField(field string) TweakFunction
- func ObjectStatusField(field string) TweakFunction
- func ReasonField(field string) TweakFunction
- func StatusField(field string) TweakFunction
- func TransitionTimeField(field string) TweakFunction
- func TypeField(field string) TweakFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition reflects a dedicated condition for a dedicated object. It can be retrieved for a dedicated object using a ConditionType object.
func (*Condition) AddModificationHandler ¶
func (this *Condition) AddModificationHandler(h ModificationHandler)
func (*Condition) AssureInterface ¶
func (this *Condition) AssureInterface() interface{}
func (*Condition) GetLastUpdateTime ¶
func (*Condition) GetMessage ¶
func (*Condition) GetStringField ¶
func (*Condition) GetTransitionTime ¶
func (*Condition) IsModified ¶
func (*Condition) RemoveModificationHandler ¶
func (this *Condition) RemoveModificationHandler(h ModificationHandler)
func (*Condition) ResetModified ¶
func (this *Condition) ResetModified()
func (*Condition) SetMessage ¶
type ConditionLayout ¶
type ConditionLayout struct {
// contains filtered or unexported fields
}
ConditionLayout represents a dedicated kind of condition layout for a dedicated class of condition carrying objects. Therefore it holds field name information to to access conditions in this class of objects and about the representation of some standard field like Type and Status inside a condition entry. A ConditionType is configured using an arbitrary set of TweakFunctions. There are dedicated creator functions for all modifyable attributes.
func NewConditionLayout ¶
func NewConditionLayout(cfg ...TweakFunction) *ConditionLayout
func (*ConditionLayout) For ¶
func (this *ConditionLayout) For(o interface{}) (*Conditions, error)
func (*ConditionLayout) Types ¶
func (this *ConditionLayout) Types(o interface{}) utils.StringSet
type ConditionType ¶
type ConditionType struct { *ConditionLayout // contains filtered or unexported fields }
ConditionType represents a dedicated kind of condition for a dedicated class of condition carrying objects using a dedicated condition layout. Therefore is is configured by a name for the dedicated condition kind a condition layout.
func NewConditionType ¶
func NewConditionType(name string, t *ConditionLayout) *ConditionType
func (*ConditionType) Assure ¶
func (this *ConditionType) Assure(o interface{}) *Condition
func (*ConditionType) AssureInterface ¶
func (this *ConditionType) AssureInterface(o interface{}) interface{}
func (*ConditionType) DeleteCondition ¶
func (this *ConditionType) DeleteCondition(o interface{}) bool
func (*ConditionType) Get ¶
func (this *ConditionType) Get(o interface{}) *Condition
func (*ConditionType) GetInterface ¶
func (this *ConditionType) GetInterface(o interface{}) interface{}
func (*ConditionType) GetLastUpdateTime ¶
func (this *ConditionType) GetLastUpdateTime(o interface{}) time.Time
func (*ConditionType) GetMessage ¶
func (this *ConditionType) GetMessage(o interface{}) string
func (*ConditionType) GetReason ¶
func (this *ConditionType) GetReason(o interface{}) string
func (*ConditionType) GetStatus ¶
func (this *ConditionType) GetStatus(o interface{}) string
func (*ConditionType) GetStringField ¶
func (this *ConditionType) GetStringField(o interface{}, name string) string
func (*ConditionType) GetTimeField ¶
func (this *ConditionType) GetTimeField(o interface{}, name string) time.Time
func (*ConditionType) GetTransitionTime ¶
func (this *ConditionType) GetTransitionTime(o interface{}) time.Time
func (*ConditionType) GetValue ¶
func (this *ConditionType) GetValue(o interface{}, name string) interface{}
func (*ConditionType) Has ¶
func (this *ConditionType) Has(o interface{}) bool
func (*ConditionType) Name ¶
func (this *ConditionType) Name() string
func (*ConditionType) SetLastUpdateTime ¶
func (this *ConditionType) SetLastUpdateTime(o interface{}, v time.Time) error
func (*ConditionType) SetMessage ¶
func (this *ConditionType) SetMessage(o interface{}, v string) error
func (*ConditionType) SetReason ¶
func (this *ConditionType) SetReason(o interface{}, v string) error
func (*ConditionType) SetStatus ¶
func (this *ConditionType) SetStatus(o interface{}, v string) error
func (*ConditionType) SetTransitionTime ¶
func (this *ConditionType) SetTransitionTime(o interface{}, v time.Time) error
func (*ConditionType) SetValue ¶
func (this *ConditionType) SetValue(o interface{}, name string, value interface{}) error
type Conditions ¶
type Conditions struct {
// contains filtered or unexported fields
}
func (*Conditions) AddModificationHandler ¶
func (this *Conditions) AddModificationHandler(h ModificationHandler)
func (*Conditions) Delete ¶
func (this *Conditions) Delete(name string) bool
func (*Conditions) Get ¶
func (this *Conditions) Get(name string) *Condition
func (*Conditions) GetLastUpdateTime ¶
func (this *Conditions) GetLastUpdateTime(ctype string) time.Time
func (*Conditions) GetMessage ¶
func (this *Conditions) GetMessage(ctype string) string
func (*Conditions) GetReason ¶
func (this *Conditions) GetReason(ctype string) string
func (*Conditions) GetStatus ¶
func (this *Conditions) GetStatus(ctype string) string
func (*Conditions) GetStringField ¶
func (this *Conditions) GetStringField(ctype, name string) string
func (*Conditions) GetTimeField ¶
func (this *Conditions) GetTimeField(ctype string, name string) time.Time
func (*Conditions) GetTransitionTime ¶
func (this *Conditions) GetTransitionTime(ctype string) time.Time
func (*Conditions) GetValue ¶
func (this *Conditions) GetValue(ctype, name string) interface{}
func (*Conditions) IsModified ¶
func (this *Conditions) IsModified() bool
func (*Conditions) Modify ¶
func (this *Conditions) Modify(m bool) bool
func (*Conditions) RemoveModificationHandler ¶
func (this *Conditions) RemoveModificationHandler(h ModificationHandler)
func (*Conditions) ResetModified ¶
func (this *Conditions) ResetModified() bool
func (*Conditions) SetLastUpdateTime ¶
func (this *Conditions) SetLastUpdateTime(ctype string, v time.Time) error
func (*Conditions) SetMessage ¶
func (this *Conditions) SetMessage(ctype, v string) error
func (*Conditions) SetReason ¶
func (this *Conditions) SetReason(ctype, v string) error
func (*Conditions) SetStatus ¶
func (this *Conditions) SetStatus(ctype, v string) error
func (*Conditions) SetTransitionTime ¶
func (this *Conditions) SetTransitionTime(ctype string, v time.Time) error
func (*Conditions) SetValue ¶
func (this *Conditions) SetValue(ctype, name string, value interface{}) error
func (*Conditions) Types ¶
func (this *Conditions) Types() utils.StringSet
type ModificationHandler ¶
type ModificationHandler interface {
Modified(*Condition)
}
type ModificationHandlers ¶
type ModificationHandlers []ModificationHandler
type TweakFunction ¶
type TweakFunction func(c *ConditionLayout)
TweakFunction is used to configure a ConditionType for a dedicated class of objects
func ConditionsField ¶
func ConditionsField(field string) TweakFunction
func Inherit ¶
func Inherit(b *ConditionLayout) TweakFunction
func LastUpdateTimeField ¶
func LastUpdateTimeField(field string) TweakFunction
func MessageField ¶
func MessageField(field string) TweakFunction
func ObjectStatusField ¶
func ObjectStatusField(field string) TweakFunction
func ReasonField ¶
func ReasonField(field string) TweakFunction
func StatusField ¶
func StatusField(field string) TweakFunction
func TransitionTimeField ¶
func TransitionTimeField(field string) TweakFunction
func TypeField ¶
func TypeField(field string) TweakFunction