Documentation ¶
Index ¶
- Constants
- func FromTrait(from common.ApplicationTrait) (apis.Trait, error)
- type Cpu
- type Cpu1
- type Cpu2
- type Limits
- func (o *Limits) GetCpu() Cpu1
- func (o *Limits) GetCpuOk() (*Cpu1, bool)
- func (o *Limits) GetMemory() string
- func (o *Limits) GetMemoryOk() (*string, bool)
- func (o Limits) MarshalJSON() ([]byte, error)
- func (o *Limits) SetCpu(v Cpu1) *Limits
- func (o *Limits) SetMemory(v string) *Limits
- func (o Limits) ToMap() (map[string]interface{}, error)
- func (o *Limits) Validate() error
- type NullableCpu
- type NullableCpu1
- type NullableCpu2
- type NullableLimits
- type NullableRequests
- type NullableResourceSpec
- func (v *NullableResourceSpec) Get() *ResourceSpec
- func (v *NullableResourceSpec) IsSet() bool
- func (v NullableResourceSpec) MarshalJSON() ([]byte, error)
- func (v *NullableResourceSpec) Set(val *ResourceSpec)
- func (v *NullableResourceSpec) UnmarshalJSON(src []byte) error
- func (v *NullableResourceSpec) Unset()
- type Requests
- func (o *Requests) GetCpu() Cpu2
- func (o *Requests) GetCpuOk() (*Cpu2, bool)
- func (o *Requests) GetMemory() string
- func (o *Requests) GetMemoryOk() (*string, bool)
- func (o Requests) MarshalJSON() ([]byte, error)
- func (o *Requests) SetCpu(v Cpu2) *Requests
- func (o *Requests) SetMemory(v string) *Requests
- func (o Requests) ToMap() (map[string]interface{}, error)
- func (o *Requests) Validate() error
- type ResourceSpec
- type ResourceTrait
- func (r *ResourceTrait) Build() common.ApplicationTrait
- func (r *ResourceTrait) DefType() string
- func (r *ResourceTrait) FromTrait(from common.ApplicationTrait) (*ResourceTrait, error)
- func (o *ResourceTrait) GetCpu() Cpu
- func (o *ResourceTrait) GetCpuOk() (*Cpu, bool)
- func (o *ResourceTrait) GetLimits() Limits
- func (o *ResourceTrait) GetLimitsOk() (*Limits, bool)
- func (o *ResourceTrait) GetMemory() string
- func (o *ResourceTrait) GetMemoryOk() (*string, bool)
- func (o *ResourceTrait) GetRequests() Requests
- func (o *ResourceTrait) GetRequestsOk() (*Requests, bool)
- func (o *ResourceTrait) HasCpu() bool
- func (o *ResourceTrait) HasLimits() bool
- func (o *ResourceTrait) HasMemory() bool
- func (o *ResourceTrait) HasRequests() bool
- func (o *ResourceTrait) SetCpu(v Cpu) *ResourceTrait
- func (o *ResourceTrait) SetLimits(v Limits) *ResourceTrait
- func (o *ResourceTrait) SetMemory(v string) *ResourceTrait
- func (o *ResourceTrait) SetRequests(v Requests) *ResourceTrait
- func (o *ResourceTrait) Validate() error
Constants ¶
const ResourceType = "resource"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cpu ¶
Cpu - Specify the amount of cpu for requests and limits
func Float32AsCpu ¶
Float32AsCpu is is a convenience function that returns float32 wrapped in Cpu
func Float32AsCpuOrDefault ¶
Float32AsCpuOrDefault returns float32 wrapped in Cpu if not nil, or a default value if nil
func StringAsCpu ¶
StringAsCpu is is a convenience function that returns string wrapped in Cpu
func (*Cpu) GetActualInstance ¶
func (obj *Cpu) GetActualInstance() interface{}
Get the actual instance
func (Cpu) MarshalJSON ¶
Marshal data from the first non-nil pointers in the struct to JSON
func (*Cpu) UnmarshalJSON ¶
Unmarshal JSON data into one of the pointers in the struct
type Cpu1 ¶
Cpu1 - Specify the amount of cpu for limits
func Float32AsCpu1 ¶
Float32AsCpu1 is is a convenience function that returns float32 wrapped in Cpu1
func Float32AsCpu1OrDefault ¶
Float32AsCpu1OrDefault returns float32 wrapped in Cpu1 if not nil, or a default value if nil
func StringAsCpu1 ¶
StringAsCpu1 is is a convenience function that returns string wrapped in Cpu1
func (*Cpu1) GetActualInstance ¶
func (obj *Cpu1) GetActualInstance() interface{}
Get the actual instance
func (Cpu1) MarshalJSON ¶
Marshal data from the first non-nil pointers in the struct to JSON
func (*Cpu1) UnmarshalJSON ¶
Unmarshal JSON data into one of the pointers in the struct
type Cpu2 ¶
Cpu2 - Specify the amount of cpu for requests
func Float32AsCpu2 ¶
Float32AsCpu2 is is a convenience function that returns float32 wrapped in Cpu2
func Float32AsCpu2OrDefault ¶
Float32AsCpu2OrDefault returns float32 wrapped in Cpu2 if not nil, or a default value if nil
func StringAsCpu2 ¶
StringAsCpu2 is is a convenience function that returns string wrapped in Cpu2
func (*Cpu2) GetActualInstance ¶
func (obj *Cpu2) GetActualInstance() interface{}
Get the actual instance
func (Cpu2) MarshalJSON ¶
Marshal data from the first non-nil pointers in the struct to JSON
func (*Cpu2) UnmarshalJSON ¶
Unmarshal JSON data into one of the pointers in the struct
type Limits ¶
type Limits struct { Cpu *Cpu1 `json:"cpu"` // Specify the amount of memory for limits Memory *string `json:"memory"` }
Limits Specify the resources in limits
func NewLimits ¶
func NewLimits() *Limits
NewLimits is short for NewLimitsWithDefault which instantiates a new Limits 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 NewLimitsEmpty ¶
func NewLimitsEmpty() *Limits
NewLimitsEmpty instantiates a new Limits object with no properties set. This constructor will not assign any default values to properties.
func NewLimitsList ¶
NewLimitss converts a list Limits pointers to objects. This is helpful when the SetLimits requires a list of objects
func NewLimitsWith ¶
NewLimitsWith instantiates a new Limits 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 NewLimitsWithDefault ¶
func NewLimitsWithDefault() *Limits
NewLimitsWithDefault instantiates a new Limits 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 (*Limits) GetCpuOk ¶
GetCpuOk returns a tuple with the Cpu field value and a boolean to check if the value has been set.
func (*Limits) GetMemoryOk ¶
GetMemoryOk returns a tuple with the Memory field value and a boolean to check if the value has been set.
func (Limits) MarshalJSON ¶
type NullableCpu ¶
type NullableCpu struct {
// contains filtered or unexported fields
}
func NewNullableCpu ¶
func NewNullableCpu(val *Cpu) *NullableCpu
func (*NullableCpu) Get ¶
func (v *NullableCpu) Get() *Cpu
func (*NullableCpu) IsSet ¶
func (v *NullableCpu) IsSet() bool
func (NullableCpu) MarshalJSON ¶
func (v NullableCpu) MarshalJSON() ([]byte, error)
func (*NullableCpu) Set ¶
func (v *NullableCpu) Set(val *Cpu)
func (*NullableCpu) UnmarshalJSON ¶
func (v *NullableCpu) UnmarshalJSON(src []byte) error
func (*NullableCpu) Unset ¶
func (v *NullableCpu) Unset()
type NullableCpu1 ¶
type NullableCpu1 struct {
// contains filtered or unexported fields
}
func NewNullableCpu1 ¶
func NewNullableCpu1(val *Cpu1) *NullableCpu1
func (*NullableCpu1) Get ¶
func (v *NullableCpu1) Get() *Cpu1
func (*NullableCpu1) IsSet ¶
func (v *NullableCpu1) IsSet() bool
func (NullableCpu1) MarshalJSON ¶
func (v NullableCpu1) MarshalJSON() ([]byte, error)
func (*NullableCpu1) Set ¶
func (v *NullableCpu1) Set(val *Cpu1)
func (*NullableCpu1) UnmarshalJSON ¶
func (v *NullableCpu1) UnmarshalJSON(src []byte) error
func (*NullableCpu1) Unset ¶
func (v *NullableCpu1) Unset()
type NullableCpu2 ¶
type NullableCpu2 struct {
// contains filtered or unexported fields
}
func NewNullableCpu2 ¶
func NewNullableCpu2(val *Cpu2) *NullableCpu2
func (*NullableCpu2) Get ¶
func (v *NullableCpu2) Get() *Cpu2
func (*NullableCpu2) IsSet ¶
func (v *NullableCpu2) IsSet() bool
func (NullableCpu2) MarshalJSON ¶
func (v NullableCpu2) MarshalJSON() ([]byte, error)
func (*NullableCpu2) Set ¶
func (v *NullableCpu2) Set(val *Cpu2)
func (*NullableCpu2) UnmarshalJSON ¶
func (v *NullableCpu2) UnmarshalJSON(src []byte) error
func (*NullableCpu2) Unset ¶
func (v *NullableCpu2) Unset()
type NullableLimits ¶
type NullableLimits struct {
// contains filtered or unexported fields
}
func NewNullableLimits ¶
func NewNullableLimits(val *Limits) *NullableLimits
func (*NullableLimits) Get ¶
func (v *NullableLimits) Get() *Limits
func (*NullableLimits) IsSet ¶
func (v *NullableLimits) IsSet() bool
func (NullableLimits) MarshalJSON ¶
func (v NullableLimits) MarshalJSON() ([]byte, error)
func (*NullableLimits) Set ¶
func (v *NullableLimits) Set(val *Limits)
func (*NullableLimits) UnmarshalJSON ¶
func (v *NullableLimits) UnmarshalJSON(src []byte) error
func (*NullableLimits) Unset ¶
func (v *NullableLimits) Unset()
type NullableRequests ¶
type NullableRequests struct {
// contains filtered or unexported fields
}
func NewNullableRequests ¶
func NewNullableRequests(val *Requests) *NullableRequests
func (*NullableRequests) Get ¶
func (v *NullableRequests) Get() *Requests
func (*NullableRequests) IsSet ¶
func (v *NullableRequests) IsSet() bool
func (NullableRequests) MarshalJSON ¶
func (v NullableRequests) MarshalJSON() ([]byte, error)
func (*NullableRequests) Set ¶
func (v *NullableRequests) Set(val *Requests)
func (*NullableRequests) UnmarshalJSON ¶
func (v *NullableRequests) UnmarshalJSON(src []byte) error
func (*NullableRequests) Unset ¶
func (v *NullableRequests) Unset()
type NullableResourceSpec ¶
type NullableResourceSpec struct {
// contains filtered or unexported fields
}
func NewNullableResourceSpec ¶
func NewNullableResourceSpec(val *ResourceSpec) *NullableResourceSpec
func (*NullableResourceSpec) Get ¶
func (v *NullableResourceSpec) Get() *ResourceSpec
func (*NullableResourceSpec) IsSet ¶
func (v *NullableResourceSpec) IsSet() bool
func (NullableResourceSpec) MarshalJSON ¶
func (v NullableResourceSpec) MarshalJSON() ([]byte, error)
func (*NullableResourceSpec) Set ¶
func (v *NullableResourceSpec) Set(val *ResourceSpec)
func (*NullableResourceSpec) UnmarshalJSON ¶
func (v *NullableResourceSpec) UnmarshalJSON(src []byte) error
func (*NullableResourceSpec) Unset ¶
func (v *NullableResourceSpec) Unset()
type Requests ¶
type Requests struct { Cpu *Cpu2 `json:"cpu"` // Specify the amount of memory for requests Memory *string `json:"memory"` }
Requests Specify the resources in requests
func NewRequests ¶
func NewRequests() *Requests
NewRequests is short for NewRequestsWithDefault which instantiates a new Requests 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 NewRequestsEmpty ¶
func NewRequestsEmpty() *Requests
NewRequestsEmpty instantiates a new Requests object with no properties set. This constructor will not assign any default values to properties.
func NewRequestsList ¶
NewRequestss converts a list Requests pointers to objects. This is helpful when the SetRequests requires a list of objects
func NewRequestsWith ¶
NewRequestsWith instantiates a new Requests 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 NewRequestsWithDefault ¶
func NewRequestsWithDefault() *Requests
NewRequestsWithDefault instantiates a new Requests 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 (*Requests) GetCpuOk ¶
GetCpuOk returns a tuple with the Cpu field value and a boolean to check if the value has been set.
func (*Requests) GetMemoryOk ¶
GetMemoryOk returns a tuple with the Memory field value and a boolean to check if the value has been set.
func (Requests) MarshalJSON ¶
type ResourceSpec ¶
type ResourceSpec struct { Cpu *Cpu `json:"cpu,omitempty"` Limits *Limits `json:"limits,omitempty"` // Specify the amount of memory for requests and limits Memory *string `json:"memory,omitempty"` Requests *Requests `json:"requests,omitempty"` }
ResourceSpec struct for ResourceSpec
func NewResourceSpec ¶
func NewResourceSpec() *ResourceSpec
NewResourceSpec is short for NewResourceSpecWithDefault which instantiates a new ResourceSpec 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 NewResourceSpecEmpty ¶
func NewResourceSpecEmpty() *ResourceSpec
NewResourceSpecEmpty instantiates a new ResourceSpec object with no properties set. This constructor will not assign any default values to properties.
func NewResourceSpecList ¶
func NewResourceSpecList(ps ...*ResourceSpec) []ResourceSpec
NewResourceSpecs converts a list ResourceSpec pointers to objects. This is helpful when the SetResourceSpec requires a list of objects
func NewResourceSpecWith ¶
func NewResourceSpecWith() *ResourceSpec
NewResourceSpecWith instantiates a new ResourceSpec 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 NewResourceSpecWithDefault ¶
func NewResourceSpecWithDefault() *ResourceSpec
NewResourceSpecWithDefault instantiates a new ResourceSpec 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 (ResourceSpec) MarshalJSON ¶
func (o ResourceSpec) MarshalJSON() ([]byte, error)
func (ResourceSpec) ToMap ¶
func (o ResourceSpec) ToMap() (map[string]interface{}, error)
type ResourceTrait ¶
type ResourceTrait struct { Base apis.TraitBase Properties ResourceSpec }
func Resource ¶
func Resource() *ResourceTrait
func (*ResourceTrait) Build ¶
func (r *ResourceTrait) Build() common.ApplicationTrait
func (*ResourceTrait) DefType ¶
func (r *ResourceTrait) DefType() string
func (*ResourceTrait) FromTrait ¶
func (r *ResourceTrait) FromTrait(from common.ApplicationTrait) (*ResourceTrait, error)
func (*ResourceTrait) GetCpu ¶
func (o *ResourceTrait) GetCpu() Cpu
GetCpu returns the Cpu field value if set, zero value otherwise.
func (*ResourceTrait) GetCpuOk ¶
func (o *ResourceTrait) GetCpuOk() (*Cpu, bool)
GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise and a boolean to check if the value has been set.
func (*ResourceTrait) GetLimits ¶
func (o *ResourceTrait) GetLimits() Limits
GetLimits returns the Limits field value if set, zero value otherwise.
func (*ResourceTrait) GetLimitsOk ¶
func (o *ResourceTrait) GetLimitsOk() (*Limits, bool)
GetLimitsOk returns a tuple with the Limits field value if set, nil otherwise and a boolean to check if the value has been set.
func (*ResourceTrait) GetMemory ¶
func (o *ResourceTrait) GetMemory() string
GetMemory returns the Memory field value if set, zero value otherwise.
func (*ResourceTrait) GetMemoryOk ¶
func (o *ResourceTrait) GetMemoryOk() (*string, bool)
GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise and a boolean to check if the value has been set.
func (*ResourceTrait) GetRequests ¶
func (o *ResourceTrait) GetRequests() Requests
GetRequests returns the Requests field value if set, zero value otherwise.
func (*ResourceTrait) GetRequestsOk ¶
func (o *ResourceTrait) GetRequestsOk() (*Requests, bool)
GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise and a boolean to check if the value has been set.
func (*ResourceTrait) HasCpu ¶
func (o *ResourceTrait) HasCpu() bool
HasCpu returns a boolean if a field has been set.
func (*ResourceTrait) HasLimits ¶
func (o *ResourceTrait) HasLimits() bool
HasLimits returns a boolean if a field has been set.
func (*ResourceTrait) HasMemory ¶
func (o *ResourceTrait) HasMemory() bool
HasMemory returns a boolean if a field has been set.
func (*ResourceTrait) HasRequests ¶
func (o *ResourceTrait) HasRequests() bool
HasRequests returns a boolean if a field has been set.
func (*ResourceTrait) SetCpu ¶
func (o *ResourceTrait) SetCpu(v Cpu) *ResourceTrait
SetCpu gets a reference to the given Cpu and assigns it to the cpu field. Cpu:
func (*ResourceTrait) SetLimits ¶
func (o *ResourceTrait) SetLimits(v Limits) *ResourceTrait
SetLimits gets a reference to the given Limits and assigns it to the limits field. Limits:
func (*ResourceTrait) SetMemory ¶
func (o *ResourceTrait) SetMemory(v string) *ResourceTrait
SetMemory gets a reference to the given string and assigns it to the memory field. Memory: Specify the amount of memory for requests and limits
func (*ResourceTrait) SetRequests ¶
func (o *ResourceTrait) SetRequests(v Requests) *ResourceTrait
SetRequests gets a reference to the given Requests and assigns it to the requests field. Requests:
func (*ResourceTrait) Validate ¶
func (o *ResourceTrait) Validate() error
Validate validates this ResourceSpec 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