Documentation ¶
Index ¶
- func GetModulePath(dirPath string) (modPath string, err error)
- type Field
- type File
- type Function
- type Package
- type Parser
- func (p *Parser) GetFunctions() (functions []Function)
- func (p *Parser) GetPackageName() string
- func (p *Parser) GetTypes() (specs []*TypeSpec, err error)
- func (p *Parser) Parse(pkgPath string) error
- func (p *Parser) ToFiles() (files []File)
- func (p *Parser) UpgradeApiImports(imports []string, upgrade func(string) string) bool
- type ResultFields
- type StructType
- type Type
- type TypeSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetModulePath ¶
Types ¶
type Package ¶
func NewPackage ¶
NewPackage returns new Packege instance wit initialized Name, Alias and Path.
type Parser ¶
type Parser struct { Package *Package Service *tieTypes.Service Pkg *types.Package // contains filtered or unexported fields }
func (*Parser) GetFunctions ¶
GetFunctions returns exported functions from package
func (*Parser) GetPackageName ¶
GetPackageName returns package name.
func (*Parser) Parse ¶
Parse initializes parser by parsing package. Should be called before any other method.
type ResultFields ¶
type ResultFields struct { Last Field // contains filtered or unexported fields }
TODO make Last field of type ErrField ("parse, not validate")
func (ResultFields) List ¶
func (rf ResultFields) List() []Field
type StructType ¶
func NewStructType ¶
func NewStructType(name string, fields []Field) StructType
Click to show internal directories.
Click to hide internal directories.