indexeddb

package
v0.0.0-...-41cedfc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Overview

Package indexeddb is a database of records holding simple values and hierarchical objects.

Example (Open)
package main

import (
	"github.com/gowebapi/webapi"
	"github.com/gowebapi/webapi/dom/domcore"
	"github.com/gowebapi/webapi/indexeddb"
)

func main() {
	request := webapi.GetWindow().IndexedDB().Open("test", nil)
	request.AddEventSuccess(func(event *domcore.Event, target *indexeddb.IDBRequest) {})
	request.AddEventUpgradeNeeded(func(event *domcore.Event, currentTarget *indexeddb.IDBOpenDBRequest) {
		db := indexeddb.IDBDatabaseFromJS(request.Result())
		db.CreateObjectStore("names", &indexeddb.IDBObjectStoreParameters{
			AutoIncrement: true,
		})
		/* javascript version is:
		   var db = event.target.result;
		   var objStore = db.createObjectStore("names", { autoIncrement : true });
		*/
	})
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDBCursor

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

class: IDBCursor

func IDBCursorFromJS

func IDBCursorFromJS(value js.Value) *IDBCursor

IDBCursorFromJS is casting a js.Value into IDBCursor.

func IDBCursorFromWrapper

func IDBCursorFromWrapper(input core.Wrapper) *IDBCursor

IDBCursorFromJS is casting from something that holds a js.Value into IDBCursor.

func (*IDBCursor) Advance

func (_this *IDBCursor) Advance(count uint)

func (*IDBCursor) Continue

func (_this *IDBCursor) Continue(key interface{})

func (*IDBCursor) ContinuePrimaryKey

func (_this *IDBCursor) ContinuePrimaryKey(key interface{}, primaryKey interface{})

func (*IDBCursor) Delete

func (_this *IDBCursor) Delete() (_result *IDBRequest)

func (*IDBCursor) Direction

func (_this *IDBCursor) Direction() IDBCursorDirection

Direction returning attribute 'direction' with type IDBCursorDirection (idl: IDBCursorDirection).

func (*IDBCursor) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*IDBCursor) Key

func (_this *IDBCursor) Key() js.Value

Key returning attribute 'key' with type Any (idl: any).

func (*IDBCursor) PrimaryKey

func (_this *IDBCursor) PrimaryKey() js.Value

PrimaryKey returning attribute 'primaryKey' with type Any (idl: any).

func (*IDBCursor) Source

func (_this *IDBCursor) Source() *Union

Source returning attribute 'source' with type Union (idl: Union).

func (*IDBCursor) Update

func (_this *IDBCursor) Update(value interface{}) (_result *IDBRequest)

type IDBCursorDirection

type IDBCursorDirection int

enum: IDBCursorDirection

const (
	NextIDBCursorDirection IDBCursorDirection = iota
	NextuniqueIDBCursorDirection
	PrevIDBCursorDirection
	PrevuniqueIDBCursorDirection
)

func IDBCursorDirectionFromJS

func IDBCursorDirectionFromJS(value js.Value) IDBCursorDirection

IDBCursorDirectionFromJS is converting a javascript value into a IDBCursorDirection enum value.

func (*IDBCursorDirection) JSValue

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

JSValue is converting this enum into a javascript object

func (IDBCursorDirection) Value

func (this IDBCursorDirection) Value() string

Value is converting this into javascript defined string value

type IDBCursorWithValue

type IDBCursorWithValue struct {
	IDBCursor
}

class: IDBCursorWithValue

func IDBCursorWithValueFromJS

func IDBCursorWithValueFromJS(value js.Value) *IDBCursorWithValue

IDBCursorWithValueFromJS is casting a js.Value into IDBCursorWithValue.

func IDBCursorWithValueFromWrapper

func IDBCursorWithValueFromWrapper(input core.Wrapper) *IDBCursorWithValue

IDBCursorWithValueFromJS is casting from something that holds a js.Value into IDBCursorWithValue.

func (*IDBCursorWithValue) Value

func (_this *IDBCursorWithValue) Value() js.Value

Value returning attribute 'value' with type Any (idl: any).

type IDBDatabase

type IDBDatabase struct {
	domcore.EventTarget
}

class: IDBDatabase

func IDBDatabaseFromJS

