blob

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalBlobJSValue

func GetGlobalBlobJSValue() js.Value

func IsBlobSupported

func IsBlobSupported() bool

func ValueIsInstanceOfBlob

func ValueIsInstanceOfBlob(v js.Value) bool

Types

type Blob

type Blob struct {
	JSValue js.Value
}

func NewBlobFromArray

func NewBlobFromArray(array js.Value) (ret *Blob, err error)

func NewBlobFromJSValue

func NewBlobFromJSValue(jsvalue js.Value) (*Blob, error)

func (*Blob) ArrayBuffer

func (self *Blob) ArrayBuffer() (*arraybuffer.ArrayBuffer, error)

func (*Blob) MakeReader

func (self *Blob) MakeReader() (*BlobReader, error)

func (*Blob) Size

func (self *Blob) Size() (int, error)

func (*Blob) Slice

func (self *Blob) Slice(start *int, end *int, contentType *string) (
	*Blob,
	error,
)

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

func (*Blob) Text

func (self *Blob) Text() (*promise.Promise, error)

func (*Blob) Type

func (self *Blob) Type() (string, error)

type BlobReader

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

func NewBlobReader

func NewBlobReader(blob *Blob) (*BlobReader, error)

func (*BlobReader) Read

func (self *BlobReader) 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