models

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call added in v0.1.2

type Call struct {
	FunctionName string
	Receiver     string
}

type Expression

type Expression struct {
	Value      string
	IsStar     bool
	IsVariadic bool
	IsWriter   bool
	Underlying string
}

func (*Expression) String

func (e *Expression) String() string

type Field

type Field struct {
	Name           string
	Type           *Expression
	Index          int
	IsInterface    bool
	InterfacesInfo *InterfaceTypeInfo
}

func (*Field) IsBasicType

func (f *Field) IsBasicType() bool

func (*Field) IsNamed

func (f *Field) IsNamed() bool

func (*Field) IsStruct

func (f *Field) IsStruct() bool

func (*Field) IsWriter

func (f *Field) IsWriter() bool

func (*Field) ShortName

func (f *Field) ShortName() string

type Function

type Function struct {
	Name         string
	IsExported   bool
	Receiver     *Receiver
	Parameters   []*Field
	Results      []*Field
	ReturnsError bool
	Calls        []Call
}

func (*Function) FullName

func (f *Function) FullName() string

func (*Function) IsNaked

func (f *Function) IsNaked() bool

func (*Function) OnlyReturnsError

func (f *Function) OnlyReturnsError() bool

func (*Function) OnlyReturnsOneValue

func (f *Function) OnlyReturnsOneValue() bool

func (*Function) ReturnsMultiple

func (f *Function) ReturnsMultiple() bool

func (*Function) TestName

func (f *Function) TestName() string

func (*Function) TestParameters

func (f *Function) TestParameters() []*Field

func (*Function) TestResults

func (f *Function) TestResults() []*Field
type Header struct {
	Comments []string
	Package  string
	Imports  []*Import
	Code     []byte
}

type Import

type Import struct {
	Name, Path, TailName string
	IsInterface          bool
	IsEmpty              bool
}

type InterfaceTypeInfo

type InterfaceTypeInfo struct {
	PkgName        string
	Name           string
	PkgPath        string
	MethodList     []*ast.Field
	MethodInfoList []*MethodInfo
}

type Interfaces

type Interfaces struct {
	PkgName    string
	FilePath   []string
	ImportPath string
	Name       string
	MethodList []*ast.Field
}

type MethodInfo

type MethodInfo struct {
	Name   string
	Params []string
	Return []string
}

type Path

type Path string

func (Path) IsTestPath

func (p Path) IsTestPath() bool

func (Path) TestPath

func (p Path) TestPath() string

type Receiver

type Receiver struct {
	*Field
	Fields []*Field
}

Jump to

Keyboard shortcuts

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