func IDBDatabaseFromJS(value js.Value) *IDBDatabase

IDBDatabaseFromJS is casting a js.Value into IDBDatabase.

func IDBDatabaseFromWrapper

func IDBDatabaseFromWrapper(input core.Wrapper) *IDBDatabase

IDBDatabaseFromJS is casting from something that holds a js.Value into IDBDatabase.

func (*IDBDatabase) AddEventAbort

func (_this *IDBDatabase) AddEventAbort(listener func(event *domcore.Event, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) AddEventClose

func (_this *IDBDatabase) AddEventClose(listener func(event *domcore.Event, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) AddEventError

func (_this *IDBDatabase) AddEventError(listener func(event *domcore.Event, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) AddEventVersionChange

func (_this *IDBDatabase) AddEventVersionChange(listener func(event *IDBVersionChangeEvent, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) Close

func (_this *IDBDatabase) Close()

func (*IDBDatabase) CreateObjectStore

func (_this *IDBDatabase) CreateObjectStore(name string, options *IDBObjectStoreParameters) (_result *IDBObjectStore)

func (*IDBDatabase) DeleteObjectStore

func (_this *IDBDatabase) DeleteObjectStore(name string)

func (*IDBDatabase) Name

func (_this *IDBDatabase) Name() string

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

func (*IDBDatabase) ObjectStoreNames

func (_this *IDBDatabase) ObjectStoreNames() *domcore.DOMStringList

ObjectStoreNames returning attribute 'objectStoreNames' with type domcore.DOMStringList (idl: DOMStringList).

func (*IDBDatabase) OnAbort

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

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

func (*IDBDatabase) OnClose

func (_this *IDBDatabase) OnClose() domcore.EventHandlerFunc

OnClose returning attribute 'onclose' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*IDBDatabase) OnError

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

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

func (*IDBDatabase) OnVersionChange

func (_this *IDBDatabase) OnVersionChange() domcore.EventHandlerFunc

OnVersionChange returning attribute 'onversionchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*IDBDatabase) SetOnAbort

func (_this *IDBDatabase) SetOnAbort(listener func(event *domcore.Event, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) SetOnClose

func (_this *IDBDatabase) SetOnClose(listener func(event *domcore.Event, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) SetOnError

func (_this *IDBDatabase) SetOnError(listener func(event *domcore.Event, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) SetOnVersionChange

func (_this *IDBDatabase) SetOnVersionChange(listener func(event *IDBVersionChangeEvent, currentTarget *IDBDatabase)) js.Func

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

func (*IDBDatabase) Transaction

func (_this *IDBDatabase) Transaction(storeNames *Union, mode *IDBTransactionMode) (_result *IDBTransaction)

func (*IDBDatabase) Version

func (_this *IDBDatabase) Version() int

Version returning attribute 'version' with type int (idl: unsigned long long).

type IDBDatabaseInfo

type IDBDatabaseInfo struct {
	Name    string
	Version int
}

dictionary: IDBDatabaseInfo

func IDBDatabaseInfoFromJS

func IDBDatabaseInfoFromJS(value js.Value) *IDBDatabaseInfo

IDBDatabaseInfoFromJS is allocating a new IDBDatabaseInfo object and copy all values in the value javascript object.

func (*IDBDatabaseInfo) JSValue

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

JSValue is allocating a new javascript object and copy all values

type IDBFactory

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

class: IDBFactory

func IDBFactoryFromJS

func IDBFactoryFromJS(value js.Value) *IDBFactory

IDBFactoryFromJS is casting a js.Value into IDBFactory.

func IDBFactoryFromWrapper

func IDBFactoryFromWrapper(input core.Wrapper) *IDBFactory

IDBFactoryFromJS is casting from something that holds a js.Value into IDBFactory.

func (*IDBFactory) Cmp

func (_this *IDBFactory) Cmp(first interface{}, second interface{}) (_result int)

func (*IDBFactory) Databases

func (_this *IDBFactory) Databases() (_result *PromiseSequenceIDBDatabaseInfo)

func (*IDBFactory) DeleteDatabase

func (_this *IDBFactory) DeleteDatabase(name string) (_result *IDBOpenDBRequest)

func (*IDBFactory) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*IDBFactory) Open

func (_this *IDBFactory) Open(name string, version *int) (_result *IDBOpenDBRequest)

type IDBIndex

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

class: IDBIndex

func IDBIndexFromJS

func IDBIndexFromJS(value js.Value) *IDBIndex

IDBIndexFromJS is casting a js.Value into IDBIndex.

func IDBIndexFromWrapper

func IDBIndexFromWrapper(input core.Wrapper) *IDBIndex

IDBIndexFromJS is casting from something that holds a js.Value into IDBIndex.

func (*IDBIndex) Count

func (_this *IDBIndex) Count(query interface{}) (_result *IDBRequest)

func (*IDBIndex) Get

func (_this *IDBIndex) Get(query interface{}) (_result *IDBRequest)

func (*IDBIndex) GetAll

func (_this *IDBIndex) GetAll(query interface{}, count *uint) (_result *IDBRequest)

func (*IDBIndex) GetAllKeys

func (_this *IDBIndex) GetAllKeys(query interface{}, count *uint) (_result *IDBRequest)

func (*IDBIndex) GetKey

func (_this *IDBIndex) GetKey(query interface{}) (_result *IDBRequest)

func (*IDBIndex) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*IDBIndex) KeyPath

func (_this *IDBIndex) KeyPath() js.Value

KeyPath returning attribute 'keyPath' with type Any (idl: any).

func (*IDBIndex) MultiEntry

func (_this *IDBIndex) MultiEntry() bool

MultiEntry returning attribute 'multiEntry' with type bool (idl: boolean).

func (*IDBIndex) Name

func (_this *IDBIndex) Name() string

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

func (*IDBIndex) ObjectStore

func (_this *IDBIndex) ObjectStore() *IDBObjectStore

ObjectStore returning attribute 'objectStore' with type IDBObjectStore (idl: IDBObjectStore).

func (*IDBIndex) OpenCursor

func (_this *IDBIndex) OpenCursor(query interface{}, direction *IDBCursorDirection) (_result *IDBRequest)

func (*IDBIndex) OpenKeyCursor

func (_this *IDBIndex) OpenKeyCursor(query interface{}, direction *IDBCursorDirection) (_result *IDBRequest)

func (*IDBIndex) SetName

func (_this *IDBIndex) SetName(value string)

SetName setting attribute 'name' with type string (idl: DOMString).

func (*IDBIndex) Unique

func (_this *IDBIndex) Unique() bool

Unique returning attribute 'unique' with type bool (idl: boolean).

type IDBIndexParameters

type IDBIndexParameters struct {
	Unique     bool
	MultiEntry bool
}

dictionary: IDBIndexParameters

func IDBIndexParametersFromJS

func IDBIndexParametersFromJS(value js.Value) *IDBIndexParameters

IDBIndexParametersFromJS is allocating a new IDBIndexParameters object and copy all values in the value javascript object.

func (*IDBIndexParameters) JSValue

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

JSValue is allocating a new javascript object and copy all values

type IDBKeyRange

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

class: IDBKeyRange

func Bound

func Bound(lower interface{}, upper interface{}, lowerOpen *bool, upperOpen *bool) (_result *IDBKeyRange)

func IDBKeyRangeFromJS

func IDBKeyRangeFromJS(value js.Value) *IDBKeyRange

IDBKeyRangeFromJS is casting a js.Value into IDBKeyRange.

func IDBKeyRangeFromWrapper

func IDBKeyRangeFromWrapper(input core.Wrapper) *IDBKeyRange

IDBKeyRangeFromJS is casting from something that holds a js.Value into IDBKeyRange.

func LowerBound

func LowerBound(lower interface{}, open *bool) (_result *IDBKeyRange)

func Only

func Only(value interface{}) (_result *IDBKeyRange)

func UpperBound

func UpperBound(upper interface{}, open *bool) (_result *IDBKeyRange)

func (*IDBKeyRange) Includes

func (_this *IDBKeyRange) Includes(key interface{}) (_result bool)

func (*IDBKeyRange) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*IDBKeyRange) Lower

func (_this *IDBKeyRange) Lower() js.Value

Lower returning attribute 'lower' with type Any (idl: any).

func (*IDBKeyRange) LowerOpen

func (_this *IDBKeyRange) LowerOpen() bool

LowerOpen returning attribute 'lowerOpen' with type bool (idl: boolean).

func (*IDBKeyRange) Upper

func (_this *IDBKeyRange) Upper() js.Value

Upper returning attribute 'upper' with type Any (idl: any).

func (*IDBKeyRange) UpperOpen

func (_this *IDBKeyRange) UpperOpen() bool

UpperOpen returning attribute 'upperOpen' with type bool (idl: boolean).

type IDBObjectStore

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

class: IDBObjectStore

func IDBObjectStoreFromJS

func IDBObjectStoreFromJS(value js.Value) *IDBObjectStore

IDBObjectStoreFromJS is casting a js.Value into IDBObjectStore.

func IDBObjectStoreFromWrapper

func IDBObjectStoreFromWrapper(input core.Wrapper) *IDBObjectStore

IDBObjectStoreFromJS is casting from something that holds a js.Value into IDBObjectStore.

func (*IDBObjectStore) Add

func (_this *IDBObjectStore) Add(value interface{}, key interface{}) (_result *IDBRequest)

func (*IDBObjectStore) AutoIncrement

func (_this *IDBObjectStore) AutoIncrement() bool

AutoIncrement returning attribute 'autoIncrement' with type bool (idl: boolean).

func (*IDBObjectStore) Clear

func (_this *IDBObjectStore) Clear() (_result *IDBRequest)

func (*IDBObjectStore) Count

func (_this *IDBObjectStore) Count(query interface{}) (_result *IDBRequest)

func (*IDBObjectStore) CreateIndex

func (_this *IDBObjectStore) CreateIndex(name string, keyPath *Union, options *IDBIndexParameters) (_result *IDBIndex)

func (*IDBObjectStore) Delete

func (_this *IDBObjectStore) Delete(query interface{}) (_result *IDBRequest)

func (*IDBObjectStore) DeleteIndex

func (_this *IDBObjectStore) DeleteIndex(name string)

func (*IDBObjectStore) Get

func (_this *IDBObjectStore) Get(query interface{}) (_result *IDBRequest)

func (*IDBObjectStore) GetAll

func (_this *IDBObjectStore) GetAll(query interface{}, count *uint) (_result *IDBRequest)

func (*IDBObjectStore) GetAllKeys

func (_this *IDBObjectStore) GetAllKeys(query interface{}, count *uint) (_result *IDBRequest)

func (*IDBObjectStore) GetKey

func (_this *IDBObjectStore) GetKey(query interface{}) (_result *IDBRequest)

func (*IDBObjectStore) Index

func (_this *IDBObjectStore) Index(name string) (_result *IDBIndex)

func (*IDBObjectStore) IndexNames

func (_this *IDBObjectStore) IndexNames() *domcore.DOMStringList

IndexNames returning attribute 'indexNames' with type domcore.DOMStringList (idl: DOMStringList).

func (*IDBObjectStore) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*IDBObjectStore) KeyPath

func (_this *IDBObjectStore) KeyPath() js.Value

KeyPath returning attribute 'keyPath' with type Any (idl: any).

func (*IDBObjectStore) Name

func (_this *IDBObjectStore) Name() string

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

func (*IDBObjectStore) OpenCursor

func (_this *IDBObjectStore) OpenCursor(query interface{}, direction *IDBCursorDirection) (_result *IDBRequest)

func (*IDBObjectStore) OpenKeyCursor

func (_this *IDBObjectStore) OpenKeyCursor(query interface{}, direction *IDBCursorDirection) (_result *IDBRequest)

func (*IDBObjectStore) Put

func (_this *IDBObjectStore) Put(value interface{}, key interface{}) (_result *IDBRequest)

func (*IDBObjectStore) SetName

func (_this *IDBObjectStore) SetName(value string)

SetName setting attribute 'name' with type string (idl: DOMString).

func (*IDBObjectStore) Transaction

func (_this *IDBObjectStore) Transaction() *IDBTransaction

Transaction returning attribute 'transaction' with type IDBTransaction (idl: IDBTransaction).

type IDBObjectStoreParameters

type IDBObjectStoreParameters struct {
	KeyPath       *Union
	AutoIncrement bool
}

dictionary: IDBObjectStoreParameters

func IDBObjectStoreParametersFromJS

func IDBObjectStoreParametersFromJS(value js.Value) *IDBObjectStoreParameters

IDBObjectStoreParametersFromJS is allocating a new IDBObjectStoreParameters object and copy all values in the value javascript object.

func (*IDBObjectStoreParameters) JSValue

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

JSValue is allocating a new javascript object and copy all values

type IDBOpenDBRequest

type IDBOpenDBRequest struct {
	IDBRequest
}

class: IDBOpenDBRequest

func IDBOpenDBRequestFromJS

func IDBOpenDBRequestFromJS(value js.Value) *IDBOpenDBRequest

IDBOpenDBRequestFromJS is casting a js.Value into IDBOpenDBRequest.

func IDBOpenDBRequestFromWrapper

func IDBOpenDBRequestFromWrapper(input core.Wrapper) *IDBOpenDBRequest

IDBOpenDBRequestFromJS is casting from something that holds a js.Value into IDBOpenDBRequest.

func (*IDBOpenDBRequest) AddEventBlocked

func (_this *IDBOpenDBRequest) AddEventBlocked(listener func(event *domcore.Event, currentTarget *IDBOpenDBRequest)) js.Func

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

func (*IDBOpenDBRequest) AddEventUpgradeNeeded

func (_this *IDBOpenDBRequest) AddEventUpgradeNeeded(listener func(event *domcore.Event, currentTarget *IDBOpenDBRequest)) js.Func

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

func (*IDBOpenDBRequest) OnBlocked

func (_this *IDBOpenDBRequest) OnBlocked() domcore.EventHandlerFunc

OnBlocked returning attribute 'onblocked' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*IDBOpenDBRequest) OnUpgradeNeeded

func (_this *IDBOpenDBRequest) OnUpgradeNeeded() domcore.EventHandlerFunc

OnUpgradeNeeded returning attribute 'onupgradeneeded' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*IDBOpenDBRequest) SetOnBlocked

