generators

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 62

Documentation

Overview

Package generators has the generators for the client-gen utility.

Index

Constants

This section is empty.

Variables

This section is empty.

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 GetTargets added in v0.30.0

func GetTargets(context *generator.Context, args *args.Args) []generator.Target

GetTargets makes the client target definition.

func NameSystems

func NameSystems(pluralExceptions map[string]string) namer.NameSystems

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

Types

type ExceptionNamer

type ExceptionNamer struct {
	Exceptions map[string]string
	KeyFunc    func(*types.Type) string

	Delegate namer.Namer
}

ExceptionNamer allows you specify exceptional cases with exact names. This allows you to have control for handling various conflicts, like group and resource names for instance.

func (*ExceptionNamer) Name

func (n *ExceptionNamer) Name(t *types.Type) string

Name provides the requested name for a type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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