Skip to content

Commit

Permalink
Update golden test files
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Phoen committed Jun 27, 2024
1 parent 8f4a61a commit 64d6dbf
Show file tree
Hide file tree
Showing 37 changed files with 840 additions and 1,082 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

package v0_0

import (
"time"
)
import "time"

// CustomKindMetadata defines model for CustomKindMetadata.
// metadata contains embedded CommonMetadata and can be extended with custom string fields
// TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
// without external reference as using the CommonMetadata reference breaks thema codegen.
type CustomKindMetadata struct {
UpdateTimestamp time.Time `json:"updateTimestamp"`
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"`
}

// _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 CustomKindKubeObjectMetadata struct {
CreationTimestamp time.Time `json:"creationTimestamp"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers"`
ResourceVersion string `json:"resourceVersion"`
Generation int64 `json:"generation"`
UpdatedBy string `json:"updatedBy"`
Labels map[string]string `json:"labels"`
ResourceVersion string `json:"resourceVersion"`
Uid string `json:"uid"`
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

package v0_0

// CustomKindSpec defines model for CustomKindSpec.
// +k8s:openapi-gen=true
type CustomKindSpec struct {
DeprecatedField string `json:"deprecatedField"`
Field1 string `json:"field1"`
DeprecatedField string `json:"deprecatedField"`
}
Original file line number Diff line number Diff line change
@@ -1,70 +1,34 @@
package v0_0
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

// Defines values for CustomKindOperatorStateState.
const (
CustomKindOperatorStateStateFailed CustomKindOperatorStateState = "failed"
CustomKindOperatorStateStateInProgress CustomKindOperatorStateState = "in_progress"
CustomKindOperatorStateStateSuccess CustomKindOperatorStateState = "success"
)

// Defines values for CustomKindstatusOperatorStateState.
const (
CustomKindstatusOperatorStateStateFailed CustomKindstatusOperatorStateState = "failed"
CustomKindstatusOperatorStateStateInProgress CustomKindstatusOperatorStateState = "in_progress"
CustomKindstatusOperatorStateStateSuccess CustomKindstatusOperatorStateState = "success"
)
package v0_0

// CustomKindOperatorState defines model for CustomKindOperatorState.
// +k8s:openapi-gen=true
type CustomKindOperatorState 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"`

type CustomKindstatusOperatorState struct {
// 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 CustomKindOperatorStateState `json:"state"`
State CustomKindStatusOperatorStateState `json:"state"`
// 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]any `json:"details,omitempty"`
}

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

// CustomKindStatus defines model for CustomKindStatus.
// +k8s:openapi-gen=true
type CustomKindStatus 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]CustomKindstatusOperatorState `json:"operatorStates,omitempty"`
// additionalFields is reserved for future use
AdditionalFields map[string]any `json:"additionalFields,omitempty"`
}

// CustomKindstatusOperatorState defines model for CustomKindstatus.#OperatorState.
// +k8s:openapi-gen=true
type CustomKindstatusOperatorState 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"`
type CustomKindStatusOperatorStateState string

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

// CustomKindstatusOperatorStateState state describes the state of the lastEvaluation.
// It is limited to three possible states for machine evaluation.
// +k8s:openapi-gen=true
type CustomKindstatusOperatorStateState string
const (
StatusOperatorStateStateSuccess CustomKindStatusOperatorStateState = "success"
StatusOperatorStateStateInProgress CustomKindStatusOperatorStateState = "in_progress"
StatusOperatorStateStateFailed CustomKindStatusOperatorStateState = "failed"
)
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

package v1_0

import (
"time"
)
import "time"

// CustomKindMetadata defines model for CustomKindMetadata.
// metadata contains embedded CommonMetadata and can be extended with custom string fields
// TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
// without external reference as using the CommonMetadata reference breaks thema codegen.
type CustomKindMetadata struct {
CreatedBy string `json:"createdBy"`
CreationTimestamp time.Time `json:"creationTimestamp"`
CustomMetadataField string `json:"customMetadataField"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers"`
Generation int64 `json:"generation"`
Labels map[string]string `json:"labels"`
OtherMetadataField string `json:"otherMetadataField"`
ResourceVersion string `json:"resourceVersion"`
Uid string `json:"uid"`
UpdateTimestamp time.Time `json:"updateTimestamp"`
UpdatedBy string `json:"updatedBy"`
}

// _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 CustomKindKubeObjectMetadata 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"`
// All extensions to this metadata need to have string values (for APIServer encoding-to-annotations purposes)
// Can't use this as it's not yet enforced CUE:
// ...string
// Have to do this gnarly regex instead
CustomMetadataField string `json:"customMetadataField"`
UpdateTimestamp time.Time `json:"updateTimestamp"`
CreatedBy string `json:"createdBy"`
Uid string `json:"uid"`
CreationTimestamp time.Time `json:"creationTimestamp"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers"`
ResourceVersion string `json:"resourceVersion"`
Generation int64 `json:"generation"`
// All extensions to this metadata need to have string values (for APIServer encoding-to-annotations purposes)
// Can't use this as it's not yet enforced CUE:
// ...string
// Have to do this gnarly regex instead
OtherMetadataField string `json:"otherMetadataField"`
UpdatedBy string `json:"updatedBy"`
Labels map[string]string `json:"labels"`
}
Original file line number Diff line number Diff line change
@@ -1,62 +1,58 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

package v1_0

import (
"time"
)
import "time"