func (_this *IDBOpenDBRequest) SetOnBlocked(listener func(event *domcore.Event, currentTarget *IDBOpenDBRequest)) js.Func

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

func (*IDBOpenDBRequest) SetOnUpgradeNeeded

func (_this *IDBOpenDBRequest) SetOnUpgradeNeeded(listener func(event *domcore.Event, currentTarget *IDBOpenDBRequest)) js.Func

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

type IDBRequest

type IDBRequest struct {
	domcore.EventTarget
}

class: IDBRequest

func IDBRequestFromJS

func IDBRequestFromJS(value js.Value) *IDBRequest

IDBRequestFromJS is casting a js.Value into IDBRequest.

func IDBRequestFromWrapper

func IDBRequestFromWrapper(input core.Wrapper) *IDBRequest

IDBRequestFromJS is casting from something that holds a js.Value into IDBRequest.

func (*IDBRequest) AddEventError

func (_this *IDBRequest) AddEventError(listener func(event *domcore.Event, currentTarget *IDBRequest)) js.Func

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

func (*IDBRequest) AddEventSuccess

func (_this *IDBRequest) AddEventSuccess(listener func(event *domcore.Event, currentTarget *IDBRequest)) js.Func

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

func (*IDBRequest) Error

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

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

func (*IDBRequest) OnError

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

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

