generate

package
v0.0.0-...-80abf21 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator() *Generator

func (*Generator) GenerateProxy

func (g *Generator) GenerateProxy(
	interfacePath string,
	packageName string,
	name string,
	output string,
) error

type ImportData

type ImportData struct {
	Path  string
	Name  string
	Alias string
	Used  bool
}

func (ImportData) Selector

func (id ImportData) Selector() string

type InterfaceData

type InterfaceData struct {
	InterfacePackage    string
	InterfaceName       string
	Imports             []*ImportData
	Methods             []*MethodData
	ImplementationType  string
	OriginalPackageName string
}

type MethodData

type MethodData struct {
	Name   string
	Params []MethodParam
	Rets   []string
}

type MethodParam

type MethodParam string

func (MethodParam) IsVariadic

func (m MethodParam) IsVariadic() bool

func (MethodParam) Type

func (m MethodParam) Type() string

type TypeProcessor

type TypeProcessor struct {
	// contains filtered or unexported fields
}

func NewTypeProcessor

func NewTypeProcessor(
	pkg *packages.Package,
	fset *token.FileSet,
	interfaceFile string,
) (*TypeProcessor, error)

Jump to

Keyboard shortcuts

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