generators

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNameSystem = "public"
)

Variables

This section is empty.

Functions

func NameSystems

func NameSystems() namer.NameSystems

func WithBoilerplate

func WithBoilerplate(boilerplate string) func(g *Generators)

func WithPackageRoot added in v0.2.0

func WithPackageRoot(pr string) func(g *Generators)

Types

type BuilderFactory

type BuilderFactory interface {
	NewBuilder(pkg *types.Package, packageIndex *PackageTypeIndex) generator.Generator
}

type CustomArgs

type CustomArgs struct {
	BoundingDirs []string
}

type Generators

type Generators struct {
	Boilerplate string
	Builder     BuilderFactory
	Index       *PackageTypeIndex
}

func New

func New(builderFactory BuilderFactory, opts ...func(g *Generators)) *Generators

func (*Generators) Packages

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

type PackageTypeIndex added in v0.2.0

type PackageTypeIndex struct {
	TypesByTypePath map[string]*types.Type
	PackageRoot     string
}

func NewPackageTypeIndex added in v0.2.0

func NewPackageTypeIndex() *PackageTypeIndex

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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