plugin

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginDir                = ".onstatic"
	PluginExportVariableName = "EntryPoint"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// Initialize this API
	Initialize(context.Context)
	// Start this API handling
	Stop(context.Context)
	// Handlers returns it for this API
	Handlers() Handlers
}

API is main structure of this plugin

type Endpoint

type Endpoint string

Endpoint definition that should start "/"

type EntryPoint

type EntryPoint func(context.Context, *zap.Logger) API

EntryPoint is plugin entry point. First, call this function.

type Handlers

type Handlers map[Endpoint]http.HandlerFunc

Handlers is Endpoint-HandlerFunc collection

Jump to

Keyboard shortcuts

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