Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error string
Error constant error based on http://dave.cheney.net/2016/04/07/constant-errors
type Event ¶
type Event interface { GetID() string Pre(bool) func(...interface{}) []interface{} Post(bool) func(...interface{}) bool }
Event is a protocol that an event context must follow
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
EventLoop creates an event loop for otto
func (*EventLoop) RegisterEvent ¶
RegisterEvent registers an event
type SimpleEvent ¶
type SimpleEvent string
SimpleEvent is a default implementation of Event, with no Pre or Post functionality, serves as a normal event
func (SimpleEvent) Post ¶
func (e SimpleEvent) Post(bool) func(...interface{}) bool
Post implements Event
func (SimpleEvent) Pre ¶
func (e SimpleEvent) Pre(bool) func(...interface{}) []interface{}
Pre implements Event
Click to show internal directories.
Click to hide internal directories.