Documentation ¶
Index ¶
- Constants
- func GetPublicKey(ctx context.Context) string
- func RegisterRoute(route Route)
- func Serve()
- type BufferedResponseWriter
- type ClientCertKey
- type HandshakeConfig
- type Plugin
- type Request
- type ResponseWriter
- type ResponseWriterImpl
- type Route
- type RoutePlugin
- type RouteRPC
- type RouteRPCServer
- type RouteReceiver
- type RouteReceiverImpl
- type RouteRequest
- type ServeConfig
- type Status
Constants ¶
View Source
const (
StatusSuccess = gemini.StatusSuccess
)
Variables ¶
This section is empty.
Functions ¶
func GetPublicKey ¶ added in v0.0.20
func RegisterRoute ¶ added in v0.0.4
func RegisterRoute(route Route)
Types ¶
type BufferedResponseWriter ¶ added in v0.0.2
type BufferedResponseWriter struct { Mediatype string Status gemini.Status Meta string Data []byte }
func NewBufferedResponseWriter ¶ added in v0.0.2
func NewBufferedResponseWriter() *BufferedResponseWriter
func (*BufferedResponseWriter) Flush ¶ added in v0.0.2
func (w *BufferedResponseWriter) Flush() error
func (*BufferedResponseWriter) SetMediaType ¶ added in v0.0.2
func (w *BufferedResponseWriter) SetMediaType(mediatype string)
func (*BufferedResponseWriter) Write ¶ added in v0.0.2
func (w *BufferedResponseWriter) Write(b []byte) (int, error)
func (*BufferedResponseWriter) WriteHeader ¶ added in v0.0.2
func (w *BufferedResponseWriter) WriteHeader(status gemini.Status, meta string)
type ClientCertKey ¶ added in v0.0.20
type ClientCertKey string
type HandshakeConfig ¶
type HandshakeConfig = plugin.HandshakeConfig
type ResponseWriter ¶
type ResponseWriter = gemini.ResponseWriter
type ResponseWriterImpl ¶ added in v0.0.2
type ResponseWriterImpl struct {
// contains filtered or unexported fields
}
type Route ¶
type Route interface {
ServeGemini(ctx context.Context, w ResponseWriter, r *Request)
}
Implementation
type RoutePlugin ¶
type RoutePlugin struct { // Impl Injection Impl RouteReceiver }
Plugin implmentation
func NewRoutePlugin ¶ added in v0.0.2
func NewRoutePlugin(impl Route) *RoutePlugin
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(rr RouteRequest) BufferedResponseWriter
type RouteRPCServer ¶
type RouteRPCServer struct {
Impl RouteReceiver
}
func (*RouteRPCServer) ServeGemini ¶
func (s *RouteRPCServer) ServeGemini(args RouteRequest, resp *BufferedResponseWriter) error
type RouteReceiver ¶ added in v0.0.2
type RouteReceiver interface {
ServeGemini(RouteRequest) BufferedResponseWriter
}
type RouteReceiverImpl ¶ added in v0.0.2
type RouteReceiverImpl struct {
// contains filtered or unexported fields
}
func (*RouteReceiverImpl) ServeGemini ¶ added in v0.0.2
func (rr *RouteReceiverImpl) ServeGemini(rx RouteRequest) BufferedResponseWriter
type RouteRequest ¶ added in v0.0.2
type ServeConfig ¶
type ServeConfig = plugin.ServeConfig
Click to show internal directories.
Click to hide internal directories.