data

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create() (ret js.Promise[DataItemInfo])

Create calls the function "WEBEXT.lockScreen.data.create" directly.

func Delete

func Delete(id js.String) (ret js.Promise[js.Void])

Delete calls the function "WEBEXT.lockScreen.data.delete" directly.

func FuncCreate

func FuncCreate() (fn js.Func[func() js.Promise[DataItemInfo]])

FuncCreate returns the function "WEBEXT.lockScreen.data.create".

func FuncDelete

func FuncDelete() (fn js.Func[func(id js.String) js.Promise[js.Void]])

FuncDelete returns the function "WEBEXT.lockScreen.data.delete".

func FuncGetAll

func FuncGetAll() (fn js.Func[func() js.Promise[js.Array[DataItemInfo]]])

FuncGetAll returns the function "WEBEXT.lockScreen.data.getAll".

func FuncGetContent

func FuncGetContent() (fn js.Func[func(id js.String) js.Promise[js.ArrayBuffer]])

FuncGetContent returns the function "WEBEXT.lockScreen.data.getContent".

func FuncHasOnDataItemsAvailable

func FuncHasOnDataItemsAvailable() (fn js.Func[func(callback js.Func[func(event *DataItemsAvailableEvent)]) bool])

FuncHasOnDataItemsAvailable returns the function "WEBEXT.lockScreen.data.onDataItemsAvailable.hasListener".

func FuncOffDataItemsAvailable

func FuncOffDataItemsAvailable() (fn js.Func[func(callback js.Func[func(event *DataItemsAvailableEvent)])])

FuncOffDataItemsAvailable returns the function "WEBEXT.lockScreen.data.onDataItemsAvailable.removeListener".

func FuncOnDataItemsAvailable

func FuncOnDataItemsAvailable() (fn js.Func[func(callback js.Func[func(event *DataItemsAvailableEvent)])])

FuncOnDataItemsAvailable returns the function "WEBEXT.lockScreen.data.onDataItemsAvailable.addListener".

func FuncSetContent

func FuncSetContent() (fn js.Func[func(id js.String, data js.ArrayBuffer) js.Promise[js.Void]])

FuncSetContent returns the function "WEBEXT.lockScreen.data.setContent".

func GetAll

func GetAll() (ret js.Promise[js.Array[DataItemInfo]])

GetAll calls the function "WEBEXT.lockScreen.data.getAll" directly.

func GetContent

func GetContent(id js.String) (ret js.Promise[js.ArrayBuffer])

GetContent calls the function "WEBEXT.lockScreen.data.getContent" directly.

func HasFuncCreate

func HasFuncCreate() bool

HasFuncCreate returns true if the function "WEBEXT.lockScreen.data.create" exists.

func HasFuncDelete

func HasFuncDelete() bool

HasFuncDelete returns true if the function "WEBEXT.lockScreen.data.delete" exists.

func HasFuncGetAll

func HasFuncGetAll() bool

HasFuncGetAll returns true if the function "WEBEXT.lockScreen.data.getAll" exists.

func HasFuncGetContent

func HasFuncGetContent() bool

HasFuncGetContent returns true if the function "WEBEXT.lockScreen.data.getContent" exists.

func HasFuncHasOnDataItemsAvailable

func HasFuncHasOnDataItemsAvailable() bool

HasFuncHasOnDataItemsAvailable returns true if the function "WEBEXT.lockScreen.data.onDataItemsAvailable.hasListener" exists.

func HasFuncOffDataItemsAvailable

func HasFuncOffDataItemsAvailable() bool

HasFuncOffDataItemsAvailable returns true if the function "WEBEXT.lockScreen.data.onDataItemsAvailable.removeListener" exists.

func HasFuncOnDataItemsAvailable

func HasFuncOnDataItemsAvailable() bool

HasFuncOnDataItemsAvailable returns true if the function "WEBEXT.lockScreen.data.onDataItemsAvailable.addListener" exists.

func HasFuncSetContent

func HasFuncSetContent() bool

HasFuncSetContent returns true if the function "WEBEXT.lockScreen.data.setContent" exists.

func HasOnDataItemsAvailable

