api

package
v0.0.0-...-abdd10e Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package api provides the library interface for missmolly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Remarshal

func Remarshal(in interface{}, out interface{}) error

Map an interfacy thing into something else.

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().

Jump to

Keyboard shortcuts

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