models

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicTypeMap = map[string]*GoBasicType{
	"bool": {/* contains filtered or unexported fields */},

	"string": {/* contains filtered or unexported fields */},
	"error":  {/* contains filtered or unexported fields */},
	"[]byte": {/* contains filtered or unexported fields */},

	"int8":  {/* contains filtered or unexported fields */},
	"int16": {/* contains filtered or unexported fields */},
	"int32": {/* contains filtered or unexported fields */},
	"int64": {/* contains filtered or unexported fields */},

	"byte":   {/* contains filtered or unexported fields */},
	"uint8":  {/* contains filtered or unexported fields */},
	"uint16": {/* contains filtered or unexported fields */},
	"uint32": {/* contains filtered or unexported fields */},
	"uint64": {/* contains filtered or unexported fields */},

	"float32": {/* contains filtered or unexported fields */},
	"float64": {/* contains filtered or unexported fields */},

	"int":  {/* contains filtered or unexported fields */},
	"uint": {/* contains filtered or unexported fields */},

	"uintptr": {/* contains filtered or unexported fields */},
}

Functions

This section is empty.

Types

type GoBasicType

type GoBasicType struct {
	// contains filtered or unexported fields
}

func (*GoBasicType) CType

func (t *GoBasicType) CType() string

func (*GoBasicType) DartCType

func (t *GoBasicType) DartCType() string

func (*GoBasicType) DartDefault

func (t *GoBasicType) DartDefault() string

func (*GoBasicType) DartType

func (t *GoBasicType) DartType() string

func (*GoBasicType) GoCType

func (t *GoBasicType) GoCType() string

func (*GoBasicType) GoType

func (t *GoBasicType) GoType() string

func (*GoBasicType) MapName

func (t *GoBasicType) MapName() string

func (*GoBasicType) NeedMap

func (t *GoBasicType) NeedMap() bool

func (*GoBasicType) String

func (t *GoBasicType) String() string

type GoField

type GoField struct {
	Name string
	Type GoType
}

func (*GoField) CName

func (f *GoField) CName() string

func (*GoField) CType

func (f *GoField) CType() string

func (*GoField) DartCType

func (f *GoField) DartCType() string

func (*GoField) DartDefault

func (f *GoField) DartDefault() string

func (*GoField) DartName

func (f *GoField) DartName() string

func (*GoField) DartType

func (f *GoField) DartType() string

func (*GoField) GoCType

func (f *GoField) GoCType() string

func (*GoField) GoName

func (f *GoField) GoName() string

func (*GoField) GoType

func (f *GoField) GoType() string

func (*GoField) InnerMost

func (f *GoField) InnerMost() GoType

func (*GoField) MapName

func (f *GoField) MapName() string

func (*GoField) NeedMap

func (f *GoField) NeedMap() bool

func (*GoField) String

func (f *GoField) String() string

type GoFuncType

type GoFuncType struct {
	Name               string        //函数名
	Params             *GoStructType //参数
	Results            *GoStructType //返回值
	HasParams          bool          //是否存在参数
	HasResults         bool          //是否存在返回
	ResultCount        int           //返回数量
	IsAnonymousResults bool          //是否匿名的返回
	HasErr             bool          //是否存在错误字段
}

func (*GoFuncType) CType

func (t *GoFuncType) CType() string

func (*GoFuncType) DartCType

func (t *GoFuncType) DartCType() string

func (*GoFuncType) DartDefault

func (t *GoFuncType) DartDefault() string

func (*GoFuncType) DartResultType

func (t *GoFuncType) DartResultType() string

func (*GoFuncType) DartType

func (t *GoFuncType) DartType() string

func (*GoFuncType) GoCType

func (t *GoFuncType) GoCType() string

func (*GoFuncType) GoType

func (t *GoFuncType) GoType() string

func (*GoFuncType) MapName

func (t *GoFuncType) MapName() string

func (*GoFuncType) NeedMap

func (t *GoFuncType) NeedMap() bool

func (*GoFuncType) String

func (t *GoFuncType) String() string

type GoIdentType

type GoIdentType struct {
	Name string
}

func (*GoIdentType) CType

func (t *GoIdentType) CType() string

