api

package
v0.0.0-...-26c9caf Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNTIME_METATABLE = "gobufrkit.runtime"
	DESERIALIZER      = "DESERIALIZER"
)
View Source
const DESERIALIZER_META_TABLE = "gobufrkit.deserializer"
View Source
const FIELD_META_TABLE = "gobufrkit.field"
View Source
const MESSAGE_META_TABLE = "gobufrkit.message"
View Source
const SECTION_META_TABLE = "gobufrkit.section"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DefinitionsPath string
	TablesPath      string

	// Only binary stream provides compressed data
	// in the format described by the BUFR Spec.
	InputType  tdcfio.InputType
	Compatible bool
	Verbose    bool
}

type LibDeserializer

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

func (*LibDeserializer) Register

func (lib *LibDeserializer) Register(state *lua.State) int

type ObjField

type ObjField struct {
}

type ObjMessage

type ObjMessage struct {
}

type ObjSection

type ObjSection struct {
}

type Runtime

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

func NewRuntime

func NewRuntime(config *Config, pr tdcfio.PeekableReader) (*Runtime, error)

func (*Runtime) Run

func (rt *Runtime) Run() (*bufr.Message, error)

type ScriptRt

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

func NewScriptRt

func NewScriptRt(definitionsPath string, factory deserialize.Factory) *ScriptRt

func (*ScriptRt) Initialize

func (r *ScriptRt) Initialize() error

Initialize the runtime. This will setup the bindings and perform other initialization stuff.

func (*ScriptRt) Load

func (r *ScriptRt) Load(reader io.Reader, chunkName, keyName string) error

Load a script and save as a field to the runtime metatable

func (*ScriptRt) NewGlobalSimpleValue

func (r *ScriptRt) NewGlobalSimpleValue(name string, value interface{})

Add a new global simple value using the given name

func (*ScriptRt) NewGlobalUserData

func (r *ScriptRt) NewGlobalUserData(name string, value interface{}, metaName string)

Add a new global user data using the given name and metatable

func (*ScriptRt) RunDeserializer

func (r *ScriptRt) RunDeserializer() (*bufr.Message, error)

Get the decoder func from the runtime metatable and execute it

Jump to

Keyboard shortcuts

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