override

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 OverrideType = "override"

Variables

This section is empty.

Functions

func FromPolicy

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

Types

type NullableOverrideSpec

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

func NewNullableOverrideSpec

func NewNullableOverrideSpec(val *OverrideSpec) *NullableOverrideSpec

func (*NullableOverrideSpec) Get

func (*NullableOverrideSpec) IsSet

func (v *NullableOverrideSpec) IsSet() bool

func (NullableOverrideSpec) MarshalJSON

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

func (*NullableOverrideSpec) Set

func (v *NullableOverrideSpec) Set(val *OverrideSpec)

func (*NullableOverrideSpec) UnmarshalJSON

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

func (*NullableOverrideSpec) Unset

func (v *NullableOverrideSpec) Unset()

type NullablePatchParams

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

func NewNullablePatchParams

func NewNullablePatchParams(val *PatchParams) *NullablePatchParams

func (*NullablePatchParams) Get

func (v *NullablePatchParams) Get() *PatchParams

func (*NullablePatchParams) IsSet

func (v *NullablePatchParams) IsSet() bool

func (NullablePatchParams) MarshalJSON

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

func (*NullablePatchParams) Set

func (v *NullablePatchParams) Set(val *PatchParams)

func (*NullablePatchParams) UnmarshalJSON

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

func (*NullablePatchParams) Unset

func (v *NullablePatchParams) Unset()

type NullableTraits

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

func NewNullableTraits

func NewNullableTraits(val *Traits) *NullableTraits

func (*NullableTraits) Get

func (v *NullableTraits) Get() *Traits

func (*NullableTraits) IsSet

func (v *NullableTraits) IsSet() bool

func (NullableTraits) MarshalJSON

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

func (*NullableTraits) Set

func (v *NullableTraits) Set(val *Traits)

func (*NullableTraits) UnmarshalJSON

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

func (*NullableTraits) Unset

func (v *NullableTraits) Unset()

type OverridePolicy

type OverridePolicy struct {
	Base       apis.PolicyBase
	Properties OverrideSpec
}

func Override

func Override(name string) *OverridePolicy

func (*OverridePolicy) Build

func (o *OverridePolicy) Build() v1beta1.AppPolicy

func (*OverridePolicy) DefType

func (o *OverridePolicy) DefType() string

func (*OverridePolicy) FromPolicy

func (o *OverridePolicy) FromPolicy(from v1beta1.AppPolicy) (*OverridePolicy, error)

func (*OverridePolicy) GetComponents

func (o *OverridePolicy) GetComponents() []PatchParams

GetComponents returns the Components field value

func (*OverridePolicy) GetComponentsOk

func (o *OverridePolicy) GetComponentsOk() ([]PatchParams, bool)

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

func (*OverridePolicy) GetSelector

func (o *OverridePolicy) GetSelector() []string

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

func (*OverridePolicy) GetSelectorOk

