plugins

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(groups []config.PluginsGroup, filePath string, resources []config.Resource)

func InitFilterChainCache

func InitFilterChainCache(resources []config.Resource)

InitFilterChainCache must behind InitPluginsGroup call

func InitFilterChainForResource

func InitFilterChainForResource(resource *config.Resource, groupPath string, parent *FilterChain)

func InitPluginsGroup

func InitPluginsGroup(groups []config.PluginsGroup, filePath string)

InitPluginsGroup prase api_config.yaml(pluginsGroup) to map[string][]PluginsWithFunc

func OnFilePathChange

func OnFilePathChange(filePath string)

func OnGroupUpdate

func OnGroupUpdate(groups []config.PluginsGroup)

OnGroupUpdate update group cache

func OnResourceUpdate

func OnResourceUpdate(resource *config.Resource)

OnResourceUpdate update plugins cache map when api-resource update

Types

type FilterChain

type FilterChain struct {
	Pre  context.FilterChain
	Post context.FilterChain
}

FilterChain include Pre & Post filters

func GetAPIFilterFuncsWithAPIURL

func GetAPIFilterFuncsWithAPIURL(url string) FilterChain

GetAPIFilterFuncsWithAPIURL is get filterchain with path

type WithFunc

type WithFunc struct {
	Name     string
	Priority int
	// contains filtered or unexported fields
}

WithFunc is a single plugin details

Jump to

Keyboard shortcuts

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