generator

package
v0.248.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRefreshableFile

func GenerateRefreshableFile(targetPackagePath, targetPackageName string, refreshableTypes RefreshableTypes) (*jen.File, error)

Types

type RefreshableType

type RefreshableType struct {
	Type         types.Type
	OverrideName string
}

A RefreshableType contains all the necessary information to generate an interface and implementation for the contained internal type. It is expected that a constructed refreshable type has already handled any potential naming collisions, so users of this type are safe to use the expressions and declarations returned from it's functions if all the RefreshableTypes used they same refreshableTypeGenerator.

type RefreshableTypes

type RefreshableTypes []RefreshableType

RefreshableTypes is a container for RefreshableType which provides some convenience functions

func NewRefreshableTypes

func NewRefreshableTypes(targetPackage *packages.Package, typeSet []types.Type) (RefreshableTypes, error)

Jump to

Keyboard shortcuts

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