Documentation
¶
Overview ¶
Package api provides the library interface for missmolly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Directive ¶
type Directive interface {
Accept(map[string]interface{}) bool
Apply(Server, map[string]interface{}) (bool, error)
Name() string
Package() string
}
Directive interprets a map of objects, possibly creating http handlers, possibly modifying the server, etc.
type DirectiveRegistry ¶
type DirectiveRegistry []Directive
Type DirectiveRegistry is a slice of Directives.
type Server ¶
type Server interface {
OnInit(func(L *lua.LState) error)
Endpoint(string, string, string, bool)
Route(string) *mux.Route
Run() error
NewLuaState(w http.ResponseWriter, r *http.Request) *lua.LState
}
Server slurps listen endpoints, lua initializers, and builds routes. It can also serve http via Run().
Click to show internal directories.
Click to hide internal directories.