golang

package
v3.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 7

Documentation

Index

Constants

View Source
const DefaultNameQualifier = "go." + plugins.DefaultNameQualifier

DefaultNameQualifier is the suffix appended to all kubebuilder plugin names for Golang operators.

Variables

This section is empty.

Functions

func FindCurrentRepo

func FindCurrentRepo() (string, error)

FindCurrentRepo attempts to determine the current repository though a combination of go/packages and `go mod` commands/tricks.

func ValidateGoVersion

func ValidateGoVersion(min, max GoVersion) error

ValidateGoVersion verifies that Go is installed and the current go version is supported by a plugin.

Types

type GoVersion added in v3.2.0

type GoVersion struct {
	// contains filtered or unexported fields
}

GoVersion describes a Go version.

func MustParse added in v3.2.0

func MustParse(verStr string) (v GoVersion)

MustParse will panic if verStr does not match the expected Go version string spec.

func (GoVersion) Compare added in v3.2.0

func (v GoVersion) Compare(other GoVersion) int

Compare returns -1, 0, or 1 if v < other, v == other, or v > other, respectively.

func (GoVersion) String added in v3.2.0

func (v GoVersion) String() string

type Options

type Options struct {
	// Plural is the resource's kind plural form.
	Plural string

	// CRDVersion is the CustomResourceDefinition API version that will be used for the resource.
	CRDVersion string
	// WebhookVersion is the {Validating,Mutating}WebhookConfiguration API version that will be used for the resource.
	WebhookVersion string

	// Namespaced is true if the resource should be namespaced.
	Namespaced bool

	// Flags that define which parts should be scaffolded
	DoAPI        bool
	DoController bool
	DoDefaulting bool
	DoValidation bool
	DoConversion bool
}

Options contains the information required to build a new resource.Resource.

func (Options) UpdateResource

func (opts Options) UpdateResource(res *resource.Resource, c config.Config)

UpdateResource updates the provided resource with the options

Directories

Path Synopsis
declarative
v1
Deprecated: The declarative plugin has been deprecated.
Deprecated: The declarative plugin has been deprecated.
deploy-image
v2
scaffolds
Package scaffolds contains libraries for scaffolding code to use with controller-runtime
Package scaffolds contains libraries for scaffolding code to use with controller-runtime
v3
scaffolds
Package scaffolds contains libraries for scaffolding code to use with controller-runtime
Package scaffolds contains libraries for scaffolding code to use with controller-runtime
v4
scaffolds
Package scaffolds contains libraries for scaffolding code to use with controller-runtime
Package scaffolds contains libraries for scaffolding code to use with controller-runtime

Jump to

Keyboard shortcuts

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