templates

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerignoreTemplate = `` /* 129-byte string literal not displayed */

	GitignoreTemplate = `
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin
testbin/*
# Test binary, build with ` + "`go test -c`" + `
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Kubernetes Generated files - skip generated files, except for vendored files
!vendor/**/zz_generated.*
# editor and IDE paraphernalia
.idea
.tmp/*
*.swp
*.swo
*~
`
)
View Source
const (
	Doc = `// +k8s:deepcopy-gen=package
// +groupName={{.Group}}.{{.Domain}}

package {{.Version}}
`

	Types = `package {{ .Version }}

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE!  THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
// {{ .Kind }}Spec defines the desired state of {{ .Kind }}
type {{ .Kind }}Spec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// Foo is an example field of {{ .Kind }}. Edit {{ .Kind }}_types.go to remove/update
	Foo string ` + "`" + `json:"foo,omitempty"` + "`" + `
}

// {{ .Kind }}Status defines the observed state of {{ .Kind }}
type {{ .Kind }}Status struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
}

// +genclient
{{- if not .Status }}
// +genclient:noStatus
{{- end}}
{{- if not .Namespaced }}
// +genclient:nonNamespaced
{{- end }}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
{{- if .Status }}
// +kubebuilder:subresource:status
{{- end}}
{{- if not .Namespaced }}
// +kubebuilder:resource:scope=Cluster
{{- end }}

// {{ .Kind }} is the Schema for the {{ .Kind }} API
type {{ .Kind }} struct {
	metav1.TypeMeta   ` + "`" + `json:",inline"` + "`" + `
	metav1.ObjectMeta ` + "`" + `json:"metadata,omitempty"` + "`" + `
	Spec              {{ .Kind }}Spec   ` + "`" + `json:"spec,omitempty"` + "`" + `
	Status            {{ .Kind }}Status ` + "`" + `json:"status,omitempty"` + "`" + `
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// {{ .Kind }}List contains a list of {{ .Kind }}
type {{ .Kind }}List struct {
	metav1.TypeMeta ` + "`" + `json:",inline"` + "`" + `
	metav1.ListMeta ` + "`" + `json:"metadata,omitempty"` + "`" + `
	Items           []{{ .Kind }} ` + "`" + `json:"items"` + "`" + `
}

func init() {
	SchemeBuilder.Register(&{{ .Kind }}{}, &{{ .Kind }}List{})
}
`
	Groupversion = `` /* 817-byte string literal not displayed */

)
View Source
const Boilerplate = `` /* 550-byte string literal not displayed */
View Source
const ControllerTemp = `` /* 11343-byte string literal not displayed */
View Source
const Dockerfile = `` /* 773-byte string literal not displayed */
View Source
const MainTemp = `` /* 1107-byte string literal not displayed */
View Source
const Makefile = `` /* 4443-byte string literal not displayed */
View Source
const RunTemp = `` /* 1307-byte string literal not displayed */
View Source
const SignalTemp = `` /* 694-byte string literal not displayed */
View Source
const (
	ToolsTemp = `` /* 155-byte string literal not displayed */

)
View Source
const UpdateCodeGenTemp = `` /* 1702-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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