golang

package
v3.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Group is the resource's group. Does not contain the domain.
	Group string
	// Domain is the resource's domain.
	Domain string
	// Version is the resource's version.
	Version string
	// Kind is the resource's kind.
	Kind string

	// Plural is the resource's kind plural form.
	// Optional
	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) GVK

func (opts Options) GVK() resource.GVK

GVK returns the GVK identifier of a resource.

func (Options) NewResource

func (opts Options) NewResource(c newconfig.Config) resource.Resource

NewResource creates a new resource from the options

func (Options) Validate

func (opts Options) Validate() error

Validate verifies that all the fields have valid values

Directories

Path Synopsis
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

Jump to

Keyboard shortcuts

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