plugins

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	YoReplacer    = strings.NewReplacer("ё", "е")
	StressRemover = strings.NewReplacer("\u0301", "")

	DefaultClient = http.Client{
		Jar: jar,
		Transport: &http.Transport{
			Proxy: http.ProxyFromEnvironment,
			DialContext: (&net.Dialer{
				Timeout:   30 * time.Second,
				KeepAlive: 30 * time.Second,
				DualStack: true,
			}).DialContext,
			IdleConnTimeout: 1 * time.Hour,
		},
	}
)
View Source
var Cache cache

Functions

func Register

func Register(name string, f http.HandlerFunc)

func RegisterMTPlugin added in v1.0.19

func RegisterMTPlugin(name string, f http.HandlerFunc)

Types

type HTTPStatus

type HTTPStatus struct {
	StatusCode int
	URL        string
}

func (HTTPStatus) Error

func (s HTTPStatus) Error() string

type Plugin

type Plugin struct {
	Name        string
	HandlerFunc http.HandlerFunc
}

func List

func List() []Plugin

func ListMTPlugins added in v1.0.19

func ListMTPlugins() []Plugin

Jump to

Keyboard shortcuts

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