plugin

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	StatusSuccess = gemini.StatusSuccess
)

Variables

View Source
var Serve = plugin.Serve

Functions

This section is empty.

Types

type HandshakeConfig

type HandshakeConfig = plugin.HandshakeConfig

type Plugin

type Plugin = plugin.Plugin

type Request

type Request = gemini.Request

type ResponseWriter

type ResponseWriter = gemini.ResponseWriter

type Route

type Route interface {
	ServeGemini() RouteResponse
}

Implementation

type RoutePlugin

type RoutePlugin struct {
	// Impl Injection
	Impl Route
}

Plugin implmentation

func (RoutePlugin) Client

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

func (*RoutePlugin) Server

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

type RouteRPC

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

Here is an implementation that talks over RPC

func (*RouteRPC) ServeGemini

func (r *RouteRPC) ServeGemini() RouteResponse

type RouteRPCServer

type RouteRPCServer struct {
	Impl Route
}

func (*RouteRPCServer) ServeGemini

func (s *RouteRPCServer) ServeGemini(args interface{}, resp *RouteResponse) error

type RouteResponse

type RouteResponse struct {
	Status Status
	Meta   string
	Data   []byte
}

type ServeConfig

type ServeConfig = plugin.ServeConfig

type Status

type Status = gemini.Status

Directories

Path Synopsis
plugintest

Jump to

Keyboard shortcuts

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