apply_once

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 ApplyOnceType = "apply-once"

Variables

This section is empty.

Functions

func FromPolicy

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

Types

type ApplyOncePolicy

type ApplyOncePolicy struct {
	Base       apis.PolicyBase
	Properties ApplyOnceSpec
}

func ApplyOnce

func ApplyOnce(name string) *ApplyOncePolicy

func (*ApplyOncePolicy) Build

func (a *ApplyOncePolicy) Build() v1beta1.AppPolicy

func (*ApplyOncePolicy) DefType

func (a *ApplyOncePolicy) DefType() string

func (*ApplyOncePolicy) FromPolicy

func (a *ApplyOncePolicy) FromPolicy(from v1beta1.AppPolicy) (*ApplyOncePolicy, error)

func (*ApplyOncePolicy) GetEnable

func (o *ApplyOncePolicy) GetEnable() bool

GetEnable returns the Enable field value

func (*ApplyOncePolicy) GetEnableOk

func (o *ApplyOncePolicy) GetEnableOk() (*bool, bool)

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

func (*ApplyOncePolicy) GetRules

func (o *ApplyOncePolicy) GetRules() []ApplyOncePolicyRule

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

func (*ApplyOncePolicy) GetRulesOk

func (o *ApplyOncePolicy) GetRulesOk() ([]ApplyOncePolicyRule, 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 (*ApplyOncePolicy) HasRules

func (o *ApplyOncePolicy) HasRules() bool

HasRules returns a boolean if a field has been set.

func (*ApplyOncePolicy) PolicyName

func (a *ApplyOncePolicy) PolicyName() string

func (*ApplyOncePolicy) SetEnable

func (o *ApplyOncePolicy) SetEnable(v bool) *ApplyOncePolicy

SetEnable sets field value

func (*ApplyOncePolicy) SetRules

SetRules gets a reference to the given []ApplyOncePolicyRule and assigns it to the rules field. Rules: Specify the rules for configuring apply-once policy in resource level

func (*ApplyOncePolicy) Validate

func (o *ApplyOncePolicy) Validate() error

Validate validates this ApplyOnceSpec 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 ApplyOncePolicyRule

type ApplyOncePolicyRule struct {
	Selector *ResourcePolicyRuleSelector `json:"selector,omitempty"`
	Strategy *ApplyOnceStrategy          `json:"strategy"`
}

ApplyOncePolicyRule struct for ApplyOncePolicyRule

func NewApplyOncePolicyRule

func NewApplyOncePolicyRule() *ApplyOncePolicyRule

NewApplyOncePolicyRule is short for NewApplyOncePolicyRuleWithDefault which instantiates a new ApplyOncePolicyRule 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 NewApplyOncePolicyRuleEmpty

func NewApplyOncePolicyRuleEmpty() *ApplyOncePolicyRule

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

func NewApplyOncePolicyRuleList

func NewApplyOncePolicyRuleList(ps ...*ApplyOncePolicyRule) []ApplyOncePolicyRule

NewApplyOncePolicyRules converts a list ApplyOncePolicyRule pointers to objects. This is helpful when the SetApplyOncePolicyRule requires a list of objects

func NewApplyOncePolicyRuleWith

func NewApplyOncePolicyRuleWith(strategy ApplyOnceStrategy) *ApplyOncePolicyRule

NewApplyOncePolicyRuleWith instantiates a new ApplyOncePolicyRule 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 NewApplyOncePolicyRuleWithDefault

func NewApplyOncePolicyRuleWithDefault() *ApplyOncePolicyRule

NewApplyOncePolicyRuleWithDefault instantiates a new ApplyOncePolicyRule 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 (*ApplyOncePolicyRule) GetSelector

GetSelector returns the Selector field value if set, zero value otherwise.

func (*ApplyOncePolicyRule) GetSelectorOk

func (o *ApplyOncePolicyRule) GetSelectorOk() (*ResourcePolicyRuleSelector, bool)

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

func (*ApplyOncePolicyRule) GetStrategy

func (o *ApplyOncePolicyRule) GetStrategy() ApplyOnceStrategy

GetStrategy returns the Strategy field value

func (*ApplyOncePolicyRule) GetStrategyOk

func (o *ApplyOncePolicyRule) GetStrategyOk() (*ApplyOnceStrategy, bool)

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

func (*ApplyOncePolicyRule) HasSelector

func (o *ApplyOncePolicyRule) HasSelector() bool

HasSelector returns a boolean if a field has been set.

func (ApplyOncePolicyRule) MarshalJSON

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

func (*ApplyOncePolicyRule) SetSelector

SetSelector gets a reference to the given ResourcePolicyRuleSelector and assigns it to the selector field. Selector:

func (*ApplyOncePolicyRule) SetStrategy

SetStrategy sets field value

func (ApplyOncePolicyRule) ToMap

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

func (*ApplyOncePolicyRule) Validate

func (o *ApplyOncePolicyRule) Validate() error

Validate validates this ApplyOncePolicyRule 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 ApplyOnceSpec

type ApplyOnceSpec struct {
	// Whether to enable apply-once for the whole application
	Enable *bool `json:"enable"`
	// Specify the rules for configuring apply-once policy in resource level
	Rules []ApplyOncePolicyRule `json:"rules,omitempty"`
}

ApplyOnceSpec struct for ApplyOnceSpec

func NewApplyOnceSpec

func NewApplyOnceSpec() *ApplyOnceSpec

NewApplyOnceSpec is short for NewApplyOnceSpecWithDefault which instantiates a new ApplyOnceSpec 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 NewApplyOnceSpecEmpty

func NewApplyOnceSpecEmpty() *ApplyOnceSpec

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

func NewApplyOnceSpecList

func NewApplyOnceSpecList(ps ...*ApplyOnceSpec) []ApplyOnceSpec

NewApplyOnceSpecs converts a list ApplyOnceSpec pointers to objects. This is helpful when the SetApplyOnceSpec requires a list of objects

func NewApplyOnceSpecWith

func NewApplyOnceSpecWith(enable bool) *ApplyOnceSpec

NewApplyOnceSpecWith instantiates a new ApplyOnceSpec 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 NewApplyOnceSpecWithDefault

func NewApplyOnceSpecWithDefault() *ApplyOnceSpec

NewApplyOnceSpecWithDefault instantiates a new ApplyOnceSpec 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 (ApplyOnceSpec) MarshalJSON

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

func (ApplyOnceSpec) ToMap

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

type ApplyOnceStrategy

type ApplyOnceStrategy struct {
	// When the strategy takes effect,e.g. onUpdate、onStateKeep
	Affect *string `json:"affect,omitempty"`
	// Specify the path of the resource that allow configuration drift
	Path []string `json:"path"`
}

ApplyOnceStrategy struct for ApplyOnceStrategy

func NewApplyOnceStrategy

func NewApplyOnceStrategy() *ApplyOnceStrategy

NewApplyOnceStrategy is short for NewApplyOnceStrategyWithDefault which instantiates a new ApplyOnceStrategy 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 NewApplyOnceStrategyEmpty

func NewApplyOnceStrategyEmpty() *ApplyOnceStrategy

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

func NewApplyOnceStrategyList

func NewApplyOnceStrategyList(ps ...*ApplyOnceStrategy) []ApplyOnceStrategy

NewApplyOnceStrategys converts a list ApplyOnceStrategy pointers to objects. This is helpful when the SetApplyOnceStrategy requires a list of objects

func NewApplyOnceStrategyWith

func NewApplyOnceStrategyWith(path []string) *ApplyOnceStrategy

NewApplyOnceStrategyWith instantiates a new ApplyOnceStrategy 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 NewApplyOnceStrategyWithDefault

func NewApplyOnceStrategyWithDefault() *ApplyOnceStrategy

NewApplyOnceStrategyWithDefault instantiates a new ApplyOnceStrategy 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 (*ApplyOnceStrategy) GetAffect

func (o *ApplyOnceStrategy) GetAffect() string

GetAffect returns the Affect field value if set, zero value otherwise.

func (*ApplyOnceStrategy) GetAffectOk

func (o *ApplyOnceStrategy) GetAffectOk() (*string, bool)

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

func (*ApplyOnceStrategy) GetPath

func (o *ApplyOnceStrategy) GetPath() []string

GetPath returns the Path field value

func (*ApplyOnceStrategy) GetPathOk

func (o *ApplyOnceStrategy) GetPathOk() ([]string, bool)

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

func (*ApplyOnceStrategy) HasAffect

func (o *ApplyOnceStrategy) HasAffect() bool

HasAffect returns a boolean if a field has been set.

func (ApplyOnceStrategy) MarshalJSON

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

func (*ApplyOnceStrategy) SetAffect

func (o *ApplyOnceStrategy) SetAffect(v string) *ApplyOnceStrategy

SetAffect gets a reference to the given string and assigns it to the affect field. Affect: When the strategy takes effect,e.g. onUpdate、onStateKeep

func (*ApplyOnceStrategy) SetPath

func (o *ApplyOnceStrategy) SetPath(v []string) *ApplyOnceStrategy

SetPath sets field value

func (ApplyOnceStrategy) ToMap

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

func (*ApplyOnceStrategy) Validate

func (o *ApplyOnceStrategy) Validate() error

Validate validates this ApplyOnceStrategy 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 NullableApplyOncePolicyRule

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

func NewNullableApplyOncePolicyRule

func NewNullableApplyOncePolicyRule(val *ApplyOncePolicyRule) *NullableApplyOncePolicyRule

func (*NullableApplyOncePolicyRule) Get

func (*NullableApplyOncePolicyRule) IsSet

func (v *NullableApplyOncePolicyRule) IsSet() bool

func (NullableApplyOncePolicyRule) MarshalJSON

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

func (*NullableApplyOncePolicyRule) Set

func (*NullableApplyOncePolicyRule) UnmarshalJSON

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

func (*NullableApplyOncePolicyRule) Unset

func (v *NullableApplyOncePolicyRule) Unset()

type NullableApplyOnceSpec

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

func NewNullableApplyOnceSpec

func NewNullableApplyOnceSpec(val *ApplyOnceSpec) *NullableApplyOnceSpec

func (*NullableApplyOnceSpec) Get

func (*NullableApplyOnceSpec) IsSet

func (v *NullableApplyOnceSpec) IsSet() bool

func (NullableApplyOnceSpec) MarshalJSON

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

func (*NullableApplyOnceSpec) Set

func (v *NullableApplyOnceSpec) Set(val *ApplyOnceSpec)

func (*NullableApplyOnceSpec) UnmarshalJSON

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

func (*NullableApplyOnceSpec) Unset

func (v *NullableApplyOnceSpec) Unset()

type NullableApplyOnceStrategy

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

func NewNullableApplyOnceStrategy

func NewNullableApplyOnceStrategy(val *ApplyOnceStrategy) *NullableApplyOnceStrategy

func (*NullableApplyOnceStrategy) Get

func (*NullableApplyOnceStrategy) IsSet

func (v *NullableApplyOnceStrategy) IsSet() bool

func (NullableApplyOnceStrategy) MarshalJSON

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

func (*NullableApplyOnceStrategy) Set

func (*NullableApplyOnceStrategy) UnmarshalJSON

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

func (*NullableApplyOnceStrategy) Unset

func (v *NullableApplyOnceStrategy) Unset()

type NullableResourcePolicyRuleSelector

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

func (*NullableResourcePolicyRuleSelector) Get

func (*NullableResourcePolicyRuleSelector) IsSet

func (NullableResourcePolicyRuleSelector) MarshalJSON

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

func (*NullableResourcePolicyRuleSelector) Set

func (*NullableResourcePolicyRuleSelector) UnmarshalJSON

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

func (*NullableResourcePolicyRuleSelector) Unset

type ResourcePolicyRuleSelector

type ResourcePolicyRuleSelector 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"`
}