func (o *OverridePolicy) GetSelectorOk() ([]string, 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 (*OverridePolicy) HasSelector

func (o *OverridePolicy) HasSelector() bool

HasSelector returns a boolean if a field has been set.

func (*OverridePolicy) PolicyName

func (o *OverridePolicy) PolicyName() string

func (*OverridePolicy) SetComponents

func (o *OverridePolicy) SetComponents(v []PatchParams) *OverridePolicy

SetComponents sets field value

func (*OverridePolicy) SetSelector

func (o *OverridePolicy) SetSelector(v []string) *OverridePolicy

SetSelector gets a reference to the given []string and assigns it to the selector field. Selector: Specify a list of component names to use, if empty, all components will be selected.

func (*OverridePolicy) Validate

func (o *OverridePolicy) Validate() error

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

type OverrideSpec struct {
	// Specify the overridden component configuration.
	Components []PatchParams `json:"components"`
	// Specify a list of component names to use, if empty, all components will be selected.
	Selector []string `json:"selector,omitempty"`
}

OverrideSpec struct for OverrideSpec

func NewOverrideSpec

func NewOverrideSpec() *OverrideSpec

NewOverrideSpec is short for NewOverrideSpecWithDefault which instantiates a new OverrideSpec 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 NewOverrideSpecEmpty

func NewOverrideSpecEmpty() *OverrideSpec

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

func NewOverrideSpecList

func NewOverrideSpecList(ps ...*OverrideSpec) []OverrideSpec

NewOverrideSpecs converts a list OverrideSpec pointers to objects. This is helpful when the SetOverrideSpec requires a list of objects

func NewOverrideSpecWith

func NewOverrideSpecWith(components []PatchParams) *OverrideSpec

NewOverrideSpecWith instantiates a new OverrideSpec 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 NewOverrideSpecWithDefault

func NewOverrideSpecWithDefault() *OverrideSpec

NewOverrideSpecWithDefault instantiates a new OverrideSpec 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 (OverrideSpec) MarshalJSON

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

func (OverrideSpec) ToMap

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

type PatchParams

type PatchParams struct {
	// Specify the name of the patch component, if empty, all components will be merged
	Name *string `json:"name,omitempty"`
	// Specify the properties to override.
	Properties map[string]interface{} `json:"properties,omitempty"`
	// Specify the traits to override.
	Traits []Traits `json:"traits,omitempty"`
	// Specify the type of the patch component.
	Type *string `json:"type,omitempty"`
}

PatchParams struct for PatchParams

func NewPatchParams

func NewPatchParams() *PatchParams

NewPatchParams is short for NewPatchParamsWithDefault which instantiates a new PatchParams 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 NewPatchParamsEmpty

func NewPatchParamsEmpty() *PatchParams

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

func NewPatchParamsList

func NewPatchParamsList(ps ...*PatchParams) []PatchParams

NewPatchParamss converts a list PatchParams pointers to objects. This is helpful when the SetPatchParams requires a list of objects

func NewPatchParamsWith

func NewPatchParamsWith() *PatchParams

NewPatchParamsWith instantiates a new PatchParams 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 NewPatchParamsWithDefault

func NewPatchParamsWithDefault() *PatchParams

NewPatchParamsWithDefault instantiates a new PatchParams 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 (*PatchParams) GetName

func (o *PatchParams) GetName() string

GetName returns the Name field value if set, zero value otherwise.

func (*PatchParams) GetNameOk

func (o *PatchParams) GetNameOk() (*string, bool)

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

func (*PatchParams) GetProperties

func (o *PatchParams) GetProperties() map[string]interface{}

GetProperties returns the Properties field value if set, zero value otherwise.

func (*PatchParams) GetPropertiesOk

func (o *PatchParams) GetPropertiesOk() (map[string]interface{}, bool)

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

func (*PatchParams) GetTraits

func (o *PatchParams) GetTraits() []Traits

GetTraits returns the Traits field value if set, zero value otherwise.

func (*PatchParams) GetTraitsOk

func (o *PatchParams) GetTraitsOk() ([]Traits, bool)

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

func (*PatchParams) GetType

func (o *PatchParams) GetType() string

GetType returns the Type field value if set, zero value otherwise.

func (*PatchParams) GetTypeOk

func (o *PatchParams) GetTypeOk() (*string, bool)

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

func (*PatchParams) HasName

func (o *PatchParams) HasName() bool

HasName returns a boolean if a field has been set.

func (*PatchParams) HasProperties

func (o *PatchParams) HasProperties() bool

HasProperties returns a boolean if a field has been set.

func (*PatchParams) HasTraits

func (o *PatchParams) HasTraits() bool

HasTraits returns a boolean if a field has been set.

func (*PatchParams) HasType

func (o *PatchParams) HasType() bool

HasType returns a boolean if a field has been set.

func (PatchParams) MarshalJSON

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

func (*PatchParams) SetName

func (o *PatchParams) SetName(v string) *PatchParams

SetName gets a reference to the given string and assigns it to the name field. Name: Specify the name of the patch component, if empty, all components will be merged

func (*PatchParams) SetProperties

func (o *PatchParams) SetProperties(v map[string]interface{}) *PatchParams

SetProperties gets a reference to the given map[string]interface{} and assigns it to the properties field. Properties: Specify the properties to override.

func (*PatchParams) SetTraits

func (o *PatchParams) SetTraits(v []Traits) *PatchParams

SetTraits gets a reference to the given []Traits and assigns it to the traits field. Traits: Specify the traits to override.

func (*PatchParams) SetType

func (o *PatchParams) SetType(v string) *PatchParams

SetType gets a reference to the given string and assigns it to the type_ field. Type: Specify the type of the patch component.

func (PatchParams) ToMap

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

func (*PatchParams) Validate

func (o *PatchParams) Validate() error

Validate validates this PatchParams 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 Traits

type Traits struct {
	// Specify if the trait should be remove, default false
	Disable *bool `json:"disable"`
	// Specify the properties to override.
	Properties map[string]interface{} `json:"properties,omitempty"`
	// Specify the type of the trait to be patched.
	Type *string `json:"type"`
}

Traits struct for Traits

func NewTraits

func NewTraits() *Traits

NewTraits is short for NewTraitsWithDefault which instantiates a new Traits 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 NewTraitsEmpty

func NewTraitsEmpty() *Traits

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

func NewTraitsList

func NewTraitsList(ps ...*Traits) []Traits

NewTraitss converts a list Traits pointers to objects. This is helpful when the SetTraits requires a list of objects

func NewTraitsWith

func NewTraitsWith(disable bool, type_ string) *Traits

NewTraitsWith instantiates a new Traits 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 NewTraitsWithDefault

func NewTraitsWithDefault() *Traits

NewTraitsWithDefault instantiates a new Traits 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 (*Traits) GetDisable

func (o *Traits) GetDisable() bool

GetDisable returns the Disable field value

func (*Traits) GetDisableOk

func (o *Traits) GetDisableOk() (*bool, bool)

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

func (*Traits) GetProperties

func (o *Traits) GetProperties() map[string]interface{}

GetProperties returns the Properties field value if set, zero value otherwise.

func (*Traits) GetPropertiesOk

func (o *Traits) GetPropertiesOk() (map[string]interface{}, bool)

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

func (*Traits) GetType

func (o *Traits) GetType() string

GetType returns the Type field value

func (*Traits) GetTypeOk

func (o *Traits) GetTypeOk() (*string, bool)

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

func (*Traits) HasProperties

func (o *Traits) HasProperties() bool

HasProperties returns a boolean if a field has been set.

func (Traits) MarshalJSON

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

func (*Traits) SetDisable

func (o *Traits) SetDisable(v bool) *Traits

SetDisable sets field value

func (*Traits) SetProperties

func (o *Traits) SetProperties(v map[string]interface{}) *Traits

SetProperties gets a reference to the given map[string]interface{} and assigns it to the properties field. Properties: Specify the properties to override.

func (*Traits) SetType

func (o *Traits) SetType(v string) *Traits

SetType sets field value

func (Traits) ToMap

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

func (*Traits) Validate

func (o *Traits) Validate() error

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