resource_update

package
v0.0.0-...-3d8ba93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ResourceUpdateType = "resource-update"

Variables

This section is empty.

Functions

func FromPolicy

func FromPolicy(from v1beta1.AppPolicy) (apis.Policy, error)

Types

type NullablePolicyRule

type NullablePolicyRule struct {
	// contains filtered or unexported fields
}

func NewNullablePolicyRule

func NewNullablePolicyRule(val *PolicyRule) *NullablePolicyRule

func (*NullablePolicyRule) Get

func (v *NullablePolicyRule) Get() *PolicyRule

func (*NullablePolicyRule) IsSet

func (v *NullablePolicyRule) IsSet() bool

func (NullablePolicyRule) MarshalJSON

func (v NullablePolicyRule) MarshalJSON() ([]byte, error)

func (*NullablePolicyRule) Set

func (v *NullablePolicyRule) Set(val *PolicyRule)

func (*NullablePolicyRule) UnmarshalJSON

func (v *NullablePolicyRule) UnmarshalJSON(src []byte) error

func (*NullablePolicyRule) Unset

func (v *NullablePolicyRule) Unset()

type NullableResourceUpdateSpec

type NullableResourceUpdateSpec struct {
	// contains filtered or unexported fields
}

func NewNullableResourceUpdateSpec

func NewNullableResourceUpdateSpec(val *ResourceUpdateSpec) *NullableResourceUpdateSpec

func (*NullableResourceUpdateSpec) Get

func (*NullableResourceUpdateSpec) IsSet

func (v *NullableResourceUpdateSpec) IsSet() bool

func (NullableResourceUpdateSpec) MarshalJSON

func (v NullableResourceUpdateSpec) MarshalJSON() ([]byte, error)

func (*NullableResourceUpdateSpec) Set

func (*NullableResourceUpdateSpec) UnmarshalJSON

func (v *NullableResourceUpdateSpec) UnmarshalJSON(src []byte) error

func (*NullableResourceUpdateSpec) Unset

func (v *NullableResourceUpdateSpec) Unset()

type NullableRuleSelector

type NullableRuleSelector struct {
	// contains filtered or unexported fields
}

func NewNullableRuleSelector

func NewNullableRuleSelector(val *RuleSelector) *NullableRuleSelector

func (*NullableRuleSelector) Get

func (*NullableRuleSelector) IsSet

func (v *NullableRuleSelector) IsSet() bool

func (NullableRuleSelector) MarshalJSON

func (v NullableRuleSelector) MarshalJSON() ([]byte, error)

func (*NullableRuleSelector) Set

func (v *NullableRuleSelector) Set(val *RuleSelector)

func (*NullableRuleSelector) UnmarshalJSON

func (v *NullableRuleSelector) UnmarshalJSON(src []byte) error

func (*NullableRuleSelector) Unset

func (v *NullableRuleSelector) Unset()

type NullableStrategy

type NullableStrategy struct {
	// contains filtered or unexported fields
}

func NewNullableStrategy

func NewNullableStrategy(val *Strategy) *NullableStrategy

func (*NullableStrategy) Get

func (v *NullableStrategy) Get() *Strategy

func (*NullableStrategy) IsSet

func (v *NullableStrategy) IsSet() bool

func (NullableStrategy) MarshalJSON

func (v NullableStrategy) MarshalJSON() ([]byte, error)

func (*NullableStrategy) Set

func (v *NullableStrategy) Set(val *Strategy)

func (*NullableStrategy) UnmarshalJSON

func (v *NullableStrategy) UnmarshalJSON(src []byte) error

func (*NullableStrategy) Unset

func (v *NullableStrategy) Unset()

type PolicyRule

type PolicyRule struct {
	Selector *RuleSelector `json:"selector"`
	Strategy *Strategy     `json:"strategy"`
}

PolicyRule struct for PolicyRule

func NewPolicyRule

func NewPolicyRule() *PolicyRule

NewPolicyRule is short for NewPolicyRuleWithDefault which instantiates a new PolicyRule object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewPolicyRuleEmpty

func NewPolicyRuleEmpty() *PolicyRule

NewPolicyRuleEmpty instantiates a new PolicyRule object with no properties set. This constructor will not assign any default values to properties.

func NewPolicyRuleList

func NewPolicyRuleList(ps ...*PolicyRule) []PolicyRule

NewPolicyRules converts a list PolicyRule pointers to objects. This is helpful when the SetPolicyRule requires a list of objects

func NewPolicyRuleWith

func NewPolicyRuleWith(selector RuleSelector, strategy Strategy) *PolicyRule

NewPolicyRuleWith instantiates a new PolicyRule object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewPolicyRuleWithDefault

