generator

package
v0.211.0 Latest Latest
Warning

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

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

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