typescaffold

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	// Namespaced is true if the resource is namespaced
	Namespaced bool

	// Kind is the API Kind.
	Kind string

	// Resource is the API Resource.
	Resource string
}

Resource contains the information required to scaffold files for a resource.

func (*Resource) Validate

func (r *Resource) Validate() error

Validate checks the Resource values to make sure they are valid.

type ScaffoldOptions

type ScaffoldOptions struct {
	Resource        Resource
	AdditionalHelp  string
	GenerateClients bool
}

ScaffoldOptions describes how to scaffold out a Kubernetes object with the basic metadata and comment annotations required to generate code for and conform to runtime.Object and metav1.Object.

func (*ScaffoldOptions) Scaffold

func (o *ScaffoldOptions) Scaffold(out io.Writer) error

Scaffold prints the Kubernetes object scaffolding to the given output.

func (*ScaffoldOptions) Validate

func (o *ScaffoldOptions) Validate() error

Validate validates the options, returning an error if anything is invalid.

Jump to

Keyboard shortcuts

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