// Defines values for CustomKindSpecEnum.
const (
CustomKindSpecEnumDefault CustomKindSpecEnum = "default"
CustomKindSpecEnumVal1 CustomKindSpecEnum = "val1"
CustomKindSpecEnumVal2 CustomKindSpecEnum = "val2"
CustomKindSpecEnumVal3 CustomKindSpecEnum = "val3"
CustomKindSpecEnumVal4 CustomKindSpecEnum = "val4"
)
// +k8s:openapi-gen=true
type CustomKindInnerObject2 struct {
Name string `json:"name"`
Details map[string]any `json:"details"`
}

// CustomKindInnerObject1 defines model for CustomKindInnerObject1.
// +k8s:openapi-gen=true
type CustomKindInnerObject1 struct {
InnerField1 string `json:"innerField1"`
InnerField2 []string `json:"innerField2"`
InnerField3 []CustomKindInnerObject2 `json:"innerField3"`
}

// CustomKindInnerObject2 defines model for CustomKindInnerObject2.
// +k8s:openapi-gen=true
type CustomKindInnerObject2 struct {
Details map[string]interface{} `json:"details"`
Name string `json:"name"`
type CustomKindType1 struct {
Group string `json:"group"`
Options []string `json:"options,omitempty"`
}

// +k8s:openapi-gen=true
type CustomKindType2 struct {
Group string `json:"group"`
Details map[string]any `json:"details"`
}

// CustomKindSpec defines model for CustomKindSpec.
// +k8s:openapi-gen=true
type CustomKindUnionType any

// +k8s:openapi-gen=true
type CustomKindSpec struct {
BoolField bool `json:"boolField"`
Enum CustomKindSpecEnum `json:"enum"`
Field1 string `json:"field1"`
FloatField float64 `json:"floatField"`
I32 int `json:"i32"`
I64 int `json:"i64"`
Inner CustomKindInnerObject1 `json:"inner"`
Union CustomKindUnionType `json:"union"`
Map map[string]CustomKindType2 `json:"map"`
Timestamp time.Time `json:"timestamp"`
Union interface{} `json:"union"`
Enum CustomKindSpecEnum `json:"enum"`
I32 int32 `json:"i32"`
I64 int64 `json:"i64"`
BoolField bool `json:"boolField"`
FloatField float64 `json:"floatField"`
}

// CustomKindSpecEnum defines model for CustomKindSpec.Enum.
// +k8s:openapi-gen=true
type CustomKindSpecEnum string

// CustomKindType1 defines model for CustomKindType1.
// +k8s:openapi-gen=true
type CustomKindType1 struct {
Group string `json:"group"`
Options []string `json:"options,omitempty"`
}

// CustomKindType2 defines model for CustomKindType2.
// +k8s:openapi-gen=true
type CustomKindType2 struct {
Details map[string]interface{} `json:"details"`
Group string `json:"group"`
}
const (
SpecEnumVal1 CustomKindSpecEnum = "val1"
SpecEnumVal2 CustomKindSpecEnum = "val2"
SpecEnumVal3 CustomKindSpecEnum = "val3"
SpecEnumVal4 CustomKindSpecEnum = "val4"
SpecEnumDefault CustomKindSpecEnum = "default"
)
Original file line number Diff line number Diff line change
@@ -1,71 +1,35 @@
package v1_0
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

// Defines values for CustomKindOperatorStateState.
const (
CustomKindOperatorStateStateFailed CustomKindOperatorStateState = "failed"
CustomKindOperatorStateStateInProgress CustomKindOperatorStateState = "in_progress"
CustomKindOperatorStateStateSuccess CustomKindOperatorStateState = "success"
)

// Defines values for CustomKindstatusOperatorStateState.
const (
CustomKindstatusOperatorStateStateFailed CustomKindstatusOperatorStateState = "failed"
CustomKindstatusOperatorStateStateInProgress CustomKindstatusOperatorStateState = "in_progress"
CustomKindstatusOperatorStateStateSuccess CustomKindstatusOperatorStateState = "success"
)
package v1_0

// CustomKindOperatorState defines model for CustomKindOperatorState.
// +k8s:openapi-gen=true
type CustomKindOperatorState 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"`

type CustomKindstatusOperatorState struct {
// 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 CustomKindOperatorStateState `json:"state"`
State CustomKindStatusOperatorStateState `json:"state"`
// 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]any `json:"details,omitempty"`
}

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

// CustomKindStatus defines model for CustomKindStatus.
// +k8s:openapi-gen=true
type CustomKindStatus struct {
// additionalFields is reserved for future use
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`

StatusField1 string `json:"statusField1"`
// 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]CustomKindstatusOperatorState `json:"operatorStates,omitempty"`
StatusField1 string `json:"statusField1"`
// additionalFields is reserved for future use
AdditionalFields map[string]any `json:"additionalFields,omitempty"`
}

// CustomKindstatusOperatorState defines model for CustomKindstatus.#OperatorState.
// +k8s:openapi-gen=true
type CustomKindstatusOperatorState 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"`
type CustomKindStatusOperatorStateState string

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

// CustomKindstatusOperatorStateState state describes the state of the lastEvaluation.
// It is limited to three possible states for machine evaluation.
// +k8s:openapi-gen=true
type CustomKindstatusOperatorStateState string
const (
StatusOperatorStateStateSuccess CustomKindStatusOperatorStateState = "success"
StatusOperatorStateStateInProgress CustomKindStatusOperatorStateState = "in_progress"
StatusOperatorStateStateFailed CustomKindStatusOperatorStateState = "failed"
)
Loading

0 comments on commit 64d6dbf

Please sign in to comment.