func (*IDBRequest) OnSuccess

func (_this *IDBRequest) OnSuccess() domcore.EventHandlerFunc

OnSuccess returning attribute 'onsuccess' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*IDBRequest) ReadyState

func (_this *IDBRequest) ReadyState() IDBRequestReadyState

ReadyState returning attribute 'readyState' with type IDBRequestReadyState (idl: IDBRequestReadyState).

func (*IDBRequest) Result

func (_this *IDBRequest) Result() js.Value

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

func (*IDBRequest) SetOnError

func (_this *IDBRequest) SetOnError(listener func(event *domcore.Event, currentTarget *IDBRequest)) js.Func

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

func (*IDBRequest) SetOnSuccess

func (_this *IDBRequest) SetOnSuccess(listener func(event *domcore.Event, currentTarget *IDBRequest)) js.Func

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

func (*IDBRequest) Source

func (_this *IDBRequest) Source() *Union

Source returning attribute 'source' with type Union (idl: Union).

func (*IDBRequest) Transaction

func (_this *IDBRequest) Transaction() *IDBTransaction

Transaction returning attribute 'transaction' with type IDBTransaction (idl: IDBTransaction).

type IDBRequestReadyState

type IDBRequestReadyState int

enum: IDBRequestReadyState

const (
	PendingIDBRequestReadyState IDBRequestReadyState = iota
	DoneIDBRequestReadyState
)

