model

package
v0.0.0-...-6ea5f18 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Child

type Child struct {
	Name string
	Path fs.Path
	Href string
}

type ComplexType

type ComplexType struct {
	KeyType   *SimpleType
	ValueType *SimpleType
	IsMap     bool
	IsArray   bool
}

ComplexType 表示一个复杂的类型(array|map)

func (*ComplexType) Clone

func (inst *ComplexType) Clone(deep bool) *ComplexType

func (*ComplexType) String

func (inst *ComplexType) String() string

type GoImport

type GoImport struct {
	DefaultAlias string
	Alias        string
	Path         string
	NoHash       bool
}

GoImport 代表一个导入语句

type GoSource

type GoSource struct {
	Package    PackageRef
	ImportList []*GoImport
	StructList []*Struct
}

GoSource 代表一个Go源文件

type Node

type Node struct {
	Version string
	Path    fs.Path
	// Text        string
	Properties  collection.Properties
	Parent      *Node
	Children    []*Child
	ScanTargets []*Scan
}

type Package

type Package struct {
	FullName string
	Alias    string
}

type PackageRef

type PackageRef struct {
	FullName string
	Alias    string
}

type Scan

type Scan struct {
	Name         string
	Path         fs.Path
	WriteTo      fs.Path
	Href         string
	WriteToChild string
	WriteToFile  string
	R            bool
}

type SimpleType

type SimpleType struct {
	TypeName     string // the 'b' of 'a.b'
	PackageName  string // aka. PackagePath
	PackageAlias string // the 'a' of 'a.b'
	HasStar      bool   // the '*'
}

SimpleType 表示一个简单的类型(number|struct|interface)

func (*SimpleType) Clone

func (inst *SimpleType) Clone() *SimpleType

func (*SimpleType) String

func (inst *SimpleType) String() string

type Struct

type Struct struct {
	// OwnerPackage *PackageRef
	Name   string
	Type   SimpleType
	Fields []*StructField
}

Struct 代表一个Go结构体

func (*Struct) IsComponentDefine

func (o *Struct) IsComponentDefine() bool

IsComponentDefine 判断结构是否是一个组件定义

type StructField

type StructField struct {
	Name     string
	Tag      string
	TypeExpr string

	Type     ComplexType
	TagItems map[string]string
}

StructField 表示结构的一个字段

type StructMethod

type StructMethod struct {
	Owner *Struct
}

type StructRef

type StructRef struct {
}

StructRef 是对Struct 的引用

Jump to

Keyboard shortcuts

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