func HasOnDataItemsAvailable(callback js.Func[func(event *DataItemsAvailableEvent)]) (ret bool)

HasOnDataItemsAvailable calls the function "WEBEXT.lockScreen.data.onDataItemsAvailable.hasListener" directly.

func OffDataItemsAvailable

func OffDataItemsAvailable(callback js.Func[func(event *DataItemsAvailableEvent)]) (ret js.Void)

OffDataItemsAvailable calls the function "WEBEXT.lockScreen.data.onDataItemsAvailable.removeListener" directly.

func OnDataItemsAvailable

func OnDataItemsAvailable(callback js.Func[func(event *DataItemsAvailableEvent)]) (ret js.Void)

OnDataItemsAvailable calls the function "WEBEXT.lockScreen.data.onDataItemsAvailable.addListener" directly.

func SetContent

func SetContent(id js.String, data js.ArrayBuffer) (ret js.Promise[js.Void])

SetContent calls the function "WEBEXT.lockScreen.data.setContent" directly.

func TryCreate

func TryCreate() (ret js.Promise[DataItemInfo], exception js.Any, ok bool)

TryCreate calls the function "WEBEXT.lockScreen.data.create" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryDelete

func TryDelete(id js.String) (ret js.Promise[js.Void], exception js.Any, ok bool)

TryDelete calls the function "WEBEXT.lockScreen.data.delete" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryGetAll

func TryGetAll() (ret js.Promise[js.Array[DataItemInfo]], exception js.Any, ok bool)

TryGetAll calls the function "WEBEXT.lockScreen.data.getAll" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryGetContent

func TryGetContent(id js.String) (ret js.Promise[js.ArrayBuffer], exception js.Any, ok bool)

TryGetContent calls the function "WEBEXT.lockScreen.data.getContent" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnDataItemsAvailable

func TryHasOnDataItemsAvailable(callback js.Func[func(event *DataItemsAvailableEvent)]) (ret bool, exception js.Any, ok bool)

TryHasOnDataItemsAvailable calls the function "WEBEXT.lockScreen.data.onDataItemsAvailable.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffDataItemsAvailable

func TryOffDataItemsAvailable(callback js.Func[func(event *DataItemsAvailableEvent)]) (ret js.Void, exception js.Any, ok bool)

TryOffDataItemsAvailable calls the function "WEBEXT.lockScreen.data.onDataItemsAvailable.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnDataItemsAvailable

func TryOnDataItemsAvailable(callback js.Func[func(event *DataItemsAvailableEvent)]) (ret js.Void, exception js.Any, ok bool)

TryOnDataItemsAvailable calls the function "WEBEXT.lockScreen.data.onDataItemsAvailable.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TrySetContent

func TrySetContent(id js.String, data js.ArrayBuffer) (ret js.Promise[js.Void], exception js.Any, ok bool)

TrySetContent calls the function "WEBEXT.lockScreen.data.setContent" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

Types

type DataCallback

type DataCallback[T any] struct {
	Fn  func(arg T, this js.Ref, data js.ArrayBuffer) js.Ref
	Arg T
}

func (*DataCallback[T]) DispatchCallback

func (cb *DataCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*DataCallback[T]) Register

func (cb *DataCallback[T]) Register() js.Func[func(data js.ArrayBuffer)]

type DataCallbackFunc

type DataCallbackFunc func(this js.Ref, data js.ArrayBuffer) js.Ref

func (DataCallbackFunc) DispatchCallback