func IDBRequestReadyStateFromJS

func IDBRequestReadyStateFromJS(value js.Value) IDBRequestReadyState

IDBRequestReadyStateFromJS is converting a javascript value into a IDBRequestReadyState enum value.

func (*IDBRequestReadyState) JSValue

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

JSValue is converting this enum into a javascript object

func (IDBRequestReadyState) Value

func (this IDBRequestReadyState) Value() string

Value is converting this into javascript defined string value

type IDBTransaction

type IDBTransaction struct {
	domcore.EventTarget
}

class: IDBTransaction

func IDBTransactionFromJS

func IDBTransactionFromJS(value js.Value) *IDBTransaction

IDBTransactionFromJS is casting a js.Value into IDBTransaction.

func IDBTransactionFromWrapper

func IDBTransactionFromWrapper(input core.Wrapper) *IDBTransaction

IDBTransactionFromJS is casting from something that holds a js.Value into IDBTransaction.

func (*IDBTransaction) Abort

func (_this *IDBTransaction) Abort()

func (*IDBTransaction) AddEventAbort

func (_this *IDBTransaction) AddEventAbort(listener func(event *domcore.Event, currentTarget *IDBTransaction)) js.Func

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

func (*IDBTransaction) AddEventComplete

func (_this *IDBTransaction) AddEventComplete(listener func(event *domcore.Event, currentTarget *IDBTransaction)) js.Func

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