func NewPolicyRuleWithDefault() *PolicyRule

NewPolicyRuleWithDefault instantiates a new PolicyRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*PolicyRule) GetSelector

func (o *PolicyRule) GetSelector() RuleSelector

GetSelector returns the Selector field value

func (*PolicyRule) GetSelectorOk

func (o *PolicyRule) GetSelectorOk() (*RuleSelector, bool)

GetSelectorOk returns a tuple with the Selector field value and a boolean to check if the value has been set.

func (*PolicyRule) GetStrategy

func (o *PolicyRule) GetStrategy() Strategy

GetStrategy returns the Strategy field value

func (*PolicyRule) GetStrategyOk

func (o *PolicyRule) GetStrategyOk() (*Strategy, bool)

GetStrategyOk returns a tuple with the Strategy field value and a boolean to check if the value has been set.

func (PolicyRule) MarshalJSON

func (o PolicyRule) MarshalJSON() ([]byte, error)

func (*PolicyRule) SetSelector

func (o *PolicyRule) SetSelector(v RuleSelector) *PolicyRule

SetSelector sets field value

func (*PolicyRule) SetStrategy

func (o *PolicyRule) SetStrategy(v Strategy) *PolicyRule

SetStrategy sets field value

func (PolicyRule) ToMap

func (o PolicyRule) ToMap() (map[string]interface{}, error)

func (*PolicyRule) Validate

func (o *PolicyRule) Validate() error

Validate validates this PolicyRule 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type ResourceUpdatePolicy

type ResourceUpdatePolicy struct {
	Base       apis.PolicyBase
	Properties ResourceUpdateSpec
}

func ResourceUpdate

func ResourceUpdate(name string) *ResourceUpdatePolicy

func (*ResourceUpdatePolicy) Build

func (*ResourceUpdatePolicy) DefType

func (r *ResourceUpdatePolicy) DefType() string

func (*ResourceUpdatePolicy) FromPolicy

func (*ResourceUpdatePolicy) GetRules

func (o *ResourceUpdatePolicy) GetRules() []PolicyRule

GetRules returns the Rules field value if set, zero value otherwise.

func (*ResourceUpdatePolicy) GetRulesOk

func (o *ResourceUpdatePolicy) GetRulesOk() ([]PolicyRule, bool)

GetRulesOk returns a tuple with the Rules field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourceUpdatePolicy) HasRules

func (o *ResourceUpdatePolicy) HasRules() bool

HasRules returns a boolean if a field has been set.

func (*ResourceUpdatePolicy) PolicyName

func (r *ResourceUpdatePolicy) PolicyName() string

func (*ResourceUpdatePolicy) SetRules

SetRules gets a reference to the given []PolicyRule and assigns it to the rules field. Rules: Specify the list of rules to control resource update strategy at resource level.

func (*ResourceUpdatePolicy) Validate

func (o *ResourceUpdatePolicy) Validate() error

Validate validates this ResourceUpdateSpec 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type ResourceUpdateSpec

type ResourceUpdateSpec struct {
	// Specify the list of rules to control resource update strategy at resource level.
	Rules []PolicyRule `json:"rules,omitempty"`
}

ResourceUpdateSpec struct for ResourceUpdateSpec

func NewResourceUpdateSpec

func NewResourceUpdateSpec() *ResourceUpdateSpec

NewResourceUpdateSpec is short for NewResourceUpdateSpecWithDefault which instantiates a new ResourceUpdateSpec object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewResourceUpdateSpecEmpty

func NewResourceUpdateSpecEmpty() *ResourceUpdateSpec

NewResourceUpdateSpecEmpty instantiates a new ResourceUpdateSpec object with no properties set. This constructor will not assign any default values to properties.

func NewResourceUpdateSpecList

func NewResourceUpdateSpecList(ps ...*ResourceUpdateSpec) []ResourceUpdateSpec

NewResourceUpdateSpecs converts a list ResourceUpdateSpec pointers to objects. This is helpful when the SetResourceUpdateSpec requires a list of objects

func NewResourceUpdateSpecWith

func NewResourceUpdateSpecWith() *ResourceUpdateSpec

NewResourceUpdateSpecWith instantiates a new ResourceUpdateSpec object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewResourceUpdateSpecWithDefault

func NewResourceUpdateSpecWithDefault() *ResourceUpdateSpec

NewResourceUpdateSpecWithDefault instantiates a new ResourceUpdateSpec object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (ResourceUpdateSpec) MarshalJSON

func (o ResourceUpdateSpec) MarshalJSON() ([]byte, error)

func (ResourceUpdateSpec) ToMap

