engine

package module
v0.0.0-...-38decf1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

README

engine

Generate Protobuf
protoc --proto_path=$GOPATH/src:eds/proto --go_out=eds/proto --micro_out=eds/proto eds/proto/*.proto
protoc --proto_path=$GOPATH/src:proto --go_out=proto --micro_out=proto proto/*.proto

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account interface {
	ID() int64
}

Account interface

type Context

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

Context engine context

func (*Context) Engine

func (c *Context) Engine() *Engine

Engine get engine

func (*Context) Value

func (c *Context) Value(key string) interface{}

Value get value from context

func (*Context) WithValue

func (c *Context) WithValue(key string, value interface{}) *Context

WithValue add value to context

type Engine

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

Engine struct, Hold dispatcher and transaction

func NewEngine

func NewEngine(d event.Dispatcher) *Engine

NewEngine create new engine instance by specifying dispatcher

func (*Engine) AddError

func (e *Engine) AddError(err *eerr.Error)

AddError add a new error

func (*Engine) AddResult

func (e *Engine) AddResult(key, value string)

AddResult add result

func (*Engine) Cache

func (e *Engine) Cache(domain string)

Cache get cache connection by specifying domain name

func (*Engine) DB

func (e *Engine) DB(domain string)

DB get database connection by specifying domain name

func (*Engine) EndTransaction

func (e *Engine) EndTransaction()

EndTransaction end engine transaction

func (*Engine) Error

func (e *Engine) Error(index int) *eerr.Error

Error get error by index

func (*Engine) HasError

func (e *Engine) HasError() bool

HasError check if engine has an error

func (*Engine) NewContext

func (e *Engine) NewContext() *Context

NewContext create new context for the engine

func (*Engine) RaiseEvent

func (e *Engine) RaiseEvent(ent *event.Event)

RaiseEvent raise new event

func (*Engine) Result

func (e *Engine) Result(key string) string

Result get result by key

func (*Engine) Results

func (e *Engine) Results() map[string]string

Results get all results

func (*Engine) StartTransaction

func (e *Engine) StartTransaction()

StartTransaction start engine transaction

Directories

Path Synopsis
api
Package golego_engine_proto is a generated protocol buffer package.
Package golego_engine_proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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