base

package
v0.0.0-...-78131e7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataDecl

type DataDecl struct {
	Name   string
	Fields []FieldDecl
}

数据声明

type DataType

type DataType uint8

type DeclType

type DeclType int8

type FieldDecl

type FieldDecl struct {
	Name string // 名字
	Desc string // 描述
	Ext  string // 扩展
	Pos  uint8  // 位置
	*TDecl
}

字段声明

type Generator

type Generator interface {
	GenReaders(names ...string) (map[string]Reader, error)
}

生成器

type Linker

type Linker interface {
	Link(names ...string) error
}

链接器

type Parser

type Parser interface {
	ParseType(string) (*TDecl, error)
	ParseValue(*TDecl, string) (*TData, error)
}

解析器

type Reader

type Reader interface {
	ReadMeta(context.Context) (*TMeta, error)
	ReadData(context.Context) (*TData, error)
	Close()
}

读取器

type TData

type TData struct {
	DType  DataType       // 类型
	DValue unsafe.Pointer // 值
}

通用数据

type TDecl

type TDecl struct {
	DType   DeclType       // 类型
	Pointer unsafe.Pointer // 值
}

类型声明

type TMeta

type TMeta struct {
	Name      string
	Templates []*Template
	Decl      *DataDecl
}

元数据

type Template

type Template struct {
	Name string
	Out  string
	Args []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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