func (o ResourceUpdateSpec) ToMap() (map[string]interface{}, error)

type RuleSelector

type RuleSelector struct {
	// Select resources by component names
	ComponentNames []string `json:"componentNames,omitempty"`
	// Select resources by component types
	ComponentTypes []string `json:"componentTypes,omitempty"`
	// Select resources by oamTypes (COMPONENT or TRAIT)
	OamTypes []string `json:"oamTypes,omitempty"`
	// Select resources by their names
	ResourceNames []string `json:"resourceNames,omitempty"`
	// Select resources by resource types (like Deployment)
	ResourceTypes []string `json:"resourceTypes,omitempty"`
	// Select resources by trait types
	TraitTypes []string `json:"traitTypes,omitempty"`
}

RuleSelector struct for RuleSelector

func NewRuleSelector

func NewRuleSelector() *RuleSelector

NewRuleSelector is short for NewRuleSelectorWithDefault which instantiates a new RuleSelector object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewRuleSelectorEmpty

func NewRuleSelectorEmpty() *RuleSelector

NewRuleSelectorEmpty instantiates a new RuleSelector object with no properties set. This constructor will not assign any default values to properties.

func NewRuleSelectorList

func NewRuleSelectorList(ps ...*RuleSelector) []RuleSelector

NewRuleSelectors converts a list RuleSelector pointers to objects. This is helpful when the SetRuleSelector requires a list of objects

func NewRuleSelectorWith

func NewRuleSelectorWith() *RuleSelector

NewRuleSelectorWith instantiates a new RuleSelector object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewRuleSelectorWithDefault

func NewRuleSelectorWithDefault() *RuleSelector

NewRuleSelectorWithDefault instantiates a new RuleSelector object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*RuleSelector) GetComponentNames

func (o *RuleSelector) GetComponentNames() []string

GetComponentNames returns the ComponentNames field value if set, zero value otherwise.

func (*RuleSelector) GetComponentNamesOk

func (o *RuleSelector) GetComponentNamesOk() ([]string, bool)

GetComponentNamesOk returns a tuple with the ComponentNames field value if set, nil otherwise and a boolean to check if the value has been set.

func (*RuleSelector) GetComponentTypes

func (o *RuleSelector) GetComponentTypes() []string

GetComponentTypes returns the ComponentTypes field value if set, zero value otherwise.

func (*RuleSelector) GetComponentTypesOk

func (o *RuleSelector) GetComponentTypesOk() ([]string, bool)

GetComponentTypesOk returns a tuple with the ComponentTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*RuleSelector) GetOamTypes

func (o *RuleSelector) GetOamTypes() []string

GetOamTypes returns the OamTypes field value if set, zero value otherwise.

func (*RuleSelector) GetOamTypesOk

func (o *RuleSelector) GetOamTypesOk() ([]string, bool)

GetOamTypesOk returns a tuple with the OamTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*RuleSelector) GetResourceNames

func (o *RuleSelector) GetResourceNames() []string

GetResourceNames returns the ResourceNames field value if set, zero value otherwise.

func (*RuleSelector) GetResourceNamesOk

func (o *RuleSelector) GetResourceNamesOk() ([]string, bool)

GetResourceNamesOk returns a tuple with the ResourceNames field value if set, nil otherwise and a boolean to check if the value has been set.

func (*RuleSelector) GetResourceTypes

func (o *RuleSelector) GetResourceTypes() []string

GetResourceTypes returns the ResourceTypes field value if set, zero value otherwise.

func (*RuleSelector) GetResourceTypesOk

func (o *RuleSelector) GetResourceTypesOk() ([]string, bool)

GetResourceTypesOk returns a tuple with the ResourceTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*RuleSelector) GetTraitTypes

func (o *RuleSelector) GetTraitTypes() []string

GetTraitTypes returns the TraitTypes field value if set, zero value otherwise.

func (*RuleSelector) GetTraitTypesOk

func (o *RuleSelector) GetTraitTypesOk() ([]string, bool)

GetTraitTypesOk returns a tuple with the TraitTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*RuleSelector) HasComponentNames

func (o *RuleSelector) HasComponentNames() bool

HasComponentNames returns a boolean if a field has been set.

func (*RuleSelector) HasComponentTypes

func (o *RuleSelector) HasComponentTypes() bool

HasComponentTypes returns a boolean if a field has been set.

func (*RuleSelector) HasOamTypes

func (o *RuleSelector) HasOamTypes() bool

HasOamTypes returns a boolean if a field has been set.

func (*RuleSelector) HasResourceNames

func (o *RuleSelector) HasResourceNames() bool

HasResourceNames returns a boolean if a field has been set.

