read_only

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 ReadOnlyType = "read-only"

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 NullableReadOnlySpec

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

func NewNullableReadOnlySpec

func NewNullableReadOnlySpec(val *ReadOnlySpec) *NullableReadOnlySpec

func (*NullableReadOnlySpec) Get

func (*NullableReadOnlySpec) IsSet

func (v *NullableReadOnlySpec) IsSet() bool

func (NullableReadOnlySpec) MarshalJSON

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

func (*NullableReadOnlySpec) Set

func (v *NullableReadOnlySpec) Set(val *ReadOnlySpec)

func (*NullableReadOnlySpec) UnmarshalJSON

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

func (*NullableReadOnlySpec) Unset

func (v *NullableReadOnlySpec) 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 PolicyRule

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

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) *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) MarshalJSON

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

func (*PolicyRule) SetSelector

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

SetSelector 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 ReadOnlyPolicy

type ReadOnlyPolicy struct {
	Base       apis.PolicyBase
	Properties ReadOnlySpec
}

func ReadOnly

func ReadOnly(name string) *ReadOnlyPolicy

func (*ReadOnlyPolicy) Build

func (r *ReadOnlyPolicy) Build() v1beta1.AppPolicy

func (*ReadOnlyPolicy) DefType

func (r *ReadOnlyPolicy) DefType() string

func (*ReadOnlyPolicy) FromPolicy

func (r *ReadOnlyPolicy) FromPolicy(from v1beta1.AppPolicy) (*ReadOnlyPolicy, error)

func (*ReadOnlyPolicy) GetRules

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

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

func (*ReadOnlyPolicy) GetRulesOk

func (o *ReadOnlyPolicy) 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 (*ReadOnlyPolicy) HasRules

func (o *ReadOnlyPolicy) HasRules() bool

HasRules returns a boolean if a field has been set.

func (*ReadOnlyPolicy) PolicyName

func (r *ReadOnlyPolicy) PolicyName() string

func (*ReadOnlyPolicy) SetRules

func (o *ReadOnlyPolicy) SetRules(v []PolicyRule) *ReadOnlyPolicy

SetRules gets a reference to the given []PolicyRule and assigns it to the rules field. Rules: Specify the list of rules to control read only strategy at resource level. The selected resource will be read-only to the current application. If the target resource does not exist, error will be raised.

func (*ReadOnlyPolicy) Validate

func (o *ReadOnlyPolicy) Validate() error

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

type ReadOnlySpec struct {
	// Specify the list of rules to control read only strategy at resource level. The selected resource will be read-only to the current application. If the target resource does not exist, error will be raised.
	Rules []PolicyRule `json:"rules,omitempty"`
}

ReadOnlySpec struct for ReadOnlySpec

func NewReadOnlySpec

func NewReadOnlySpec() *ReadOnlySpec

NewReadOnlySpec is short for NewReadOnlySpecWithDefault which instantiates a new ReadOnlySpec 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 NewReadOnlySpecEmpty

func NewReadOnlySpecEmpty() *ReadOnlySpec

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

func NewReadOnlySpecList

func NewReadOnlySpecList(ps ...*ReadOnlySpec) []ReadOnlySpec

NewReadOnlySpecs converts a list ReadOnlySpec pointers to objects. This is helpful when the SetReadOnlySpec requires a list of objects

func NewReadOnlySpecWith

func NewReadOnlySpecWith() *ReadOnlySpec

NewReadOnlySpecWith instantiates a new ReadOnlySpec 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 NewReadOnlySpecWithDefault

func NewReadOnlySpecWithDefault() *ReadOnlySpec

NewReadOnlySpecWithDefault instantiates a new ReadOnlySpec 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 (ReadOnlySpec) MarshalJSON

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

func (ReadOnlySpec) ToMap

func (o ReadOnlySpec) 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

Jump to

Keyboard shortcuts

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