Documentation ¶
Index ¶
- Variables
- func DetectInstanceCall(expr ast.Expr, calls []platform.InstanceCall) bool
- type APIParam
- type APIResopnse
- type GinAPI
- type GinIdentifier
- type Schema
- type SourceFile
- func (f *SourceFile) BuildStacks()
- func (f *SourceFile) EnumerateGinBind(Lbrace, Rbrace int) (paramName string)
- func (f *SourceFile) EnumerateGinHandles()
- func (f *SourceFile) EnumerateGinResponse(Lbrace, Rbrace int) (codes, structNames []string)
- func (f *SourceFile) EnumerateGinRoute(groupRoute string, Lbrace, Rbrace int)
- func (f *SourceFile) EnumerateLazy(prefix string, Lbrace, Rbrace int) (paths, methods, codes, structNames []string)
- func (f *SourceFile) EnumerateLazyModel(Lbrace, Rbrace int) (modelname string)
- func (f *SourceFile) EnumerateStructAndGinVars()
- func (f *SourceFile) Equal(another *SourceFile) bool
- func (f *SourceFile) FindCallLIdent(callIndex int) ast.Node
- func (f *SourceFile) FindGinInstance()
- func (f *SourceFile) NodeIndex(node ast.Node) int
- func (f *SourceFile) ParseFile() error
- func (f *SourceFile) PrintNode(callIndex int)
- func (f *SourceFile) StacksLength() int
- type Struct
Constants ¶
This section is empty.
Variables ¶
View Source
var Structs = []Struct{}
Functions ¶
func DetectInstanceCall ¶
func DetectInstanceCall(expr ast.Expr, calls []platform.InstanceCall) bool
Types ¶
type APIResopnse ¶
type GinAPI ¶
type GinAPI struct { Source *SourceFile Group string Method string Path string Node *ast.Node APIParam *APIParam APIResopnse []*APIResopnse }
func NewGinRoute ¶
func NewGinRoute() *GinAPI
type GinIdentifier ¶
type GinIdentifier struct { Source *SourceFile InstancingCall *ast.CallExpr Node *ast.Ident Calls []*ast.CallExpr }
func NewGinIdentifier ¶
func NewGinIdentifier() *GinIdentifier
func (*GinIdentifier) Equal ¶
func (g *GinIdentifier) Equal(another *GinIdentifier) bool
type Schema ¶
type Schema struct { ModuleFilePath string ModulePath string SourceFile []SourceFile GinIdentifiers []*GinIdentifier GinAPIs []*GinAPI // contains filtered or unexported fields }
var ProjSchema *Schema
func (*Schema) AddGinIdentifier ¶
func (s *Schema) AddGinIdentifier(source *SourceFile, ident *GinIdentifier) bool
func (*Schema) GinIdentifierWithFileIdent ¶
func (s *Schema) GinIdentifierWithFileIdent(source *SourceFile, callExpr *ast.CallExpr) *GinIdentifier
func (*Schema) LoadSourceFiles ¶
func (*Schema) ParseModules ¶
type SourceFile ¶
type SourceFile struct { FullPath string Path string PkgPath string Imports []*ast.ImportSpec FileSet *token.FileSet AstFile *ast.File Content []byte Decls map[string]string GinIdents []*ast.Ident // contains filtered or unexported fields }
func (*SourceFile) BuildStacks ¶
func (f *SourceFile) BuildStacks()
func (*SourceFile) EnumerateGinBind ¶
func (f *SourceFile) EnumerateGinBind(Lbrace, Rbrace int) (paramName string)
func (*SourceFile) EnumerateGinHandles ¶
func (f *SourceFile) EnumerateGinHandles()
func (*SourceFile) EnumerateGinResponse ¶
func (f *SourceFile) EnumerateGinResponse(Lbrace, Rbrace int) (codes, structNames []string)
func (*SourceFile) EnumerateGinRoute ¶
func (f *SourceFile) EnumerateGinRoute(groupRoute string, Lbrace, Rbrace int)
func (*SourceFile) EnumerateLazy ¶
func (f *SourceFile) EnumerateLazy(prefix string, Lbrace, Rbrace int) (paths, methods, codes, structNames []string)
func (*SourceFile) EnumerateLazyModel ¶
func (f *SourceFile) EnumerateLazyModel(Lbrace, Rbrace int) (modelname string)
func (*SourceFile) EnumerateStructAndGinVars ¶
func (f *SourceFile) EnumerateStructAndGinVars()
func (*SourceFile) Equal ¶
func (f *SourceFile) Equal(another *SourceFile) bool
func (*SourceFile) FindCallLIdent ¶
func (f *SourceFile) FindCallLIdent(callIndex int) ast.Node
/ast.Ident
func (*SourceFile) FindGinInstance ¶
func (f *SourceFile) FindGinInstance()
func (*SourceFile) ParseFile ¶
func (f *SourceFile) ParseFile() error
func (*SourceFile) PrintNode ¶
func (f *SourceFile) PrintNode(callIndex int)
func (*SourceFile) StacksLength ¶
func (f *SourceFile) StacksLength() int
Click to show internal directories.
Click to hide internal directories.