Documentation ¶
Index ¶
- type AnyOf
- type GoArray
- type GoAssignStmt
- type GoBasicLit
- type GoCall
- type GoCompositeLit
- type GoExpr
- func (p *GoExpr) Inspect(f InspectFunc, ctx context.Context)
- func (p *GoExpr) IsArray() bool
- func (p *GoExpr) IsIdent() bool
- func (p *GoExpr) IsInterface() bool
- func (p *GoExpr) IsMap() bool
- func (p *GoExpr) IsSelector() bool
- func (p *GoExpr) IsStruct() bool
- func (p *GoExpr) Name() string
- func (p *GoExpr) Node() GoNode
- func (p *GoExpr) Options() Options
- func (p *GoExpr) Position() (begin token.Position, end token.Position)
- func (p *GoExpr) Print() error
- func (p *GoExpr) Root() *GoExpr
- func (p *GoExpr) Snippet() (code string, err error)
- func (p *GoExpr) String() string
- func (p *GoExpr) Type() string
- type GoField
- type GoFieldList
- type GoFile
- func (p *GoFile) Filename() string
- func (p *GoFile) FindImportByName(name string) (goPkg *GoPackage, exist bool)
- func (p *GoFile) FindImportByPath(importPath string) (*GoPackage, bool)
- func (p *GoFile) FindType(typeName string) (goType *GoExpr, exist bool)
- func (p *GoFile) Func(i int) *GoFunc
- func (p *GoFile) Imports() []string
- func (p *GoFile) InGoRoot() bool
- func (p *GoFile) NumFuncs() int
- func (p *GoFile) NumTypes() int
- func (p *GoFile) NumVars() int
- func (p *GoFile) Package() *GoPackage
- func (p *GoFile) Print() error
- func (p *GoFile) ShortFilename() string
- func (p *GoFile) String() string
- func (p *GoFile) Type(i int) *GoExpr
- func (p *GoFile) Var(i int) *GoExpr
- type GoFunc
- func (p *GoFunc) FindAssigment(identName string) (assignStmt *GoAssignStmt, exist bool)
- func (p *GoFunc) FindCall(funcName string) (call *GoCall, exist bool)
- func (p *GoFunc) GetReturnStmt() *GoReturnStmt
- func (p *GoFunc) Name() string
- func (p *GoFunc) Params() *GoFieldList
- func (p *GoFunc) Position() (token.Position, token.Position)
- func (p *GoFunc) Print() error
- func (p *GoFunc) Receiver() string
- func (p *GoFunc) Results() *GoFieldList
- func (p *GoFunc) Root() *GoExpr
- type GoIdent
- type GoInterface
- type GoMap
- type GoNode
- type GoNodeInspectable
- type GoPackage
- func (p *GoPackage) File(i int) *GoFile
- func (p *GoPackage) FindFunc(funcName string) (fn *GoFunc, exist bool)
- func (p *GoPackage) FindType(typeName string) (goType *GoExpr, exist bool)
- func (p *GoPackage) Func(funcIndex int) *GoFunc
- func (p *GoPackage) InGoRoot() bool
- func (p *GoPackage) Name() string
- func (p *GoPackage) NumFile() int
- func (p *GoPackage) NumFuncs() int
- func (p *GoPackage) NumTypes() int
- func (p *GoPackage) NumVars() int
- func (p *GoPackage) Options() Options
- func (p *GoPackage) PackageDir() string
- func (p *GoPackage) Path() string
- func (p *GoPackage) Type(typeIndex int) *GoExpr
- func (p *GoPackage) Var(varIndex int) *GoExpr
- type GoPackageOption
- type GoReturnStmt
- type GoSelector
- func (p *GoSelector) GetSelName() string
- func (p *GoSelector) Inspect(f InspectFunc, ctx context.Context)
- func (p *GoSelector) IsInOtherPackage() bool
- func (p *GoSelector) Position() (token.Position, token.Position)
- func (p *GoSelector) Print() error
- func (p *GoSelector) UsingPackage() *GoPackage
- func (p *GoSelector) X() *GoExpr
- type GoStar
- type GoStruct
- type GoType
- func (p *GoType) Inspect(f InspectFunc, ctx context.Context)
- func (p *GoType) IsArray() bool
- func (p *GoType) IsInterface() bool
- func (p *GoType) IsMap() bool
- func (p *GoType) IsSelector() bool
- func (p *GoType) IsStruct() bool
- func (p *GoType) Method(i int) *GoFunc
- func (p *GoType) MethodByName(name string) *GoFunc
- func (p *GoType) Node() GoNode
- func (p *GoType) NumMethods() int
- func (p *GoType) Position() (token.Position, token.Position)
- func (p *GoType) Print() error
- func (p *GoType) String() string
- type GoUnary
- type InspectFunc
- type JsonSchema
- type Option
- type Options
- type StructTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoAssignStmt ¶
type GoAssignStmt struct {
// contains filtered or unexported fields
}
func (*GoAssignStmt) Inspect ¶
func (p *GoAssignStmt) Inspect(f InspectFunc, ctx context.Context)
func (*GoAssignStmt) IsBasic ¶
func (p *GoAssignStmt) IsBasic() bool
func (*GoAssignStmt) Print ¶
func (p *GoAssignStmt) Print() error
type GoBasicLit ¶
type GoBasicLit struct {
// contains filtered or unexported fields
}
func (*GoBasicLit) Inspect ¶
func (p *GoBasicLit) Inspect(f InspectFunc, ctx context.Context)
func (*GoBasicLit) Kind ¶
func (p *GoBasicLit) Kind() string
func (*GoBasicLit) Print ¶
func (p *GoBasicLit) Print() error
func (*GoBasicLit) Value ¶
func (p *GoBasicLit) Value() string
type GoCompositeLit ¶
type GoCompositeLit struct {
// contains filtered or unexported fields
}
func (*GoCompositeLit) Inspect ¶
func (p *GoCompositeLit) Inspect(f InspectFunc, ctx context.Context)
func (*GoCompositeLit) Position ¶
func (p *GoCompositeLit) Position() (token.Position, token.Position)
func (*GoCompositeLit) Print ¶
func (p *GoCompositeLit) Print() error
func (*GoCompositeLit) Type ¶
func (p *GoCompositeLit) Type() *GoExpr
type GoExpr ¶
type GoExpr struct {
// contains filtered or unexported fields
}
func (*GoExpr) IsInterface ¶
func (*GoExpr) IsSelector ¶
type GoField ¶
type GoField struct {
// contains filtered or unexported fields
}
func (*GoField) IsExported ¶
type GoFieldList ¶
type GoFieldList struct {
// contains filtered or unexported fields
}
func (*GoFieldList) Field ¶
func (p *GoFieldList) Field(i int) *GoField
func (*GoFieldList) NumFields ¶
func (p *GoFieldList) NumFields() int
func (*GoFieldList) Print ¶
func (p *GoFieldList) Print() error
func (*GoFieldList) TypesAre ¶
func (p *GoFieldList) TypesAre(paramsType ...string) bool
type GoFile ¶
type GoFile struct { *GoExpr // contains filtered or unexported fields }
func (*GoFile) FindImportByName ¶
func (*GoFile) FindImportByPath ¶
func (*GoFile) ShortFilename ¶
type GoFunc ¶
type GoFunc struct {
// contains filtered or unexported fields
}
func (*GoFunc) FindAssigment ¶
func (p *GoFunc) FindAssigment(identName string) (assignStmt *GoAssignStmt, exist bool)
func (*GoFunc) GetReturnStmt ¶
func (p *GoFunc) GetReturnStmt() *GoReturnStmt
func (*GoFunc) Params ¶
func (p *GoFunc) Params() *GoFieldList
func (*GoFunc) Results ¶
func (p *GoFunc) Results() *GoFieldList
type GoIdent ¶
type GoIdent struct {
// contains filtered or unexported fields
}
func (*GoIdent) ObjectKind ¶
type GoInterface ¶
type GoInterface struct {
// contains filtered or unexported fields
}
func (*GoInterface) Inspect ¶
func (p *GoInterface) Inspect(f InspectFunc, ctx context.Context)
func (*GoInterface) Print ¶
func (p *GoInterface) Print() error
type GoNodeInspectable ¶
type GoNodeInspectable interface {
Inspect(f InspectFunc, ctx context.Context)
}
type GoPackage ¶
type GoPackage struct {
// contains filtered or unexported fields
}
func NewGoPackage ¶
func (*GoPackage) PackageDir ¶
type GoPackageOption ¶
type GoReturnStmt ¶
type GoReturnStmt struct {
// contains filtered or unexported fields
}
func (*GoReturnStmt) NumResults ¶
func (p *GoReturnStmt) NumResults() int
func (*GoReturnStmt) Position ¶
func (p *GoReturnStmt) Position() token.Position
func (*GoReturnStmt) Print ¶
func (p *GoReturnStmt) Print() error
func (*GoReturnStmt) Result ¶
func (p *GoReturnStmt) Result(i int) *GoExpr
type GoSelector ¶
type GoSelector struct {
// contains filtered or unexported fields
}
func (*GoSelector) GetSelName ¶
func (p *GoSelector) GetSelName() string
func (*GoSelector) Inspect ¶
func (p *GoSelector) Inspect(f InspectFunc, ctx context.Context)
func (*GoSelector) IsInOtherPackage ¶
func (p *GoSelector) IsInOtherPackage() bool
func (*GoSelector) Print ¶
func (p *GoSelector) Print() error
func (*GoSelector) UsingPackage ¶
func (p *GoSelector) UsingPackage() *GoPackage
func (*GoSelector) X ¶
func (p *GoSelector) X() *GoExpr
type GoType ¶
type GoType struct {
// contains filtered or unexported fields
}
func (*GoType) IsInterface ¶
func (*GoType) IsSelector ¶
func (*GoType) MethodByName ¶
func (*GoType) NumMethods ¶
type JsonSchema ¶
type JsonSchema struct { Schema string `json:"$schema,omitempty"` Id string `json:"id,omitempty"` Type string `json:"type,omitempty"` AnyOf *AnyOf `json:"anyOf,omitempty"` Items *JsonSchema `json:"items,omitempty"` Properties map[string]*JsonSchema `json:"properties,omitempty"` }
func NodeToJsonSchema ¶
func NodeToJsonSchema(goNode GoNode) (schema JsonSchema, err error)
type Option ¶
func OptionExprInGoFile ¶
func OptionGoPackage ¶
func OptionGoPath ¶
func OptionGoRoot ¶
func OptionImportByFile ¶
func OptionImportByPackage ¶
type Options ¶
type StructTag ¶
type StructTag string
func (StructTag) Get ¶
Get returns the value associated with key in the tag string. If there is no such key in the tag, Get returns the empty string. If the tag does not have the conventional format, the value returned by Get is unspecified. To determine whether a tag is explicitly set to the empty string, use Lookup.
func (StructTag) Lookup ¶
Lookup returns the value associated with key in the tag string. If the key is present in the tag the value (which may be empty) is returned. Otherwise the returned value will be the empty string. The ok return value reports whether the value was explicitly set in the tag string. If the tag does not have the conventional format, the value returned by Lookup is unspecified.
Source Files ¶
- go_array.go
- go_assign_stmt.go
- go_basic_lit.go
- go_call.go
- go_composite_lit.go
- go_expr.go
- go_field.go
- go_field_list.go
- go_file.go
- go_func.go
- go_ident.go
- go_interface.go
- go_map.go
- go_node.go
- go_package.go
- go_return_stmt.go
- go_selector.go
- go_star.go
- go_struct.go
- go_type.go
- go_unary.go
- json_schema.go
- options.go
- struct_tag.go
- utils.go