func (fn DataCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (DataCallbackFunc) Register

func (fn DataCallbackFunc) Register() js.Func[func(data js.ArrayBuffer)]

type DataItemCallback

type DataItemCallback[T any] struct {
	Fn  func(arg T, this js.Ref, item *DataItemInfo) js.Ref
	Arg T
}

func (*DataItemCallback[T]) DispatchCallback

func (cb *DataItemCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*DataItemCallback[T]) Register

func (cb *DataItemCallback[T]) Register() js.Func[func(item *DataItemInfo)]

type DataItemCallbackFunc

type DataItemCallbackFunc func(this js.Ref, item *DataItemInfo) js.Ref

func (DataItemCallbackFunc) DispatchCallback

func (fn DataItemCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (DataItemCallbackFunc) Register

func (fn DataItemCallbackFunc) Register() js.Func[func(item *DataItemInfo)]

type DataItemInfo

type DataItemInfo struct {
	// Id is "DataItemInfo.id"
	//
	// Optional
	Id js.String

	FFI_USE bool
}

func (*DataItemInfo) FreeMembers

func (p *DataItemInfo) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (DataItemInfo) FromRef

func (p DataItemInfo) FromRef(ref js.Ref) DataItemInfo

FromRef calls UpdateFrom and returns a DataItemInfo with all fields set.

func (DataItemInfo) New

func (p DataItemInfo) New() js.Ref

New creates a new DataItemInfo in the application heap.

func (*DataItemInfo) Update

func (p *DataItemInfo) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*DataItemInfo) UpdateFrom

func (p *DataItemInfo) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

type DataItemListCallback

type DataItemListCallback[T any] struct {
	Fn  func(arg T, this js.Ref, items js.Array[DataItemInfo]) js.Ref
	Arg T
}

func (*DataItemListCallback[T]) DispatchCallback

func (cb *DataItemListCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*DataItemListCallback[T]) Register

func (cb *DataItemListCallback[T]) Register() js.Func[func(items js.Array[DataItemInfo])]

type DataItemListCallbackFunc

type DataItemListCallbackFunc func(this js.Ref, items js.Array[DataItemInfo]) js.Ref

func (DataItemListCallbackFunc) DispatchCallback

func (fn DataItemListCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (DataItemListCallbackFunc) Register

func (fn DataItemListCallbackFunc) Register() js.Func[func(items js.Array[DataItemInfo])]

type DataItemsAvailableEvent

type DataItemsAvailableEvent struct {
	// WasLocked is "DataItemsAvailableEvent.wasLocked"
	//
	// Optional
	//
	// NOTE: FFI_USE_WasLocked MUST be set to true to make this field effective.
	WasLocked bool

	FFI_USE_WasLocked bool // for WasLocked.

	FFI_USE bool
}

func (*DataItemsAvailableEvent) FreeMembers

func (p *DataItemsAvailableEvent) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (DataItemsAvailableEvent) FromRef

FromRef calls UpdateFrom and returns a DataItemsAvailableEvent with all fields set.

func (DataItemsAvailableEvent) New

func (p DataItemsAvailableEvent) New() js.Ref

New creates a new DataItemsAvailableEvent in the application heap.

func (*DataItemsAvailableEvent) Update

func (p *DataItemsAvailableEvent) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*DataItemsAvailableEvent) UpdateFrom

func (p *DataItemsAvailableEvent) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

type OnDataItemsAvailableEventCallback

type OnDataItemsAvailableEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref, event *DataItemsAvailableEvent) js.Ref
	Arg T
}

func (*OnDataItemsAvailableEventCallback[T]) DispatchCallback

func (cb *OnDataItemsAvailableEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnDataItemsAvailableEventCallback[T]) Register

func (cb *OnDataItemsAvailableEventCallback[T]) Register() js.Func[func(event *DataItemsAvailableEvent)]

type OnDataItemsAvailableEventCallbackFunc

type OnDataItemsAvailableEventCallbackFunc func(this js.Ref, event *DataItemsAvailableEvent) js.Ref

func (OnDataItemsAvailableEventCallbackFunc) DispatchCallback

func (fn OnDataItemsAvailableEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnDataItemsAvailableEventCallbackFunc) Register

type VoidCallback

type VoidCallback[T any] struct {
	Fn  func(arg T, this js.Ref) js.Ref
	Arg T
}

func (*VoidCallback[T]) DispatchCallback

func (cb *VoidCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*VoidCallback[T]) Register

func (cb *VoidCallback[T]) Register() js.Func[func()]

type VoidCallbackFunc

type VoidCallbackFunc func(this js.Ref) js.Ref

func (VoidCallbackFunc) DispatchCallback

func (fn VoidCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (VoidCallbackFunc) Register

func (fn VoidCallbackFunc) Register() js.Func[func()]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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