core

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotEnoughArgs = errors.New("not enough arguments")
View Source
var ErrTooManyArgs = errors.New("too many arguments")
View Source
var ErrWriterCallUsage = errors.New(
	`invalid usage. Expected <writer>(reader)`)

Functions

func CheckArgCount

func CheckArgCount(args []nitro.Value, min, max int) error

func CloseReader

func CloseReader(r io.Reader)

func GetFloat

func GetFloat(args []nitro.Value, n int) (nitro.Float, error)

func GetInt

func GetInt(args []nitro.Value, n int) (nitro.Int, error)

func GetReader

func GetReader(vm *nitro.VM, args []nitro.Value, n int) (nitro.Reader, error)

func GetString

func GetString(args []nitro.Value, n int) (nitro.String, error)

Types

type NativeReader

type NativeReader interface {
	GetNativeReader() io.Reader
}

type NativeWriter

type NativeWriter interface {
	GetNativeWriter() io.Writer
}

type Value2Structer

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

func (*Value2Structer) Convert

func (s *Value2Structer) Convert(from nitro.Value, to interface{}) error

type WriterBase

type WriterBase struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewWriterBase

func NewWriterBase(w io.Writer) WriterBase

func (*WriterBase) Call

func (b *WriterBase) Call(m *nitro.VM, args []nitro.Value, nRet int) ([]nitro.Value, error)

func (*WriterBase) String

func (b *WriterBase) String() string

func (*WriterBase) Traits added in v0.3.0

func (b *WriterBase) Traits() vm.Traits

func (*WriterBase) Type

func (b *WriterBase) Type() string

Jump to

Keyboard shortcuts

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