func (*IDBTransaction) AddEventError

func (_this *IDBTransaction) AddEventError(listener func(event *domcore.Event, currentTarget *IDBTransaction)) js.Func

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

func (*IDBTransaction) Commit

func (_this *IDBTransaction) Commit()

func (*IDBTransaction) Db

func (_this *IDBTransaction) Db() *IDBDatabase

Db returning attribute 'db' with type IDBDatabase (idl: IDBDatabase).

func (*IDBTransaction) Error

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

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

func (*IDBTransaction) Mode

func (_this *IDBTransaction) Mode() IDBTransactionMode

Mode returning attribute 'mode' with type IDBTransactionMode (idl: IDBTransactionMode).

func (*IDBTransaction) ObjectStore

func (_this *IDBTransaction) ObjectStore(name string) (_result *IDBObjectStore)

func (*IDBTransaction) ObjectStoreNames

func (_this *IDBTransaction) ObjectStoreNames() *domcore.DOMStringList

ObjectStoreNames returning attribute 'objectStoreNames' with type domcore.DOMStringList (idl: DOMStringList).

func (*IDBTransaction) OnAbort

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

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

func (*IDBTransaction) OnComplete

func (_this *IDBTransaction) OnComplete() domcore.EventHandlerFunc

OnComplete returning attribute 'oncomplete' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*IDBTransaction) OnError

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

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

func (*IDBTransaction) SetOnAbort

func (_this *IDBTransaction) SetOnAbort(listener func(event *domcore.Event, currentTarget *IDBTransaction)) js.Func

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

func (*IDBTransaction) SetOnComplete

func (_this *IDBTransaction) SetOnComplete(listener func(event *domcore.Event, currentTarget *IDBTransaction)) js.Func

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

func (*IDBTransaction) SetOnError

func (_this *IDBTransaction) SetOnError(listener func(event *domcore.Event, currentTarget *IDBTransaction)) js.Func

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

type IDBTransactionMode

type IDBTransactionMode int

enum: IDBTransactionMode

const (
	ReadonlyIDBTransactionMode IDBTransactionMode = iota
	ReadwriteIDBTransactionMode
	VersionchangeIDBTransactionMode
)

func IDBTransactionModeFromJS

func IDBTransactionModeFromJS(value js.Value) IDBTransactionMode

IDBTransactionModeFromJS is converting a javascript value into a IDBTransactionMode enum value.

func (*IDBTransactionMode) JSValue

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

JSValue is converting this enum into a javascript object

func (IDBTransactionMode) Value

func (this IDBTransactionMode) Value() string

Value is converting this into javascript defined string value

type IDBVersionChangeEvent

