Skip to content

Commit

Permalink
Embbed more example types for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Pelisse committed Apr 20, 2018
1 parent ede234e commit 3b62c36
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions pkg/gen/apis/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func Example() {}

// FooSpec defines the desired state of Foo
type FooSpec struct {
// +kubebuilder:validation:Maximum=10
// +kubebuilder:validation:ExclusiveMinimum=3
Count int `json:"count"`
}

// FooStatus defines the observed state of Foo
type FooStatus struct{}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Foo
// +k8s:openapi-gen=true
// +kubebuilder:resource:path=foos
type Foo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec FooSpec `json:"spec,omitempty"`
Status FooStatus `json:"status,omitempty"`
func Example() {
// FooSpec defines the desired state of Foo
type FooSpec struct {
// +kubebuilder:validation:Maximum=10
// +kubebuilder:validation:ExclusiveMinimum=3
Count int `json:"count"`
}

// FooStatus defines the observed state of Foo
type FooStatus struct{}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Foo
// +k8s:openapi-gen=true
// +kubebuilder:resource:path=foos
type Foo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec FooSpec `json:"spec,omitempty"`
Status FooStatus `json:"status,omitempty"`
}
}

0 comments on commit 3b62c36

Please sign in to comment.