Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncGenerator ¶
type FuncGenerator interface {
Generate(t *types.Named, cm *packages.CommentMarkers) (map[string]interface{}, error)
}
func NewProducers ¶
func NewProducers(cache *packages.Cache, im *packages.Imports) FuncGenerator
type FuncGeneratorChain ¶
type FuncGeneratorChain []FuncGenerator
func (FuncGeneratorChain) Generate ¶
func (gc FuncGeneratorChain) Generate(t *types.Named, cm *packages.CommentMarkers) (map[string]interface{}, error)
type Functions ¶
type Functions struct { SourcePackagePath string NewGeneratorFns []NewFuncGeneratorFn // contains filtered or unexported fields }
func NewFunctions ¶
type FunctionsOption ¶
type FunctionsOption func(*Functions)
func WithNewFuncGeneratorFns ¶
func WithNewFuncGeneratorFns(fn ...NewFuncGeneratorFn) FunctionsOption
type NewFuncGeneratorFn ¶
type NewFuncGeneratorFn func(*packages.Cache, *packages.Imports) FuncGenerator
type Producers ¶
type Producers struct {
// contains filtered or unexported fields
}
Producers generates a function for every merged type of the given type that will let you produce those remote types from the local one.
type Type ¶
type Type struct { Imports *packages.Imports Cache *packages.Cache Generator TypeGenerator FlattenerOption types.FlattenerOption }
func NewType ¶
func NewType(im *packages.Imports, cache *packages.Cache, gen TypeGenerator, opts ...TypeOption) *Type
type TypeGenerator ¶
type TypeGenerator interface {
Generate() (*types.Named, *packages.CommentMarkers, error)
}
type TypeOption ¶
type TypeOption func(*Type)
func WithFlattenerOption ¶
func WithFlattenerOption(fo types.FlattenerOption) TypeOption
Click to show internal directories.
Click to hide internal directories.