arraybuffer

package
v0.0.0-...-6e88d74 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ERR_ARRAYBUFFER_UNSUPPORTED = errors.New("ArrayBuffer unsupported")

Functions

func GetGlobalArrayBufferJSValue

func GetGlobalArrayBufferJSValue() js.Value

func IsArrayBufferSupported

func IsArrayBufferSupported() bool

func ValueIsInstanceOfArrayBuffer

func ValueIsInstanceOfArrayBuffer(value js.Value) bool

Types

type ArrayBuffer

type ArrayBuffer struct {
	JSValue js.Value
}

func NewArrayBuffer

func NewArrayBuffer(length int) (*ArrayBuffer, error)

func NewArrayBufferFromJSValue

func NewArrayBufferFromJSValue(jsvalue js.Value) (*ArrayBuffer, error)

func (*ArrayBuffer) Len

func (self *ArrayBuffer) Len() (int, error)

func (*ArrayBuffer) MakeReader

func (self *ArrayBuffer) MakeReader() (*ArrayBufferReader, error)

func (*ArrayBuffer) Slice

func (self *ArrayBuffer) Slice(
	begin int,
	end *int,
	contentType *string,
) (*ArrayBuffer, error)

TODO: maybe int64 is better solution, but I'm not sure

type ArrayBufferReader

type ArrayBufferReader struct {
	EOF bool
	// contains filtered or unexported fields
}

func NewArrayBufferReader

func NewArrayBufferReader(ab *ArrayBuffer) (*ArrayBufferReader, error)

func (*ArrayBufferReader) Read

func (self *ArrayBufferReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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