ResourcePolicyRuleSelector struct for ResourcePolicyRuleSelector

func NewResourcePolicyRuleSelector

func NewResourcePolicyRuleSelector() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelector is short for NewResourcePolicyRuleSelectorWithDefault which instantiates a new ResourcePolicyRuleSelector 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 NewResourcePolicyRuleSelectorEmpty

func NewResourcePolicyRuleSelectorEmpty() *ResourcePolicyRuleSelector

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

func NewResourcePolicyRuleSelectorList

func NewResourcePolicyRuleSelectorList(ps ...*ResourcePolicyRuleSelector) []ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectors converts a list ResourcePolicyRuleSelector pointers to objects. This is helpful when the SetResourcePolicyRuleSelector requires a list of objects

func NewResourcePolicyRuleSelectorWith

func NewResourcePolicyRuleSelectorWith() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectorWith instantiates a new ResourcePolicyRuleSelector 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 NewResourcePolicyRuleSelectorWithDefault

func NewResourcePolicyRuleSelectorWithDefault() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectorWithDefault instantiates a new ResourcePolicyRuleSelector 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 (*ResourcePolicyRuleSelector) GetComponentNames

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

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

func (*ResourcePolicyRuleSelector) GetComponentNamesOk

func (o *ResourcePolicyRuleSelector) 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 (*ResourcePolicyRuleSelector) GetComponentTypes

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

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

