golang

package
v0.0.0-...-30e45d9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGoCallback

func RegisterGoCallback(name string, callback GoCallback)

RegisterGoCallback register go call back

Types

type Environment

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

Environment gohan script based environment for gohan extension

func NewEnvironment

func NewEnvironment() *Environment

NewEnvironment create new gohan extension environment based on context

func (*Environment) Clone

func (env *Environment) Clone() ext.Environment

Clone makes clone of the environment

func (*Environment) HandleEvent

func (env *Environment) HandleEvent(event string, context map[string]interface{}) (err error)

HandleEvent handles event

func (*Environment) Load

func (env *Environment) Load(source, code string) error

Load loads script for environment

func (*Environment) LoadExtensionsForPath

func (env *Environment) LoadExtensionsForPath(extensions []*schema.Extension, path string) error

LoadExtensionsForPath for returns extensions for specific path

func (*Environment) SetUp

func (env *Environment) SetUp()

SetUp initialize environment

type GoCallback

type GoCallback func(event string, context map[string]interface{}) error

GoCallback is type for go based callback

func GetGoCallback

func GetGoCallback(name string) GoCallback

GetGoCallback returns registered go callback

Jump to

Keyboard shortcuts

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