wamp

package
v0.0.0-...-c928bda Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrInternalError represents an internal error.
	ErrInternalError = wamp.URI("io.elakshi.internal_error")
)

Variables

This section is empty.

Functions

func ErrorAddKwarg

func ErrorAddKwarg(res *client.InvokeResult, key string, value interface{})

ErrorAddKwarg adds a keyword argument to the given client.InvokeResult.

func ErrorResult

func ErrorResult(uri wamp.URI) client.InvokeResult

ErrorResult creates a new client.InvokeResult with the given error uri.

func GetArg

func GetArg(args wamp.List, i int) (interface{}, bool)

GetArg returns the ith item from a list.

func GetStrArg

func GetStrArg(args wamp.List, i int) (string, bool)

GetStrArg returns the ith item from a list as a string.

func InvalidArgumentResult

func InvalidArgumentResult(message string) client.InvokeResult

InvalidArgumentResult creates a new client.InvokeResult with the ErrInvalidArgument error uri and the given message as its first argument.

func NewWAMPHandler

func NewWAMPHandler(ctx context.Context, c *client.Client) *wampHandler

NewWAMPHandler creates a new api.Handler which provides interaction over WAMP. ctx must contain an API core, otherwise the function panics.

func SingleValueResult

func SingleValueResult(value interface{}) client.InvokeResult

SingleValueResult returns a wamp client.InvokeResult with the given value as its only argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

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