generators

package
v1.9.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBasePeerDirs = []string{
	"k8s.io/apimachinery/pkg/apis/meta/v1",
	"k8s.io/apimachinery/pkg/conversion",
	"k8s.io/apimachinery/pkg/runtime",
}

DefaultBasePeerDirs are the peer-dirs nearly everybody will use, i.e. those coming from apimachinery.

Functions

func DefaultNameSystem

func DefaultNameSystem() string

DefaultNameSystem returns the default name system for ordering the types to be processed by the generators in this package.

func NameSystems

func NameSystems() namer.NameSystems

NameSystems returns the name system used by the generators in this package.

func NewGenConversion

func NewGenConversion(sanitizedName, typesPackage, outputPackage string, manualConversions conversionFuncMap, peerPkgs []string, useUnsafe TypesEqual) generator.Generator

func Packages

func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages

Types

type CustomArgs

type CustomArgs struct {
	// Base peer dirs which nearly everybody will use, i.e. outside of Kubernetes core.
	BasePeerDirs []string

	// Custom peer dirs which are application specific. Always consider these as
	// last-ditch possibilities for conversions.
	ExtraPeerDirs []string //

	// Skipunsafe indicates whether to generate unsafe conversions to improve the efficiency
	// of these operations. The unsafe operation is a direct pointer assignment via unsafe
	// (within the allowed uses of unsafe) and is equivalent to a proposed Golang change to
	// allow structs that are identical to be assigned to each other.
	SkipUnsafe bool
}

CustomArgs is used by the gengo framework to pass args specific to this generator.

type TypesEqual

type TypesEqual interface {
	Equal(a, b *types.Type) bool
}

Jump to

Keyboard shortcuts

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