Documentation ¶
Index ¶
- func GoSourceRemoveCommentWithByte(in []byte) (out []byte)
- func IsNameGoExport(name string) bool
- func IsTypeEqual(t1 Type, t2 Type) bool
- func IsTypeGoTimeObj(typ Type) bool
- func MustWriteGoTypes(thisPackagePath string, typi Type) (s string, addPkgPathList []string)
- func MustWriteMethodCall(req MethodCallWriteRequest) string
- func OcSourceRemoveCommentWithByte(in []byte) (out []byte)
- func QybPkgAllStructToMap(objectPkgPath string) map[string]string
- func QybStructMethodInputAndOutputToMap(pkgPath string, objectName string) map[string]string
- func VisitNamedStruct(req VisitNamedStructRequest)
- type ArrayType
- type BuiltinType
- type ChanDir
- type ChanType
- type FuncOrMethodDeclaration
- func (t *FuncOrMethodDeclaration) Clone() *FuncOrMethodDeclaration
- func (t *FuncOrMethodDeclaration) Equal(typ Type) bool
- func (t *FuncOrMethodDeclaration) EqualMethod(typ Type) bool
- func (t *FuncOrMethodDeclaration) GetElem() Type
- func (t *FuncOrMethodDeclaration) GetInParameter() []FuncParameter
- func (t *FuncOrMethodDeclaration) GetKind() Kind
- func (t *FuncOrMethodDeclaration) GetName() string
- func (t *FuncOrMethodDeclaration) GetOutParameter() []FuncParameter
- func (t *FuncOrMethodDeclaration) HasInOrOutParameter() bool
- func (t *FuncOrMethodDeclaration) IsExport() bool
- func (t *FuncOrMethodDeclaration) SetName(name string)
- func (t *FuncOrMethodDeclaration) String() string
- type FuncParameter
- type FuncType
- type GoFileWriter
- func (gotpl *GoFileWriter) AddImportPath(importPath string)
- func (gotpl *GoFileWriter) AddImportPathList(importPathList []string)
- func (gotpl *GoFileWriter) AddImportPathWithAlias(importPath string, alias string)
- func (gotpl *GoFileWriter) AddUnderScoreImportPath(importPath string)
- func (gotpl *GoFileWriter) GetPkgImportPath() string
- func (gotpl *GoFileWriter) MergeFile(gotpl1 *GoFileWriter) *GoFileWriter
- func (gotpl *GoFileWriter) MustWriteFile(_filepath string, body []byte)
- func (gotpl *GoFileWriter) MustWriteFileWithSelfBuffer(_filepath string)
- func (gotpl *GoFileWriter) MustWriteFuncOrMethodDecl(decl *FuncOrMethodDeclaration) string
- func (gotpl *GoFileWriter) MustWriteGoTypePackagePrefix(pkgImportPath string) string
- func (gotpl *GoFileWriter) MustWriteGoTypes(objTyp Type) string
- func (gotpl *GoFileWriter) MustWriteNamedTypeDefine(namedType *NamedType) string
- func (gotpl *GoFileWriter) SetBuildFlagContent(content string)
- type InterfaceType
- type Kind
- type MapType
- type MethodCallWriteRequest
- type MustParseGoFuncDeclarationRequest
- type NamedType
- type Package
- func (pkg *Package) AddImport(pkgPath string)
- func (pkg *Package) GetAllMethodOnNamedType(name string) (output []*FuncOrMethodDeclaration)
- func (pkg *Package) GetDirPath() string
- func (pkg *Package) GetFuncList() []*FuncOrMethodDeclaration
- func (pkg *Package) GetImportList() []string
- func (pkg *Package) GetNamedTypeMethodSet(typ *NamedType) (output []*FuncOrMethodDeclaration)
- func (pkg *Package) GetPkgImportPath() string
- func (pkg *Package) IsInGoRoot() bool
- func (pkg *Package) IsMain() bool
- func (pkg *Package) LookupFunc(name string) *FuncOrMethodDeclaration
- func (pkg *Package) LookupNamedType(name string) *NamedType
- type PointerType
- type Program
- type SliceType
- type StructField
- type StructType
- type TagL1
- type Type
- type VisitNamedStructRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNameGoExport ¶
func IsTypeEqual ¶
func IsTypeGoTimeObj ¶
func MustWriteGoTypes ¶
func MustWriteMethodCall ¶
func MustWriteMethodCall(req MethodCallWriteRequest) string
func QybPkgAllStructToMap ¶
func VisitNamedStruct ¶
func VisitNamedStruct(req VisitNamedStructRequest)
Types ¶
type BuiltinType ¶
type BuiltinType string
func GetErrorType ¶
func GetErrorType() BuiltinType
func GetStringType ¶
func GetStringType() BuiltinType
func (BuiltinType) Equal ¶
func (t BuiltinType) Equal(typ Type) bool
func (BuiltinType) GetElem ¶
func (t BuiltinType) GetElem() Type
func (BuiltinType) GetKind ¶
func (t BuiltinType) GetKind() Kind
func (BuiltinType) String ¶
func (t BuiltinType) String() string
type FuncOrMethodDeclaration ¶
type FuncOrMethodDeclaration struct { Name string ReceiverVarName string ReceiverType Type InParameter []FuncParameter OutParameter []FuncParameter IsVariadic bool }
func MustParseGoFunc ¶
func MustParseGoFunc(s string) *FuncOrMethodDeclaration
func MustParseGoFuncDeclaration ¶
func MustParseGoFuncDeclaration(req MustParseGoFuncDeclarationRequest) *FuncOrMethodDeclaration
func (*FuncOrMethodDeclaration) Clone ¶
func (t *FuncOrMethodDeclaration) Clone() *FuncOrMethodDeclaration
func (*FuncOrMethodDeclaration) Equal ¶
func (t *FuncOrMethodDeclaration) Equal(typ Type) bool
func (*FuncOrMethodDeclaration) EqualMethod ¶
func (t *FuncOrMethodDeclaration) EqualMethod(typ Type) bool
func (*FuncOrMethodDeclaration) GetElem ¶
func (t *FuncOrMethodDeclaration) GetElem() Type
func (*FuncOrMethodDeclaration) GetInParameter ¶
func (t *FuncOrMethodDeclaration) GetInParameter() []FuncParameter
func (*FuncOrMethodDeclaration) GetKind ¶
func (t *FuncOrMethodDeclaration) GetKind() Kind
func (*FuncOrMethodDeclaration) GetName ¶
func (t *FuncOrMethodDeclaration) GetName() string
func (*FuncOrMethodDeclaration) GetOutParameter ¶
func (t *FuncOrMethodDeclaration) GetOutParameter() []FuncParameter
func (*FuncOrMethodDeclaration) HasInOrOutParameter ¶
func (t *FuncOrMethodDeclaration) HasInOrOutParameter() bool
func (*FuncOrMethodDeclaration) IsExport ¶
func (t *FuncOrMethodDeclaration) IsExport() bool
func (*FuncOrMethodDeclaration) SetName ¶
func (t *FuncOrMethodDeclaration) SetName(name string)
func (*FuncOrMethodDeclaration) String ¶
func (t *FuncOrMethodDeclaration) String() string
type FuncParameter ¶
func (FuncParameter) GetName ¶
func (p FuncParameter) GetName() string
func (FuncParameter) GetType ¶
func (p FuncParameter) GetType() Type
type FuncType ¶
type FuncType struct { InParameter []FuncParameter OutParameter []FuncParameter }
type GoFileWriter ¶
func NewGoFileContext ¶
func NewGoFileContext(PkgImportPath string) *GoFileWriter
func (*GoFileWriter) AddImportPath ¶
func (gotpl *GoFileWriter) AddImportPath(importPath string)
func (*GoFileWriter) AddImportPathList ¶
func (gotpl *GoFileWriter) AddImportPathList(importPathList []string)
func (*GoFileWriter) AddImportPathWithAlias ¶
func (gotpl *GoFileWriter) AddImportPathWithAlias(importPath string, alias string)
func (*GoFileWriter) AddUnderScoreImportPath ¶
func (gotpl *GoFileWriter) AddUnderScoreImportPath(importPath string)
func (*GoFileWriter) GetPkgImportPath ¶
func (gotpl *GoFileWriter) GetPkgImportPath() string
func (*GoFileWriter) MergeFile ¶
func (gotpl *GoFileWriter) MergeFile(gotpl1 *GoFileWriter) *GoFileWriter
func (*GoFileWriter) MustWriteFile ¶
func (gotpl *GoFileWriter) MustWriteFile(_filepath string, body []byte)
func (*GoFileWriter) MustWriteFileWithSelfBuffer ¶
func (gotpl *GoFileWriter) MustWriteFileWithSelfBuffer(_filepath string)
func (*GoFileWriter) MustWriteFuncOrMethodDecl ¶
func (gotpl *GoFileWriter) MustWriteFuncOrMethodDecl(decl *FuncOrMethodDeclaration) string
func (*GoFileWriter) MustWriteGoTypePackagePrefix ¶
func (gotpl *GoFileWriter) MustWriteGoTypePackagePrefix(pkgImportPath string) string
func (*GoFileWriter) MustWriteGoTypes ¶
func (gotpl *GoFileWriter) MustWriteGoTypes(objTyp Type) string
func (*GoFileWriter) MustWriteNamedTypeDefine ¶
func (gotpl *GoFileWriter) MustWriteNamedTypeDefine(namedType *NamedType) string
func (*GoFileWriter) SetBuildFlagContent ¶
func (gotpl *GoFileWriter) SetBuildFlagContent(content string)
type InterfaceType ¶
type InterfaceType struct { }
func (InterfaceType) Equal ¶
func (t InterfaceType) Equal(typ Type) bool
func (InterfaceType) GetElem ¶
func (t InterfaceType) GetElem() Type
func (InterfaceType) GetKind ¶
func (t InterfaceType) GetKind() Kind
func (InterfaceType) String ¶
func (t InterfaceType) String() string
type Kind ¶
type Kind uint
const ( Invalid Kind = 0 Bool Kind = 1 Int Kind = 2 Int8 Kind = 3 Int16 Kind = 4 Int32 Kind = 5 Int64 Kind = 6 Uint Kind = 7 Uint8 Kind = 8 Uint16 Kind = 9 Uint32 Kind = 10 Uint64 Kind = 11 Uintptr Kind = 12 Float32 Kind = 13 Float64 Kind = 14 Complex64 Kind = 15 Complex128 Kind = 16 Array Kind = 17 Chan Kind = 18 Func Kind = 19 Interface Kind = 20 Map Kind = 21 Ptr Kind = 22 Slice Kind = 23 String Kind = 24 Struct Kind = 25 UnsafePointer Kind = 26 Method Kind = 27 Named Kind = 28 DefinedFunc Kind = 29 )
type MethodCallWriteRequest ¶
type NamedType ¶
type NamedType struct { PkgImportPath string Name string UnderType Type // contains filtered or unexported fields }
func GetGoTimeType ¶
func GetGoTimeType() *NamedType
func NewNamedType ¶
func (*NamedType) GetPackageName ¶
func (*NamedType) GetUnderType ¶
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
func MustParsePackage ¶
func (*Package) GetAllMethodOnNamedType ¶
func (pkg *Package) GetAllMethodOnNamedType(name string) (output []*FuncOrMethodDeclaration)
func (*Package) GetDirPath ¶
func (*Package) GetFuncList ¶
func (pkg *Package) GetFuncList() []*FuncOrMethodDeclaration
func (*Package) GetImportList ¶
func (*Package) GetNamedTypeMethodSet ¶
func (pkg *Package) GetNamedTypeMethodSet(typ *NamedType) (output []*FuncOrMethodDeclaration)
func (*Package) GetPkgImportPath ¶
func (*Package) IsInGoRoot ¶
func (*Package) LookupFunc ¶
func (pkg *Package) LookupFunc(name string) *FuncOrMethodDeclaration
func (*Package) LookupNamedType ¶
type PointerType ¶
type PointerType struct {
Elem Type
}
func NewPointer ¶
func NewPointer(elem Type) *PointerType
func (*PointerType) Equal ¶
func (t *PointerType) Equal(typ Type) bool
func (*PointerType) GetElem ¶
func (t *PointerType) GetElem() Type
func (*PointerType) GetKind ¶
func (t *PointerType) GetKind() Kind
func (*PointerType) String ¶
func (t *PointerType) String() string
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
func NewProgram ¶
func NewProgramFromDefault ¶
func NewProgramFromDefault() *Program
func (*Program) GetNamedType ¶
func (*Program) GetPackageByPkgImportPath ¶
func (*Program) GetPackageByPkgPath ¶
type StructField ¶
func (StructField) Equal ¶
func (sf StructField) Equal(sf2 StructField) bool
func (StructField) GetTagL1List ¶
func (sf StructField) GetTagL1List() (outTagL1List []TagL1, errMsg string)
func (StructField) GetTagL1ValueByKeyIgnoreError ¶
func (sf StructField) GetTagL1ValueByKeyIgnoreError(key string) string
func (StructField) IsExport ¶
func (sf StructField) IsExport() bool
func (StructField) IsInTagList ¶
func (sf StructField) IsInTagList(key string, search string) bool
type StructType ¶
type StructType struct {
Field []StructField
}
func GetEmptyStructType ¶
func GetEmptyStructType() *StructType
func GetStructOrNamedStructFromType ¶
func GetStructOrNamedStructFromType(elemT Type) *StructType
func (*StructType) Equal ¶
func (t *StructType) Equal(typ Type) bool
func (*StructType) GetElem ¶
func (t *StructType) GetElem() Type
func (*StructType) GetKind ¶
func (t *StructType) GetKind() Kind
func (*StructType) IsEmpty ¶
func (t *StructType) IsEmpty() bool
func (*StructType) String ¶
func (t *StructType) String() string
type Type ¶
func GetFloat64Type ¶
func GetFloat64Type() Type
type VisitNamedStructRequest ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.