v0alpha1

package
v0.0.0-...-805ac9c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kind

func Kind() resource.Kind

Kind returns a resource.Kind for this Schema with a JSON codec

func Schema

func Schema() *resource.SimpleSchema

Schema returns a resource.SimpleSchema representation of TimeInterval

func SelectableFields

func SelectableFields(obj *TimeInterval) fields.Set

Types

type Interval

type Interval struct {
	DaysOfMonth []string    `json:"days_of_month,omitempty"`
	Location    *string     `json:"location,omitempty"`
	Months      []string    `json:"months,omitempty"`
	Times       []TimeRange `json:"times,omitempty"`
	Weekdays    []string    `json:"weekdays,omitempty"`
	Years       []string    `json:"years,omitempty"`
}

Interval defines model for Interval. +k8s:openapi-gen=true

type JSONCodec

type JSONCodec struct{}

JSONCodec is an implementation of resource.Codec for kubernetes JSON encoding

func (*JSONCodec) Read

func (*JSONCodec) Read(reader io.Reader, into resource.Object) error

Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`

func (*JSONCodec) Write

func (*JSONCodec) Write(writer io.Writer, from resource.Object) error

Write writes JSON-encoded bytes into `writer` marshaled from `from`

type KubeObjectMetadata

type KubeObjectMetadata struct {
	CreationTimestamp time.Time         `json:"creationTimestamp"`
	DeletionTimestamp *time.Time        `json:"deletionTimestamp,omitempty"`
	Finalizers        []string          `json:"finalizers"`
	Generation        int64             `json:"generation"`
	Labels            map[string]string `json:"labels"`
	ResourceVersion   string            `json:"resourceVersion"`
	Uid               string            `json:"uid"`
}

_kubeObjectMetadata is metadata found in a kubernetes object's metadata field. It is not exhaustive and only includes fields which may be relevant to a kind's implementation, As it is also intended to be generic enough to function with any API Server.

type Metadata

type Metadata struct {
	CreatedBy         string            `json:"createdBy"`
	CreationTimestamp time.Time         `json:"creationTimestamp"`
	DeletionTimestamp *time.Time        `json:"deletionTimestamp,omitempty"`
	Finalizers        []string          `json:"finalizers"`
	Generation        int64             `json:"generation"`
	Labels            map[string]string `json:"labels"`
	ResourceVersion   string            `json:"resourceVersion"`
	Uid               string            `json:"uid"`
	UpdateTimestamp   time.Time         `json:"updateTimestamp"`
	UpdatedBy         string            `json:"updatedBy"`
}

Metadata defines model for Metadata.

type OperatorState

type OperatorState struct {
	// descriptiveState is an optional more descriptive state field which has no requirements on format
	DescriptiveState *string `json:"descriptiveState,omitempty"`

	// details contains any extra information that is operator-specific
	Details map[string]interface{} `json:"details,omitempty"`

	// lastEvaluation is the ResourceVersion last evaluated
	LastEvaluation string `json:"lastEvaluation"`

	// state describes the state of the lastEvaluation.
	// It is limited to three possible states for machine evaluation.
	State OperatorStateState `json:"state"`
}

OperatorState defines model for OperatorState. +k8s:openapi-gen=true

type OperatorStateState

type OperatorStateState string

OperatorStateState state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation. +k8s:openapi-gen=true

const (
	OperatorStateStateFailed     OperatorStateState = "failed"
	OperatorStateStateInProgress OperatorStateState = "in_progress"
	OperatorStateStateSuccess    OperatorStateState = "success"
)

Defines values for OperatorStateState.

type Spec

type Spec struct {
	Name          string     `json:"name"`
	TimeIntervals []Interval `json:"time_intervals"`
}

Spec defines model for Spec. +k8s:openapi-gen=true

type Status

type Status struct {
	// additionalFields is reserved for future use
	AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`

	// operatorStates is a map of operator ID to operator state evaluations.
	// Any operator which consumes this kind SHOULD add its state evaluation information to this field.
	OperatorStates map[string]StatusOperatorState `json:"operatorStates,omitempty"`
}

Status defines model for Status. +k8s:openapi-gen=true

type StatusOperatorState

