v1

package
v0.0.0-...-e191437 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

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

View Source
const ExtensionResourcePricePrefix = "extensionresourceprice-"

Variables

View Source
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

func GetExtensionResourcePriceName

func GetExtensionResourcePriceName(resourceControllerName string) string

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

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePriceList.

func (*ExtensionResourcePriceList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePriceSpec.

func (*ExtensionResourcePriceSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourcePriceStatus.

func (*ExtensionResourcePriceStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupVersionKind

type GroupVersionKind struct {
	Group   string `json:"group,omitempty"`
	Version string `json:"version,omitempty"`
	Kind    string `json:"kind,omitempty"`
}

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

func (in *Resource) DeepCopy() *Resource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Resource) DeepCopyObject

func (in *Resource) DeepCopyObject() runtime.Object

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

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.

type Status

type Status string
const (
	Complete Status = "complete"
	Create   Status = "create"
)

Jump to

Keyboard shortcuts

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