teaplugins

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HasRequestFilters = false
View Source
var HasResponseFilters = false

Functions

func FilterRequest

func FilterRequest(request *http.Request) (resultReq *http.Request, willContinue bool)

func FilterResponse

func FilterResponse(response *http.Response) (resultResp *http.Response)

func Register

func Register(plugin *Plugin)

func ReloadAllApps

func ReloadAllApps()

刷新所有插件的App

Types

type Loader

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

插件加载器

func NewLoader

func NewLoader(path string) *Loader

func (*Loader) ActionFilterRequest

func (this *Loader) ActionFilterRequest(action *messages.FilterRequestAction)

func (*Loader) ActionFilterResponse

func (this *Loader) ActionFilterResponse(action *messages.FilterResponseAction)

func (*Loader) ActionRegisterPlugin

func (this *Loader) ActionRegisterPlugin(action *messages.RegisterPluginAction)

func (*Loader) CallAction

func (this *Loader) CallAction(ptr interface{}, messageId uint32) error

func (*Loader) Debug

func (this *Loader) Debug()

func (*Loader) Load

func (this *Loader) Load() error

func (*Loader) Write

func (this *Loader) Write(action messages.ActionInterface) error

type PipeInterface

type PipeInterface interface {
	Read([]byte) (n int, err error)
	Write([]byte) (n int, err error)
}

type Plugin

type Plugin struct {
	IsExternal bool // 是否第三方开发的

	Name        string // 名称
	Code        string // 代号
	Version     string // 版本
	Date        string // 发布日期
	Site        string // 网站链接
	Developer   string // 开发者
	Description string // 插件简介

	HasRequestFilter  bool
	HasResponseFilter bool
}

func NewPlugin

func NewPlugin() *Plugin

func Plugins

func Plugins() []*Plugin

Jump to

Keyboard shortcuts

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