blob

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrNotAnBlob ErrNotAnBlob error
	ErrNotABlob       = errors.New("Object is not a Blob")
	ErrNotImplemented = errors.New("Browser not implemented Blob")
)

Functions

func GetInterface

func GetInterface() js.Value

GetInterface get the JS interface Blob

Types

type Blob

type Blob struct {
	baseobject.BaseObject
}

func New

func New(values ...interface{}) (Blob, error)

func NewFromJSObject

func NewFromJSObject(obj js.Value) (Blob, error)

func NewWithArrayBuffer

func NewWithArrayBuffer(a arraybuffer.ArrayBuffer) (Blob, error)

func NewWithObject

func NewWithObject(o js.Value) (Blob, error)

func (Blob) ArrayBuffer

func (b Blob) ArrayBuffer() (promise.Promise, error)

func (Blob) Blob_

func (b Blob) Blob_() Blob

func (Blob) Close

func (b Blob) Close() error

func (Blob) IsClosed

func (b Blob) IsClosed() (bool, error)

func (Blob) Size

func (b Blob) Size() (int64, error)

func (Blob) Slice

func (b Blob) Slice(begin, end int64) (Blob, error)

func (Blob) Stream

func (b Blob) Stream() (stream.ReadableStream, error)

func (Blob) Text

func (b Blob) Text() (promise.Promise, error)

func (Blob) Type

func (b Blob) Type() (string, error)

type BlobFrom

type BlobFrom interface {
	Blob_() Blob
}

type BlobStream

type BlobStream struct {
	Blob
	// contains filtered or unexported fields
}

func NewBlobStream

func NewBlobStream(blob Blob) BlobStream

func (*BlobStream) AsyncRead

func (b *BlobStream) AsyncRead(data []byte, dataHandle func([]byte, int)) (promise.Promise, error)

func (BlobStream) GetBlob

func (b BlobStream) GetBlob() Blob

func (*BlobStream) Write

func (b *BlobStream) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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