dapp

package
v0.0.0-...-32f009b Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(l *logger.Logger) *Module

func (*Module) Close

func (m *Module) Close() error

func (*Module) Register

func (m *Module) Register(vm *otto.Otto) error

register module function in the VM setOpenHandler must be called with a callback the callback that is passed to `setMessageRenderer` should accept two parameters:

  1. The "data" will hold the data (object) passed into the open call (will e.g. hold the message and the context)
  2. The "callback" should be can be called with two parameters:
  3. an error
  4. the rendered layout

func (*Module) RenderMessage

func (m *Module) RenderMessage(payload string) (string, error)

payload can be an arbitrary set of key value pairs should contain the "message" and the "context" tho

Jump to

Keyboard shortcuts

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