Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WasmModuleRef ¶
type WasmModuleRef struct { Name string `json:"name"` FQFN string `json:"fqfn"` Data []byte `json:"data"` // contains filtered or unexported fields }
WasmModuleRef is a reference to a Wasm module (either its filepath or its bytes)
func RefWithData ¶
func RefWithData(name, fqfn string, data []byte) *WasmModuleRef
RefWithData returns a module ref from module bytes
func RefWithReader ¶
func RefWithReader(name, fqfn string, reader io.Reader) *WasmModuleRef
RefWithReader returns a module ref from module bytes
func (*WasmModuleRef) Bytes ¶
func (w *WasmModuleRef) Bytes() ([]byte, error)
Bytes returns the bytes for the module
func (*WasmModuleRef) MarshalJSON ¶
func (w *WasmModuleRef) MarshalJSON() ([]byte, error)
MarshalJSON adds a custom marshaller to WasmModuleRef to ensure that bytes are read before encoding to JSON
Click to show internal directories.
Click to hide internal directories.