func (*RuleSelector) HasResourceTypes

func (o *RuleSelector) HasResourceTypes() bool

HasResourceTypes returns a boolean if a field has been set.

func (*RuleSelector) HasTraitTypes

func (o *RuleSelector) HasTraitTypes() bool

HasTraitTypes returns a boolean if a field has been set.

func (RuleSelector) MarshalJSON

func (o RuleSelector) MarshalJSON() ([]byte, error)

func (*RuleSelector) SetComponentNames

func (o *RuleSelector) SetComponentNames(v []string) *RuleSelector

SetComponentNames gets a reference to the given []string and assigns it to the componentNames field. ComponentNames: Select resources by component names

func (*RuleSelector) SetComponentTypes

func (o *RuleSelector) SetComponentTypes(v []string) *RuleSelector

SetComponentTypes gets a reference to the given []string and assigns it to the componentTypes field. ComponentTypes: Select resources by component types

func (*RuleSelector) SetOamTypes

func (o *RuleSelector) SetOamTypes(v []string) *RuleSelector

SetOamTypes gets a reference to the given []string and assigns it to the oamTypes field. OamTypes: Select resources by oamTypes (COMPONENT or TRAIT)

func (*RuleSelector) SetResourceNames

func (o *RuleSelector) SetResourceNames(v []string) *RuleSelector

SetResourceNames gets a reference to the given []string and assigns it to the resourceNames field. ResourceNames: Select resources by their names

func (*RuleSelector) SetResourceTypes

func (o *RuleSelector) SetResourceTypes(v []string) *RuleSelector

SetResourceTypes gets a reference to the given []string and assigns it to the resourceTypes field. ResourceTypes: Select resources by resource types (like Deployment)

func (*RuleSelector) SetTraitTypes

func (o *RuleSelector) SetTraitTypes(v []string) *RuleSelector

SetTraitTypes gets a reference to the given []string and assigns it to the traitTypes field. TraitTypes: Select resources by trait types

func (RuleSelector) ToMap

func (o RuleSelector) ToMap() (map[string]interface{}, error)

func (*RuleSelector) Validate

func (o *RuleSelector) Validate() error

Validate validates this RuleSelector 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type Strategy

type Strategy struct {
	// Specify the op for updating target resources
	Op *string `json:"op"`
	// Specify which fields would trigger recreation when updated
	RecreateFields []string `json:"recreateFields,omitempty"`
}

Strategy struct for Strategy

func NewStrategy

func NewStrategy() *Strategy

NewStrategy is short for NewStrategyWithDefault which instantiates a new Strategy object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewStrategyEmpty

func NewStrategyEmpty() *Strategy

NewStrategyEmpty instantiates a new Strategy object with no properties set. This constructor will not assign any default values to properties.

func NewStrategyList

func NewStrategyList(ps ...*Strategy) []Strategy

NewStrategys converts a list Strategy pointers to objects. This is helpful when the SetStrategy requires a list of objects

func NewStrategyWith

func NewStrategyWith(op string) *Strategy

NewStrategyWith instantiates a new Strategy object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewStrategyWithDefault

func NewStrategyWithDefault() *Strategy

NewStrategyWithDefault instantiates a new Strategy object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Strategy) GetOp

func (o *Strategy) GetOp() string

GetOp returns the Op field value

func (*Strategy) GetOpOk

func (o *Strategy) GetOpOk() (*string, bool)

GetOpOk returns a tuple with the Op field value and a boolean to check if the value has been set.

func (*Strategy) GetRecreateFields

func (o *Strategy) GetRecreateFields() []string

GetRecreateFields returns the RecreateFields field value if set, zero value otherwise.

func (*Strategy) GetRecreateFieldsOk

func (o *Strategy) GetRecreateFieldsOk() ([]string, bool)

GetRecreateFieldsOk returns a tuple with the RecreateFields field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Strategy) HasRecreateFields

func (o *Strategy) HasRecreateFields() bool

HasRecreateFields returns a boolean if a field has been set.

func (Strategy) MarshalJSON

func (o Strategy) MarshalJSON() ([]byte, error)

func (*Strategy) SetOp

func (o *Strategy) SetOp(v string) *Strategy

SetOp sets field value

func (*Strategy) SetRecreateFields

func (o *Strategy) SetRecreateFields(v []string) *Strategy

SetRecreateFields gets a reference to the given []string and assigns it to the recreateFields field. RecreateFields: Specify which fields would trigger recreation when updated

func (Strategy) ToMap

func (o Strategy) ToMap() (map[string]interface{}, error)

func (*Strategy) Validate

func (o *Strategy) Validate() error

Validate validates this Strategy 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL