webapi: github.com/gowebapi/webapi/file Index | Files | Directories

package file

import "github.com/gowebapi/webapi/file"

Package fileapi provides an API for representing file objects in web applications, as well as programmatically selecting them and accessing their data.

Source: File API (https://w3c.github.io/FileAPI/)

Index

Package Files

doc.go file.go

Constants

const (
    EMPTY   int = 0
    LOADING int = 1
    DONE    int = 2
)

type Blob Uses

type Blob struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Blob

func BlobFromJS Uses

func BlobFromJS(value js.Wrapper) *Blob

BlobFromJS is casting a js.Wrapper into Blob.

func NewBlob Uses

func NewBlob(blobParts []*Union, options *BlobPropertyBag) (_result *Blob)

func (*Blob) JSValue Uses

func (_this *Blob) JSValue() js.Value

func (*Blob) Size Uses

func (_this *Blob) Size() int

Size returning attribute 'size' with type int (idl: unsigned long long).

func (*Blob) Slice Uses

func (_this *Blob) Slice(start *int, end *int, contentType *string) (_result *Blob)

func (*Blob) Type Uses

func (_this *Blob) Type() string

Type returning attribute 'type' with type string (idl: DOMString).

type BlobCallback Uses

type BlobCallback js.Func

BlobCallback is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func BlobCallbackToJS Uses

func BlobCallbackToJS(callback BlobCallbackFunc) *BlobCallback

type BlobCallbackFunc Uses

type BlobCallbackFunc func(blob *Blob)

callback: BlobCallback

func BlobCallbackFromJS Uses

func BlobCallbackFromJS(_value js.Value) BlobCallbackFunc

type BlobPropertyBag Uses

type BlobPropertyBag struct {
    Type    string
    Endings EndingType
}

dictionary: BlobPropertyBag

func BlobPropertyBagFromJS Uses

func BlobPropertyBagFromJS(value js.Wrapper) *BlobPropertyBag

BlobPropertyBagFromJS is allocating a new BlobPropertyBag object and copy all values from input javascript object

func (*BlobPropertyBag) JSValue Uses

func (_this *BlobPropertyBag) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type EndingType Uses

type EndingType int

enum: EndingType

const (
    TransparentEndingType EndingType = iota
    NativeEndingType
)

func EndingTypeFromJS Uses

func EndingTypeFromJS(value js.Value) EndingType

EndingTypeFromJS is converting a javascript value into a EndingType enum value.

func (*EndingType) JSValue Uses

func (this *EndingType) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (EndingType) Value Uses

func (this EndingType) Value() string

Value is converting this into javascript defined string value

type File Uses

type File struct {
    Blob
}

class: File

func FileFromJS Uses

func FileFromJS(value js.Wrapper) *File

FileFromJS is casting a js.Wrapper into File.

func NewFile Uses

func NewFile(fileBits []*Union, fileName string, options *FilePropertyBag) (_result *File)

func (*File) LastModified Uses

func (_this *File) LastModified() int

LastModified returning attribute 'lastModified' with type int (idl: long long).

func (*File) Name Uses

func (_this *File) Name() string

Name returning attribute 'name' with type string (idl: DOMString).

func (*File) WebkitRelativePath Uses

func (_this *File) WebkitRelativePath() string

WebkitRelativePath returning attribute 'webkitRelativePath' with type string (idl: USVString).

type FileList Uses

type FileList struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: FileList

func FileListFromJS Uses

func FileListFromJS(value js.Wrapper) *FileList

FileListFromJS is casting a js.Wrapper into FileList.

func (*FileList) Index Uses

func (_this *FileList) Index(index uint) (_result *File)

func (*FileList) Item Uses

func (_this *FileList) Item(index uint) (_result *File)

func (*FileList) JSValue Uses

func (_this *FileList) JSValue() js.Value

func (*FileList) Length Uses

func (_this *FileList) Length() uint

Length returning attribute 'length' with type uint (idl: unsigned long).

type FilePropertyBag Uses

type FilePropertyBag struct {
    Type         string
    Endings      EndingType
    LastModified int
}

dictionary: FilePropertyBag

func FilePropertyBagFromJS Uses

func FilePropertyBagFromJS(value js.Wrapper) *FilePropertyBag

FilePropertyBagFromJS is allocating a new FilePropertyBag object and copy all values from input javascript object

func (*FilePropertyBag) JSValue Uses

func (_this *FilePropertyBag) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type FileReader Uses

type FileReader struct {
    domcore.EventTarget
}

class: FileReader

func FileReaderFromJS Uses

func FileReaderFromJS(value js.Wrapper) *FileReader

FileReaderFromJS is casting a js.Wrapper into FileReader.

func NewFileReader Uses

func NewFileReader() (_result *FileReader)

func (*FileReader) Abort Uses

func (_this *FileReader) Abort()

func (*FileReader) AddEventAbort Uses

func (_this *FileReader) AddEventAbort(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

AddAbort is adding doing AddEventListener for 'Abort' on target. This method is returning allocated javascript function that need to be released.

func (*FileReader) AddEventError Uses

func (_this *FileReader) AddEventError(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

AddError is adding doing AddEventListener for 'Error' on target. This method is returning allocated javascript function that need to be released.

func (*FileReader) AddEventLoad Uses

func (_this *FileReader) AddEventLoad(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

AddLoad is adding doing AddEventListener for 'Load' on target. This method is returning allocated javascript function that need to be released.

func (*FileReader) AddEventLoadEnd Uses

func (_this *FileReader) AddEventLoadEnd(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

AddLoadEnd is adding doing AddEventListener for 'LoadEnd' on target. This method is returning allocated javascript function that need to be released.

func (*FileReader) AddEventLoadStart Uses

func (_this *FileReader) AddEventLoadStart(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

AddLoadStart is adding doing AddEventListener for 'LoadStart' on target. This method is returning allocated javascript function that need to be released.

func (*FileReader) AddEventProgress Uses

func (_this *FileReader) AddEventProgress(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

AddProgress is adding doing AddEventListener for 'Progress' on target. This method is returning allocated javascript function that need to be released.

func (*FileReader) Error Uses

func (_this *FileReader) Error() *domcore.DOMException

Error returning attribute 'error' with type domcore.DOMException (idl: DOMException).

func (*FileReader) OnAbort Uses

func (_this *FileReader) OnAbort() domcore.EventHandlerFunc

OnAbort returning attribute 'onabort' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*FileReader) OnError Uses

func (_this *FileReader) OnError() domcore.EventHandlerFunc

OnError returning attribute 'onerror' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*FileReader) OnLoad Uses

func (_this *FileReader) OnLoad() domcore.EventHandlerFunc

OnLoad returning attribute 'onload' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*FileReader) OnLoadEnd Uses

func (_this *FileReader) OnLoadEnd() domcore.EventHandlerFunc

OnLoadEnd returning attribute 'onloadend' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*FileReader) OnLoadStart Uses

func (_this *FileReader) OnLoadStart() domcore.EventHandlerFunc

OnLoadStart returning attribute 'onloadstart' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*FileReader) OnProgress Uses

func (_this *FileReader) OnProgress() domcore.EventHandlerFunc

OnProgress returning attribute 'onprogress' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*FileReader) ReadAsArrayBuffer Uses

func (_this *FileReader) ReadAsArrayBuffer(blob *Blob)

func (*FileReader) ReadAsBinaryString Uses

func (_this *FileReader) ReadAsBinaryString(blob *Blob)

func (*FileReader) ReadAsDataURL Uses

func (_this *FileReader) ReadAsDataURL(blob *Blob)

func (*FileReader) ReadAsText Uses

func (_this *FileReader) ReadAsText(blob *Blob, encoding *string)

func (*FileReader) ReadyState Uses

func (_this *FileReader) ReadyState() int

ReadyState returning attribute 'readyState' with type int (idl: unsigned short).

func (*FileReader) Result Uses

func (_this *FileReader) Result() *Union

Result returning attribute 'result' with type Union (idl: Union).

func (*FileReader) SetOnAbort Uses

func (_this *FileReader) SetOnAbort(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

SetOnAbort is assigning a function to 'onabort'. This This method is returning allocated javascript function that need to be released.

func (*FileReader) SetOnError Uses

func (_this *FileReader) SetOnError(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

SetOnError is assigning a function to 'onerror'. This This method is returning allocated javascript function that need to be released.

func (*FileReader) SetOnLoad Uses

func (_this *FileReader) SetOnLoad(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

SetOnLoad is assigning a function to 'onload'. This This method is returning allocated javascript function that need to be released.

func (*FileReader) SetOnLoadEnd Uses

func (_this *FileReader) SetOnLoadEnd(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

SetOnLoadEnd is assigning a function to 'onloadend'. This This method is returning allocated javascript function that need to be released.

func (*FileReader) SetOnLoadStart Uses

func (_this *FileReader) SetOnLoadStart(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

SetOnLoadStart is assigning a function to 'onloadstart'. This This method is returning allocated javascript function that need to be released.

func (*FileReader) SetOnProgress Uses

func (_this *FileReader) SetOnProgress(listener func(event *xhr.ProgressEvent, currentTarget *FileReader)) js.Func

SetOnProgress is assigning a function to 'onprogress'. This This method is returning allocated javascript function that need to be released.

type FileReaderSync Uses

type FileReaderSync struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: FileReaderSync

func FileReaderSyncFromJS Uses

func FileReaderSyncFromJS(value js.Wrapper) *FileReaderSync

FileReaderSyncFromJS is casting a js.Wrapper into FileReaderSync.

func NewFileReaderSync Uses

func NewFileReaderSync() (_result *FileReaderSync)

func (*FileReaderSync) JSValue Uses

func (_this *FileReaderSync) JSValue() js.Value

func (*FileReaderSync) ReadAsArrayBuffer Uses

func (_this *FileReaderSync) ReadAsArrayBuffer(blob *Blob) (_result *javascript.ArrayBuffer)

func (*FileReaderSync) ReadAsBinaryString Uses

func (_this *FileReaderSync) ReadAsBinaryString(blob *Blob) (_result string)

func (*FileReaderSync) ReadAsDataURL Uses

func (_this *FileReaderSync) ReadAsDataURL(blob *Blob) (_result string)

func (*FileReaderSync) ReadAsText Uses

func (_this *FileReaderSync) ReadAsText(blob *Blob, encoding *string) (_result string)

type PromiseBlob Uses

type PromiseBlob struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Promise

func PromiseBlobFromJS Uses

func PromiseBlobFromJS(value js.Wrapper) *PromiseBlob

PromiseBlobFromJS is casting a js.Wrapper into PromiseBlob.

func (*PromiseBlob) Catch Uses

func (_this *PromiseBlob) Catch(onRejected *PromiseBlobOnRejected) (_result *PromiseBlob)

func (*PromiseBlob) Finally Uses

func (_this *PromiseBlob) Finally(onFinally *javascript.PromiseFinally) (_result *PromiseBlob)

func (*PromiseBlob) JSValue Uses

func (_this *PromiseBlob) JSValue() js.Value

func (*PromiseBlob) Then Uses

func (_this *PromiseBlob) Then(onFulfilled *PromiseBlobOnFulfilled, onRejected *PromiseBlobOnRejected) (_result *PromiseBlob)

type PromiseBlobOnFulfilled Uses

type PromiseBlobOnFulfilled js.Func

PromiseBlobOnFulfilled is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseBlobOnFulfilledToJS Uses

func PromiseBlobOnFulfilledToJS(callback PromiseBlobOnFulfilledFunc) *PromiseBlobOnFulfilled

type PromiseBlobOnFulfilledFunc Uses

type PromiseBlobOnFulfilledFunc func(value *Blob)

callback: PromiseTemplateOnFulfilled

func PromiseBlobOnFulfilledFromJS Uses

func PromiseBlobOnFulfilledFromJS(_value js.Value) PromiseBlobOnFulfilledFunc

type PromiseBlobOnRejected Uses

type PromiseBlobOnRejected js.Func

PromiseBlobOnRejected is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseBlobOnRejectedToJS Uses

func PromiseBlobOnRejectedToJS(callback PromiseBlobOnRejectedFunc) *PromiseBlobOnRejected

type PromiseBlobOnRejectedFunc Uses

type PromiseBlobOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseBlobOnRejectedFromJS Uses

func PromiseBlobOnRejectedFromJS(_value js.Value) PromiseBlobOnRejectedFunc

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Directories

PathSynopsis
entriesPackage entries is file and directory upload by drag-and-drop operations.

Package file imports 4 packages (graph) and is imported by 12 packages. Updated 2019-09-17. Refresh now. Tools for package owners.