core

package
v0.0.0-...-2bcc667 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 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 Core

type Core struct {
	FileBinary []byte
	// FilePath   string
	Result map[string]Value
	// contains filtered or unexported fields
}

Core 内核

func New

func New(features []string) *Core

New 实例化core

func (*Core) Bind

func (core *Core) Bind(processor *Processor)

Bind 绑定处理器

func (*Core) GetResult

func (core *Core) GetResult() Result

GetResult 获取结果

func (*Core) Run

func (core *Core) Run(filePath string)

Run 运行

func (*Core) RunBinary

func (core *Core) RunBinary(binary []byte)

RunBinary 二进制运行

type Processor

type Processor struct {
	Keys          []string
	PreConditions []string
	Runner        func(*Core) map[string]Value
}

Processor 处理器

type RGBA

type RGBA struct {
	R int
	G int
	B int
	A int
}

RGBA 值

type Result

type Result map[string]Value

Result 结果

type Value

type Value struct {
	Type   ValueType
	Int    int
	String string
	Bytes  []byte
	Rgba   []RGBA
	Rect   []ValuePosition
	Values map[string]Value
	List   []Value
	Frames []Value
}

Value 值

type ValuePosition

type ValuePosition struct {
	X int
	Y int
}

type ValueType

type ValueType int

ValueType 值类型

const (
	// ValueTypeInt int
	ValueTypeInt ValueType = 0
	// ValueTypeString string
	ValueTypeString ValueType = 1
	// ValueTypeBytes bytes
	ValueTypeBytes ValueType = 2
	// ValueTypeRGBA rgba
	ValueTypeRGBA ValueType = 3
	// ValueTypeMap map[key] ValueType
	ValueTypeMap ValueType = 4
	// ValueTypeList []value
	ValueTypeList ValueType = 5
	// ValueTypeRect []ValuePosition
	ValueTypeRect ValueType = 6
	// ValueTypeFrame []ValueP
	ValueTypeFrames ValueType = 7
)

Jump to

Keyboard shortcuts

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