clientgen

package
v2.11.26 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientParams

type ClientParams struct {
	// Package is the package the client will be generated in.
	Package string `json:"package"`

	// Imports is used for imports into the client.
	Imports map[string]string `json:"imports"`

	// Kubernetes holds information about the backing API.
	Kubernetes struct {
		// Group is the group of the k8s resource.
		Group string `json:"group"`
		// Kind is the kind of the resource.
		Kind string `json:"kind"`
		// Version is the version of the resource kf supports.
		Version string `json:"version"`
		// Namespaced indicates whether this object is namespaced or global.
		Namespaced bool `json:"namespaced"`
		// Plural contains the pluralizataion of kind. If blank, default of Kind+"s"
		// is assumed.
		Plural string `json:"plural"`
		// ObservedGenerationField contains the name of the field used for
		// ObservedGenerations (if the resource suuports it).
		ObservedGenerationFieldPath string `json:"observedGenerationFieldPath"`
		// ConditionField contains the name of the field used for
		// conditions.
		ConditionsFieldPath string `json:"conditionsFieldPath"`
		// Conditions holds the names of interesting conditions that will be turned
		// into predicates.
		Conditions []Condition `json:"conditions"`
	} `json:"kubernetes"`

	// CF contains information about this resource from a CF side.
	CF struct {
		// The name of the CF type.
		Name string `json:"name"`
	} `json:"cf"`

	// Type is the Go type of the resource. This MUST be imported using Imports.
	Type string `json:"type"`

	// ClientType is the Go type of the Kubernetes client. This MUST be imported using Imports.
	ClientType string `json:"clientType"`
}

func (*ClientParams) Render

func (f *ClientParams) Render() ([]byte, error)

func (*ClientParams) SupportsConditions

func (f *ClientParams) SupportsConditions() bool

SupportsConditions returns true if the type supports condition fields.

func (*ClientParams) SupportsObservedGeneration

func (f *ClientParams) SupportsObservedGeneration() bool

SupportsObservedGeneration returns true if the type supports ObservedGeneration fields.

type Condition

type Condition struct {
	Name string `json:"name"`
	Ref  string `json:"ref"`
	Val  string `json:"value"`
}

func (*Condition) ConditionName

func (c *Condition) ConditionName() string

func (*Condition) Definition

func (c *Condition) Definition() string

func (*Condition) PredicateName

func (c *Condition) PredicateName() string

func (*Condition) WaitForName

func (c *Condition) WaitForName() string

Directories

Path Synopsis
Package gentest contains tests for the client generator.
Package gentest contains tests for the client generator.

Jump to

Keyboard shortcuts

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