types

package
v0.0.0-...-fcbdb15 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayType

type ArrayType struct {
	Field Fielder
	Len   int
}

func (*ArrayType) GetAlias

func (f *ArrayType) GetAlias() string

func (*ArrayType) GetPkgName

func (f *ArrayType) GetPkgName() string

func (*ArrayType) GetPkgPath

func (f *ArrayType) GetPkgPath() string

func (*ArrayType) ID

func (f *ArrayType) ID() string

func (*ArrayType) IsObj

func (f *ArrayType) IsObj() bool

func (*ArrayType) SetAlias

func (f *ArrayType) SetAlias(alias string)

func (*ArrayType) SetPkgName

func (f *ArrayType) SetPkgName(pkgName string)

func (*ArrayType) SetPkgPath

func (f *ArrayType) SetPkgPath(pkgPath string)

func (*ArrayType) Type

func (f *ArrayType) Type() string

type DeclField

type DeclField struct {
	Doc  string
	Name string
	Tag  string

	Field Fielder
}

type FieldType

type FieldType struct {
	// 别名
	Alias string
	//包路径
	PkgPath string
	//类型名
	PkgName string
	// 是否 struct
	Obj bool
}

func (*FieldType) GetAlias

func (f *FieldType) GetAlias() string

func (*FieldType) GetPkgName

func (f *FieldType) GetPkgName() string

func (*FieldType) GetPkgPath

func (f *FieldType) GetPkgPath() string

func (*FieldType) ID

func (f *FieldType) ID() string

func (*FieldType) IsObj

func (f *FieldType) IsObj() bool

func (*FieldType) SetAlias

func (f *FieldType) SetAlias(alias string)

func (*FieldType) SetPkgName

func (f *FieldType) SetPkgName(pkgName string)

func (*FieldType) SetPkgPath

func (f *FieldType) SetPkgPath(pkgPath string)

func (*FieldType) Type

func (f *FieldType) Type() string

type Fielder

type Fielder interface {
	SetPkgPath(pkgPath string)
	GetPkgPath() string
	SetPkgName(pkgName string)
	GetPkgName() string
	SetAlias(alias string)
	GetAlias() string
	IsObj() bool
	ID() string
	Type() string
}

type FuncData

type FuncData struct {
	Doc         string
	Title       string
	Description string
	Return      string
	FuncName    string
	StructName  string
	PkgPath     string
	Params      []*DeclField
	Results     []*DeclField
}

func (*FuncData) BuildDoc

func (f *FuncData) BuildDoc()

func (*FuncData) ID

func (s *FuncData) ID() string

func (*FuncData) SetPkgPath

func (s *FuncData) SetPkgPath(pkgPath string, imports map[string]ImportData)

type GoFile

type GoFile struct {
	FileName string
	FilePath string
	PkgPath  string
	IsTestGo bool
}

func NewGoFile

func NewGoFile(baseDir, filePath string) (goFile GoFile, isGo bool)

func NewGoFiles

func NewGoFiles(baseDir string, filePaths []string) (goFile []GoFile)

type ImportData

type ImportData struct {
	Alias   string
	Package string
	Path    string
}

type MapType

type MapType struct {
	Key   Fielder
	Value Fielder
}

func (*MapType) GetAlias

func (f *MapType) GetAlias() string

func (*MapType) GetPkgName

func (f *MapType) GetPkgName() string

func (*MapType) GetPkgPath

func (f *MapType) GetPkgPath() string

func (*MapType) ID

func (f *MapType) ID() string

func (*MapType) IsObj

func (f *MapType) IsObj() bool

func (*MapType) SetAlias

func (f *MapType) SetAlias(alias string)

func (*MapType) SetPkgName

func (f *MapType) SetPkgName(pkgName string)

func (*MapType) SetPkgPath

func (f *MapType) SetPkgPath(pkgPath string)

func (*MapType) Type

func (f *MapType) Type() string

type PkgData

type PkgData struct {
	FileInfo GoFile
	PackName string
	PkgPath  string
	Imports  map[string]ImportData
	Structs  []*StructData
	Funcs    []*FuncData
}

func (*PkgData) Append

func (p *PkgData) Append(d *PkgData)

func (*PkgData) FindFunc

func (p *PkgData) FindFunc(sname, fname string) *FuncData

func (*PkgData) FindStruct

func (p *PkgData) FindStruct(name string) *StructData

type StructData

type StructData struct {
	PkgPath string
	Name    string
	Doc     string
	Fields  []*DeclField
}

func (*StructData) ID

func (s *StructData) ID() string

func (*StructData) SetPkgPath

func (s *StructData) SetPkgPath(pkgPath string)

type StructType

type StructType string
var Interface_Type StructType = "interface"
var Struct_Type StructType = "struct"

func (StructType) String

func (s StructType) String() string

Jump to

Keyboard shortcuts

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