func (*ResourcePolicyRuleSelector) GetComponentTypesOk

func (o *ResourcePolicyRuleSelector) 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 (*ResourcePolicyRuleSelector) GetOamTypes

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

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

func (*ResourcePolicyRuleSelector) GetOamTypesOk

func (o *ResourcePolicyRuleSelector) 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 (*ResourcePolicyRuleSelector) GetResourceNames

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

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

func (*ResourcePolicyRuleSelector) GetResourceNamesOk

func (o *ResourcePolicyRuleSelector) 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 (*ResourcePolicyRuleSelector) GetResourceTypes

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

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

func (*ResourcePolicyRuleSelector) GetResourceTypesOk

func (o *ResourcePolicyRuleSelector) 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 (*ResourcePolicyRuleSelector) GetTraitTypes

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

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

func (*ResourcePolicyRuleSelector) GetTraitTypesOk

func (o *ResourcePolicyRuleSelector) 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 (*ResourcePolicyRuleSelector) HasComponentNames

func (o *ResourcePolicyRuleSelector) HasComponentNames() bool

HasComponentNames returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasComponentTypes

func (o *ResourcePolicyRuleSelector) HasComponentTypes() bool

HasComponentTypes returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasOamTypes

func (o *ResourcePolicyRuleSelector) HasOamTypes() bool

HasOamTypes returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasResourceNames

func (o *ResourcePolicyRuleSelector) HasResourceNames() bool

HasResourceNames returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasResourceTypes

func (o *ResourcePolicyRuleSelector) HasResourceTypes() bool

HasResourceTypes returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasTraitTypes

func (o *ResourcePolicyRuleSelector) HasTraitTypes() bool

HasTraitTypes returns a boolean if a field has been set.

func (ResourcePolicyRuleSelector) MarshalJSON

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

func (*ResourcePolicyRuleSelector) SetComponentNames

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

func (*ResourcePolicyRuleSelector) SetComponentTypes

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

func (*ResourcePolicyRuleSelector) SetOamTypes

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

func (*ResourcePolicyRuleSelector) SetResourceNames

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

func (*ResourcePolicyRuleSelector) SetResourceTypes

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

func (*ResourcePolicyRuleSelector) SetTraitTypes

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

func (ResourcePolicyRuleSelector) ToMap

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

func (*ResourcePolicyRuleSelector) Validate

func (o *ResourcePolicyRuleSelector) Validate() error

Validate validates this ResourcePolicyRuleSelector 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