Documentation ¶
Index ¶
- type BlockType
- type ElementsExtractor
- type Extractor
- type Filter
- type GenericsExtractor
- type GoFile
- func (f *GoFile) AddImport(i *Import)
- func (f *GoFile) AddLogicBlock(lb *LogicBlock)
- func (f *GoFile) Element(idx, depth int) *ElementsExtractor
- func (f *GoFile) Generics(idx int) *GenericsExtractor
- func (f *GoFile) GetLogicBlock(idx int) *LogicBlock
- func (f *GoFile) Import() *ImportExtractor
- func (f *GoFile) Interface(idx, depth int) *InterfaceExtractor
- func (f *GoFile) LBlock(e Extractor, filters ...Filter) *LogicBlockExtractor
- func (f *GoFile) Package() *PackageExtractor
- func (f *GoFile) Parse(fns ...ParseFunc) error
- func (f *GoFile) SetITFName(idx, iidx int, s string)
- func (f *GoFile) SetITFType(idx, iidx int)
- func (f *GoFile) SetLBKind(idx int, t BlockType)
- func (f *GoFile) SetLBName(idx int, s string)
- func (f *GoFile) SetMain(b bool)
- func (f *GoFile) SetPath(s string)
- func (f *GoFile) SetPkgName(s string)
- func (f *GoFile) Skip() *SkipExtractor
- func (f *GoFile) String() string
- func (f *GoFile) Struct(idx, depth int) *StructExtractor
- func (f *GoFile) Type(idx int) *TypeExtractor
- type GoFileScanner
- type Import
- type ImportExtractor
- type InterfaceExtractor
- type LogicBlock
- func (l *LogicBlock) AddCall(s string)
- func (l *LogicBlock) BlockLen() int
- func (l *LogicBlock) BlockParam(idx int) *LogicBlock
- func (l *LogicBlock) GenericLen() int
- func (l *LogicBlock) GenericParam(idx int) *LogicBlock
- func (l *LogicBlock) InputLen() int
- func (l *LogicBlock) InputParam(idx int) *LogicBlock
- func (l *LogicBlock) IsFunc()
- func (l *LogicBlock) Receiver() *LogicBlock
- func (l *LogicBlock) ReturnLen() int
- func (l *LogicBlock) ReturnParam(idx int) *LogicBlock
- func (l *LogicBlock) SetKind(k BlockType)
- func (l *LogicBlock) SetName(s string)
- func (l *LogicBlock) SetPackage(s string)
- func (l *LogicBlock) SetType(s string)
- type LogicBlockBuilder
- type LogicBlockExtractor
- type Package
- type PackageExtractor
- type ParseFunc
- type Project
- type SkipExtractor
- type StructExtractor
- type TypeExtractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElementsExtractor ¶
type ElementsExtractor struct {
// contains filtered or unexported fields
}
func (*ElementsExtractor) Done ¶
func (e *ElementsExtractor) Done() bool
type GenericsExtractor ¶
type GenericsExtractor struct {
// contains filtered or unexported fields
}
func (*GenericsExtractor) Done ¶
func (e *GenericsExtractor) Done() bool
type GoFile ¶
type GoFile struct { IsMain bool `json:"isMain,omitempty"` PackageName string `json:"package,omitempty"` Imports []*Import `json:"imports,omitempty"` LogicBlocks []*LogicBlock `json:"logicBlocks,omitempty"` Path string `json:"path,omitempty"` // contains filtered or unexported fields }
func (*GoFile) AddLogicBlock ¶
func (f *GoFile) AddLogicBlock(lb *LogicBlock)
func (*GoFile) Element ¶
func (f *GoFile) Element(idx, depth int) *ElementsExtractor
func (*GoFile) Generics ¶
func (f *GoFile) Generics(idx int) *GenericsExtractor
func (*GoFile) GetLogicBlock ¶
func (f *GoFile) GetLogicBlock(idx int) *LogicBlock
func (*GoFile) Import ¶
func (f *GoFile) Import() *ImportExtractor
func (*GoFile) Interface ¶
func (f *GoFile) Interface(idx, depth int) *InterfaceExtractor
func (*GoFile) LBlock ¶
func (f *GoFile) LBlock(e Extractor, filters ...Filter) *LogicBlockExtractor
func (*GoFile) Package ¶
func (f *GoFile) Package() *PackageExtractor
func (*GoFile) SetITFName ¶
func (*GoFile) SetITFType ¶
func (*GoFile) SetPkgName ¶
func (*GoFile) Skip ¶
func (f *GoFile) Skip() *SkipExtractor
func (*GoFile) Struct ¶
func (f *GoFile) Struct(idx, depth int) *StructExtractor
func (*GoFile) Type ¶
func (f *GoFile) Type(idx int) *TypeExtractor
type GoFileScanner ¶
type GoFileScanner interface { Skip() *SkipExtractor Package() *PackageExtractor Import() *ImportExtractor Type() *TypeExtractor Element() *ElementsExtractor Generics() *GenericsExtractor }
type ImportExtractor ¶
type ImportExtractor struct {
// contains filtered or unexported fields
}
func (*ImportExtractor) Done ¶
func (e *ImportExtractor) Done() bool
type InterfaceExtractor ¶
type InterfaceExtractor struct {
// contains filtered or unexported fields
}
func (*InterfaceExtractor) Done ¶
func (e *InterfaceExtractor) Done() bool
type LogicBlock ¶
type LogicBlock struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Kind BlockType `json:"kind,omitempty"` Generics []*LogicBlock `json:"typeConstraints,omitempty"` InputParams []*LogicBlock `json:"inputs,omitempty"` ReturnParams []*LogicBlock `json:"returns,omitempty"` BlockParams []*LogicBlock `json:"elements,omitempty"` Receivers *LogicBlock `json:"receiver,omitempty"` Calls []string `json:"calls,omitempty"` Package string `json:"pacakage,omitempty"` // contains filtered or unexported fields }
func (*LogicBlock) AddCall ¶
func (l *LogicBlock) AddCall(s string)
func (*LogicBlock) BlockLen ¶
func (l *LogicBlock) BlockLen() int
func (*LogicBlock) BlockParam ¶
func (l *LogicBlock) BlockParam(idx int) *LogicBlock
func (*LogicBlock) GenericLen ¶
func (l *LogicBlock) GenericLen() int
func (*LogicBlock) GenericParam ¶
func (l *LogicBlock) GenericParam(idx int) *LogicBlock
func (*LogicBlock) InputLen ¶
func (l *LogicBlock) InputLen() int
func (*LogicBlock) InputParam ¶
func (l *LogicBlock) InputParam(idx int) *LogicBlock
func (*LogicBlock) IsFunc ¶
func (l *LogicBlock) IsFunc()
func (*LogicBlock) Receiver ¶
func (l *LogicBlock) Receiver() *LogicBlock
func (*LogicBlock) ReturnLen ¶
func (l *LogicBlock) ReturnLen() int
func (*LogicBlock) ReturnParam ¶
func (l *LogicBlock) ReturnParam(idx int) *LogicBlock
func (*LogicBlock) SetKind ¶
func (l *LogicBlock) SetKind(k BlockType)
func (*LogicBlock) SetName ¶
func (l *LogicBlock) SetName(s string)
func (*LogicBlock) SetPackage ¶
func (l *LogicBlock) SetPackage(s string)
func (*LogicBlock) SetType ¶
func (l *LogicBlock) SetType(s string)
type LogicBlockBuilder ¶
type LogicBlockBuilder interface { SetName(string) SetType(string) SetKind(BlockType) GenericParam(idx int) *LogicBlock InputParam(idx int) *LogicBlock ReturnParam(idx int) *LogicBlock BlockParam(idx int) *LogicBlock GenericLen() int InputLen() int ReturnLen() int BlockLen() int Receiver() *LogicBlock AddCall(string) SetPackage(string) IsFunc() }
TODO: builder pattern for LogicBlock? because of input / return elements, and so on
type LogicBlockExtractor ¶
type LogicBlockExtractor struct {
// contains filtered or unexported fields
}
func (*LogicBlockExtractor) Done ¶
func (l *LogicBlockExtractor) Done() bool
type PackageExtractor ¶
type PackageExtractor struct {
// contains filtered or unexported fields
}
func (*PackageExtractor) Done ¶
func (e *PackageExtractor) Done() bool
type SkipExtractor ¶
type SkipExtractor struct{}
func (*SkipExtractor) Done ¶
func (e *SkipExtractor) Done() bool
type StructExtractor ¶
type StructExtractor struct {
// contains filtered or unexported fields
}
func (*StructExtractor) Done ¶
func (e *StructExtractor) Done() bool
type TypeExtractor ¶
type TypeExtractor struct {
// contains filtered or unexported fields
}
func (*TypeExtractor) Done ¶
func (e *TypeExtractor) Done() bool
Click to show internal directories.
Click to hide internal directories.