Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the metering v1 API group +kubebuilder:object:generate=true +groupName=metering.common.sealos.io
Index ¶
- Constants
- Variables
- func GetExtensionResourcePriceName(resourceControllerName string) string
- type ExtensionResourcePrice
- type ExtensionResourcePriceList
- type ExtensionResourcePriceSpec
- type ExtensionResourcePriceStatus
- type GroupVersionKind
- type Resource
- type ResourceInfo
- type ResourceInfoList
- type ResourceList
- type ResourcePrice
- type ResourcePriceAndUsed
- type ResourceSpec
- type ResourceStatus
- type Status
Constants ¶
const ExtensionResourcePricePrefix = "extensionresourceprice-"
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "metering.common.sealos.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
Types ¶
type ExtensionResourcePrice ¶
type ExtensionResourcePrice struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ExtensionResourcePriceSpec `json:"spec,omitempty"` Status ExtensionResourcePriceStatus `json:"status,omitempty"` }
ExtensionResourcePrice is the Schema for the extensionresourceprices API
func (*ExtensionResourcePrice) DeepCopy ¶
func (in *ExtensionResourcePrice) DeepCopy() *ExtensionResourcePrice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePrice.
func (*ExtensionResourcePrice) DeepCopyInto ¶
func (in *ExtensionResourcePrice) DeepCopyInto(out *ExtensionResourcePrice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExtensionResourcePrice) DeepCopyObject ¶
func (in *ExtensionResourcePrice) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExtensionResourcePriceList ¶
type ExtensionResourcePriceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ExtensionResourcePrice `json:"items"` }
ExtensionResourcePriceList contains a list of ExtensionResourcePrice
func (*ExtensionResourcePriceList) DeepCopy ¶
func (in *ExtensionResourcePriceList) DeepCopy() *ExtensionResourcePriceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePriceList.
func (*ExtensionResourcePriceList) DeepCopyInto ¶
func (in *ExtensionResourcePriceList) DeepCopyInto(out *ExtensionResourcePriceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExtensionResourcePriceList) DeepCopyObject ¶
func (in *ExtensionResourcePriceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExtensionResourcePriceSpec ¶
type ExtensionResourcePriceSpec struct { ResourceName string `json:"resourceName,omitempty"` Resources map[v1.ResourceName]ResourcePrice `json:"resources,omitempty"` GroupVersionKinds []GroupVersionKind `json:"groupVersionKinds"` }
ExtensionResourcePriceSpec defines the desired state of ExtensionResourcePrice
func (*ExtensionResourcePriceSpec) DeepCopy ¶
func (in *ExtensionResourcePriceSpec) DeepCopy() *ExtensionResourcePriceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePriceSpec.
func (*ExtensionResourcePriceSpec) DeepCopyInto ¶
func (in *ExtensionResourcePriceSpec) DeepCopyInto(out *ExtensionResourcePriceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtensionResourcePriceStatus ¶
type ExtensionResourcePriceStatus struct { }
ExtensionResourcePriceStatus defines the observed state of ExtensionResourcePrice
func (*ExtensionResourcePriceStatus) DeepCopy ¶
func (in *ExtensionResourcePriceStatus) DeepCopy() *ExtensionResourcePriceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePriceStatus.
func (*ExtensionResourcePriceStatus) DeepCopyInto ¶
func (in *ExtensionResourcePriceStatus) DeepCopyInto(out *ExtensionResourcePriceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GroupVersionKind ¶
type Resource ¶
type Resource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ResourceSpec `json:"spec,omitempty"` Status ResourceStatus `json:"status,omitempty"` }
Resource is the Schema for the resources API
func (*Resource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Resource) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceInfo ¶
type ResourceInfo struct { ResourceName string `json:"resourceName,omitempty"` Used *resource.Quantity `json:"used,omitempty"` Timestamp int64 `json:"time,omitempty"` Namespace string `json:"namespace,omitempty"` Cost int64 `json:"cost,omitempty"` }
func (*ResourceInfo) DeepCopy ¶
func (in *ResourceInfo) DeepCopy() *ResourceInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInfo.
func (*ResourceInfo) DeepCopyInto ¶
func (in *ResourceInfo) DeepCopyInto(out *ResourceInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInfoList ¶
type ResourceInfoList []ResourceInfo
func (ResourceInfoList) DeepCopy ¶
func (in ResourceInfoList) DeepCopy() ResourceInfoList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInfoList.
func (ResourceInfoList) DeepCopyInto ¶
func (in ResourceInfoList) DeepCopyInto(out *ResourceInfoList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceList ¶
type ResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Resource `json:"items"` }
ResourceList contains a list of Resource
func (*ResourceList) DeepCopy ¶
func (in *ResourceList) DeepCopy() *ResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList.
func (*ResourceList) DeepCopyInto ¶
func (in *ResourceList) DeepCopyInto(out *ResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceList) DeepCopyObject ¶
func (in *ResourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourcePrice ¶
type ResourcePrice struct { Unit *resource.Quantity `json:"unit"` Price int64 `json:"price"` // 100 = 1¥ Describe string `json:"describe,omitempty"` }
func (*ResourcePrice) DeepCopy ¶
func (in *ResourcePrice) DeepCopy() *ResourcePrice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePrice.
func (*ResourcePrice) DeepCopyInto ¶
func (in *ResourcePrice) DeepCopyInto(out *ResourcePrice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourcePriceAndUsed ¶
type ResourcePriceAndUsed struct { ResourcePrice `json:",inline"` Used *resource.Quantity `json:"used,omitempty"` }
func (*ResourcePriceAndUsed) DeepCopy ¶
func (in *ResourcePriceAndUsed) DeepCopy() *ResourcePriceAndUsed
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePriceAndUsed.
func (*ResourcePriceAndUsed) DeepCopyInto ¶
func (in *ResourcePriceAndUsed) DeepCopyInto(out *ResourcePriceAndUsed)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct {
Resources map[v1.ResourceName]ResourceInfo `json:"resources,omitempty"`
}
ResourceSpec defines the desired state of Resource
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceStatus ¶
type ResourceStatus struct {
Status Status `json:"status,omitempty"`
}
ResourceStatus defines the observed state of Resource
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.