type IDBVersionChangeEvent struct {
	domcore.Event
}

class: IDBVersionChangeEvent

func IDBVersionChangeEventFromJS

func IDBVersionChangeEventFromJS(value js.Value) *IDBVersionChangeEvent

IDBVersionChangeEventFromJS is casting a js.Value into IDBVersionChangeEvent.

func IDBVersionChangeEventFromWrapper

func IDBVersionChangeEventFromWrapper(input core.Wrapper) *IDBVersionChangeEvent

IDBVersionChangeEventFromJS is casting from something that holds a js.Value into IDBVersionChangeEvent.

func NewIDBVersionChangeEvent

func NewIDBVersionChangeEvent(_type string, eventInitDict *IDBVersionChangeEventInit) (_result *IDBVersionChangeEvent)

func (*IDBVersionChangeEvent) NewVersion

func (_this *IDBVersionChangeEvent) NewVersion() *int

NewVersion returning attribute 'newVersion' with type int (idl: unsigned long long).

func (*IDBVersionChangeEvent) OldVersion

func (_this *IDBVersionChangeEvent) OldVersion() int

OldVersion returning attribute 'oldVersion' with type int (idl: unsigned long long).

type IDBVersionChangeEventInit

type IDBVersionChangeEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	OldVersion int
	NewVersion *int
}

dictionary: IDBVersionChangeEventInit

func IDBVersionChangeEventInitFromJS

func IDBVersionChangeEventInitFromJS(value js.Value) *IDBVersionChangeEventInit

IDBVersionChangeEventInitFromJS is allocating a new IDBVersionChangeEventInit object and copy all values in the value javascript object.

func (*IDBVersionChangeEventInit) JSValue

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

JSValue is allocating a new javascript object and copy all values

type PromiseSequenceIDBDatabaseInfo

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

class: Promise

func PromiseSequenceIDBDatabaseInfoFromJS

func PromiseSequenceIDBDatabaseInfoFromJS(value js.Value) *PromiseSequenceIDBDatabaseInfo

PromiseSequenceIDBDatabaseInfoFromJS is casting a js.Value into PromiseSequenceIDBDatabaseInfo.

func PromiseSequenceIDBDatabaseInfoFromWrapper

func PromiseSequenceIDBDatabaseInfoFromWrapper(input core.Wrapper) *PromiseSequenceIDBDatabaseInfo

PromiseSequenceIDBDatabaseInfoFromJS is casting from something that holds a js.Value into PromiseSequenceIDBDatabaseInfo.

func (*PromiseSequenceIDBDatabaseInfo) Catch

func (*PromiseSequenceIDBDatabaseInfo) Finally

func (*PromiseSequenceIDBDatabaseInfo) JSValue

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

JSValue returns the js.Value or js.Null() if _this is nil

func (*PromiseSequenceIDBDatabaseInfo) Then

type PromiseSequenceIDBDatabaseInfoOnFulfilled

type PromiseSequenceIDBDatabaseInfoOnFulfilled js.Func

PromiseSequenceIDBDatabaseInfoOnFulfilled is a javascript function type.

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

type PromiseSequenceIDBDatabaseInfoOnFulfilledFunc

type PromiseSequenceIDBDatabaseInfoOnFulfilledFunc func(value []*IDBDatabaseInfo)

callback: PromiseTemplateOnFulfilled

func PromiseSequenceIDBDatabaseInfoOnFulfilledFromJS

func PromiseSequenceIDBDatabaseInfoOnFulfilledFromJS(_value js.Value) PromiseSequenceIDBDatabaseInfoOnFulfilledFunc

type PromiseSequenceIDBDatabaseInfoOnRejected

type PromiseSequenceIDBDatabaseInfoOnRejected js.Func

PromiseSequenceIDBDatabaseInfoOnRejected is a javascript function type.

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

type PromiseSequenceIDBDatabaseInfoOnRejectedFunc

type PromiseSequenceIDBDatabaseInfoOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseSequenceIDBDatabaseInfoOnRejectedFromJS

func PromiseSequenceIDBDatabaseInfoOnRejectedFromJS(_value js.Value) PromiseSequenceIDBDatabaseInfoOnRejectedFunc

type Union

type Union struct {
	Value js.Value
}

func UnionFromJS

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue

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

Jump to

Keyboard shortcuts

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