plugins

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin(name string, fnc Plugin)

RegisterPlugin register plugin

Types

type CompressPlugin

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

CompressPlugin plugins that transform image to webp if web browser can handle that format

type Plugin

type Plugin interface {
	// contains filtered or unexported methods
}

Plugin interface for Plugins

type PluginsManager

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

PluginsManager process plugins

func NewPluginsManager

func NewPluginsManager(plugins map[string]interface{}) PluginsManager

NewPluginsManager create new instance of plugins manager

func (PluginsManager) PostProcess

func (h PluginsManager) PostProcess(obj *object.FileObject, req *http.Request, res *response.Response)

PostProcess run PostProcess functions of plugins

func (PluginsManager) PreProcess

func (h PluginsManager) PreProcess(obj *object.FileObject, req *http.Request)

PreProcess run PreProcess functions of plugins

type WebpPlugin

type WebpPlugin struct {
}

WebpPlugin plugins that transform image to webp if web browser can handle that format

Jump to

Keyboard shortcuts

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