type StatusOperatorState struct {
	// descriptiveState is an optional more descriptive state field which has no requirements on format
	DescriptiveState *string `json:"descriptiveState,omitempty"`

	// details contains any extra information that is operator-specific
	Details map[string]interface{} `json:"details,omitempty"`

	// lastEvaluation is the ResourceVersion last evaluated
	LastEvaluation string `json:"lastEvaluation"`

	// state describes the state of the lastEvaluation.
	// It is limited to three possible states for machine evaluation.
	State StatusOperatorStateState `json:"state"`
}

StatusOperatorState defines model for status.#OperatorState. +k8s:openapi-gen=true

type StatusOperatorStateState

type StatusOperatorStateState string

StatusOperatorStateState state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation. +k8s:openapi-gen=true

const (
	StatusOperatorStateStateFailed     StatusOperatorStateState = "failed"
	StatusOperatorStateStateInProgress StatusOperatorStateState = "in_progress"
	StatusOperatorStateStateSuccess    StatusOperatorStateState = "success"
)

Defines values for StatusOperatorStateState.

type TimeInterval

type TimeInterval struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              Spec   `json:"spec"`
	Status            Status `json:"status"`
}

+k8s:openapi-gen=true

func (*TimeInterval) Copy

func (o *TimeInterval) Copy() resource.Object

func (*TimeInterval) DeepCopyObject

func (o *TimeInterval) DeepCopyObject() runtime.Object

func (*TimeInterval) GetCommonMetadata

func (o *TimeInterval) GetCommonMetadata() resource.CommonMetadata

func (*TimeInterval) GetCreatedBy

func (o *TimeInterval) GetCreatedBy() string

func (*TimeInterval) GetProvenanceStatus

func (o *TimeInterval) GetProvenanceStatus() string

func (*TimeInterval) GetSpec

func (o *TimeInterval) GetSpec() any

func (*TimeInterval) GetStaticMetadata

func (o *TimeInterval) GetStaticMetadata() resource.StaticMetadata

func (*TimeInterval) GetSubresource

func (o *TimeInterval) GetSubresource(name string) (any, bool)

func (*TimeInterval) GetSubresources

func (o *TimeInterval) GetSubresources() map[string]any

func (*TimeInterval) GetUpdateTimestamp

func (o *TimeInterval) GetUpdateTimestamp() time.Time

func (*TimeInterval) GetUpdatedBy

func (o *TimeInterval) GetUpdatedBy() string

func (*TimeInterval) SetCommonMetadata

func (o *TimeInterval) SetCommonMetadata(metadata resource.CommonMetadata)

func (*TimeInterval) SetCreatedBy

func (o *TimeInterval) SetCreatedBy(createdBy string)

func (*TimeInterval) SetProvenanceStatus

func (o *TimeInterval) SetProvenanceStatus(status string)

func (*TimeInterval) SetSpec

func (o *TimeInterval) SetSpec(spec any) error

func (*TimeInterval) SetStaticMetadata

func (o *TimeInterval) SetStaticMetadata(metadata resource.StaticMetadata)

func (*TimeInterval) SetSubresource

func (o *TimeInterval) SetSubresource(name string, value any) error

func (*TimeInterval) SetUpdateTimestamp

func (o *TimeInterval) SetUpdateTimestamp(updateTimestamp time.Time)

func (*TimeInterval) SetUpdatedBy

func (o *TimeInterval) SetUpdatedBy(updatedBy string)

type TimeIntervalList

type TimeIntervalList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []TimeInterval `json:"items"`
}

+k8s:openapi-gen=true

func (*TimeIntervalList) Copy

func (*TimeIntervalList) DeepCopyObject

func (o *TimeIntervalList) DeepCopyObject() runtime.Object

func (*TimeIntervalList) GetItems

func (o *TimeIntervalList) GetItems() []resource.Object

func (*TimeIntervalList) SetItems

func (o *TimeIntervalList) SetItems(items []resource.Object)

type TimeRange

type TimeRange struct {
	EndTime   string `json:"end_time"`
	StartTime string `json:"start_time"`
}

TimeRange defines model for TimeRange. +k8s:openapi-gen=true

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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