models

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

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
}

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 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