func (*GoIdentType) DartCType

func (t *GoIdentType) DartCType() string

func (*GoIdentType) DartDefault

func (t *GoIdentType) DartDefault() string

func (*GoIdentType) DartType

func (t *GoIdentType) DartType() string

func (*GoIdentType) GoCType

func (t *GoIdentType) GoCType() string

func (*GoIdentType) GoType

func (t *GoIdentType) GoType() string

func (*GoIdentType) MapName

func (t *GoIdentType) MapName() string

func (*GoIdentType) NeedMap

func (t *GoIdentType) NeedMap() bool

func (*GoIdentType) String

func (t *GoIdentType) String() string

type GoPointerType

type GoPointerType struct {
	Inner GoType
}

func (*GoPointerType) CType

func (t *GoPointerType) CType() string

func (*GoPointerType) DartCType

func (t *GoPointerType) DartCType() string

func (*GoPointerType) DartDefault

func (t *GoPointerType) DartDefault() string

func (*GoPointerType) DartType

func (t *GoPointerType) DartType() string

func (*GoPointerType) GoCType

func (t *GoPointerType) GoCType() string

func (*GoPointerType) GoType

func (t *GoPointerType) GoType() string

func (*GoPointerType) MapName

func (t *GoPointerType) MapName() string

func (*GoPointerType) NeedMap

func (t *GoPointerType) NeedMap() bool

func (*GoPointerType) String

func (t *GoPointerType) String() string

type GoSliceType

type GoSliceType struct {
	Inner GoType
}

func (*GoSliceType) CType

func (t *GoSliceType) CType() string

func (*GoSliceType) DartCType

func (t *GoSliceType) DartCType() string

func (*GoSliceType) DartDefault

func (t *GoSliceType) DartDefault() string

func (*GoSliceType) DartType

func (t *GoSliceType) DartType() string

func (*GoSliceType) GoCType

func (t *GoSliceType) GoCType() string

func (*GoSliceType) GoType

func (t *GoSliceType) GoType() string

func (*GoSliceType) MapName

func (t *GoSliceType) MapName() string

func (*GoSliceType) NeedMap

func (t *GoSliceType) NeedMap() bool

func (*GoSliceType) String

func (t *GoSliceType) String() string

type GoStructType

type GoStructType struct {
	Type   GoType
	Fields []*GoField
}

func (*GoStructType) CType

func (t *GoStructType) CType() string

func (*GoStructType) DartCType

func (t *GoStructType) DartCType() string

func (*GoStructType) DartDefault

func (t *GoStructType) DartDefault() string

func (*GoStructType) DartType

func (t *GoStructType) DartType() string

func (*GoStructType) GoCType

func (t *GoStructType) GoCType() string

func (*GoStructType) GoType

func (t *GoStructType) GoType() string

func (*GoStructType) MapName

func (t *GoStructType) MapName() string

func (*GoStructType) NeedMap

func (t *GoStructType) NeedMap() bool

func (*GoStructType) String

func (t *GoStructType) String() string

type GoType

type GoType interface {
	String() string

	CType() string
	GoType() string
	GoCType() string
	DartType() string
	DartCType() string
	DartDefault() string
	MapName() string
	NeedMap() bool
}

type Package

type Package struct {
	ProjectNaming
	Module  string
	PkgPath string
	Structs []*GoStructType
	Funcs   []*GoFuncType
}

type ProjectNaming added in v0.1.2

type ProjectNaming struct {
	ProjectName     string // 蛇形命名的项目名(例如 "my_api")
	PackageName     string // 插件包名(例如 "com.flutter_gopher.my_api")
	PluginClassName string // 原生插件类名(例如 "MyApiPlugin")
	LibClassName    string // 库的类名(例如 "MyApi")
	LibName         string // 用于导入的库名(例如 "myapi")
	Timestamp       int64  // 用于标识导出函数唯一性
}

func NewProjectNaming added in v0.1.2

func NewProjectNaming(projectName string) ProjectNaming

func (*ProjectNaming) CreateTimestampFile added in v1.4.0

func (p *ProjectNaming) CreateTimestampFile(destDir string) error

CreateTimestampFile 创建 .timestamp 文件

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL