module

package module
v0.0.0-...-8a1df15 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: LGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "GOWIKI_PLUGIN",
	MagicCookieValue: "gowiki",
}

Functions

func PluginMap

func PluginMap(wikiPlugin IGoWikiPlugin) map[string]plugin.Plugin

Types

type GoWikiPlugin

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

func (*GoWikiPlugin) HandleRoute

func (p *GoWikiPlugin) HandleRoute(route string, request HTTPRequest) HTTPResponse

func (*GoWikiPlugin) RegisterRoute

func (p *GoWikiPlugin) RegisterRoute(route string, handler func(HTTPRequest) HTTPResponse)

func (*GoWikiPlugin) Routes

func (p *GoWikiPlugin) Routes() []string

type GoWikiPluginConnector

type GoWikiPluginConnector struct {
	Impl IGoWikiPlugin
}

func (*GoWikiPluginConnector) Client

func (p *GoWikiPluginConnector) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*GoWikiPluginConnector) Server

func (p *GoWikiPluginConnector) Server(b *plugin.MuxBroker) (interface{}, error)

type HTTPRequest

type HTTPRequest struct {
	URL *url.URL
}

type HTTPResponse

type HTTPResponse struct {
	Status  int
	Headers map[string]string
	Body    string
}

type IGoWikiPlugin

type IGoWikiPlugin interface {
	Init()
	Name() string
	Version() string
	Routes() []string
	HandleRoute(string, HTTPRequest) HTTPResponse
}

Jump to

Keyboard shortcuts

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