util

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NilErr       = ErrorString("sqlite3: invalid memory address or null pointer dereference")
	OOMErr       = ErrorString("sqlite3: out of memory")
	RangeErr     = ErrorString("sqlite3: index out of range")
	NoNulErr     = ErrorString("sqlite3: missing NUL terminator")
	NoGlobalErr  = ErrorString("sqlite3: could not find global: ")
	NoFuncErr    = ErrorString("sqlite3: could not find function: ")
	BinaryErr    = ErrorString("sqlite3: no SQLite binary embed/set/loaded")
	TimeErr      = ErrorString("sqlite3: invalid time value")
	WhenceErr    = ErrorString("sqlite3: invalid whence")
	OffsetErr    = ErrorString("sqlite3: invalid offset")
	TailErr      = ErrorString("sqlite3: multiple statements")
	IsolationErr = ErrorString("sqlite3: unsupported isolation level")
)

Variables

This section is empty.

Functions

func Finalizer

func Finalizer[T any](skip int) func(*T)

func NewMockModule

func NewMockModule(size uint32) api.Module

func ReadFloat64

func ReadFloat64(mod api.Module, ptr uint32) float64

func ReadString

func ReadString(mod api.Module, ptr, maxlen uint32) string

func ReadUint32

func ReadUint32(mod api.Module, ptr uint32) uint32

func ReadUint64

func ReadUint64(mod api.Module, ptr uint32) uint64

func RegisterFuncII added in v0.5.5

func RegisterFuncII[TR, T0 i32](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0) TR)

func RegisterFuncIII added in v0.5.5

func RegisterFuncIII[TR, T0, T1 i32](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0, _ T1) TR)

func RegisterFuncIIII added in v0.5.5

func RegisterFuncIIII[TR, T0, T1, T2 i32](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0, _ T1, _ T2) TR)

func RegisterFuncIIIII added in v0.5.5

func RegisterFuncIIIII[TR, T0, T1, T2, T3 i32](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0, _ T1, _ T2, _ T3) TR)

func RegisterFuncIIIIII added in v0.5.5

func RegisterFuncIIIIII[TR, T0, T1, T2, T3, T4 i32](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0, _ T1, _ T2, _ T3, _ T4) TR)

func RegisterFuncIIIIJ added in v0.5.5

func RegisterFuncIIIIJ[TR, T0, T1, T2 i32, T3 i64](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0, _ T1, _ T2, _ T3) TR)

func RegisterFuncIIJ added in v0.5.5

func RegisterFuncIIJ[TR, T0 i32, T1 i64](mod wazero.HostModuleBuilder, name string, fn func(ctx context.Context, mod api.Module, _ T0, _ T1) TR)

func View

func View(mod api.Module, ptr uint32, size uint64) []byte

func WriteBytes

func WriteBytes(mod api.Module, ptr uint32, b []byte)

func WriteFloat64

func WriteFloat64(mod api.Module, ptr uint32, v float64)

func WriteString

func WriteString(mod api.Module, ptr uint32, s string)

func WriteUint32

func WriteUint32(mod api.Module, ptr uint32, v uint32)

func WriteUint64

func WriteUint64(mod api.Module, ptr uint32, v uint64)

Types

type ErrorString

type ErrorString string

func AssertErr

func AssertErr() ErrorString

func (ErrorString) Error

func (e ErrorString) Error() string

Jump to

Keyboard shortcuts

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