dyncall

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: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallModule

type CallModule interface {
	// the call id this module relates to
	// e.g. "Messages:Fetch"
	CallID() string
	// validate the given parameters - might return an error when received invalid parameters
	Validate(map[string]interface{}) error
	// will handle the call and return the result
	Handle(map[string]interface{}) (map[string]interface{}, error)
}

type Registry

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

func New

func New() *Registry

func (*Registry) Call

func (r *Registry) Call(callID string, payload map[string]interface{}) (map[string]interface{}, error)

func (*Registry) Register

func (r *Registry) Register(m CallModule) error

Jump to

Keyboard shortcuts

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