provider

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginFileExt = ".plugin"
)

Variables

This section is empty.

Functions

func ContextAddr

func ContextAddr(ctx context.Context) string

func ContextHandlerMiddleware

func ContextHandlerMiddleware(ctx context.Context) []string

func ContextHandlerPrefix

func ContextHandlerPrefix(ctx context.Context) string

func ContextHasPluginParent

func ContextHasPluginParent(ctx context.Context, v string) bool

func ContextParams

func ContextParams(ctx context.Context) []string

func ContextPath

func ContextPath(ctx context.Context) string

func ContextPluginName

func ContextPluginName(ctx context.Context) string

func ContextUser

func ContextUser(ctx context.Context) string

func ContextWithAddr

func ContextWithAddr(parent context.Context, addr string) context.Context

func ContextWithAuth

func ContextWithAuth(parent context.Context, user string, auth map[string]interface{}) context.Context

func ContextWithHandler

func ContextWithHandler(parent context.Context, handler config.Handler) context.Context

func ContextWithPathParams

func ContextWithPathParams(parent context.Context, path string, params []string) context.Context

func ContextWithPluginName

func ContextWithPluginName(ctx context.Context, name string) context.Context

func ContextWithPrefix

func ContextWithPrefix(ctx context.Context, prefix string) context.Context

func DumpContext

func DumpContext(ctx context.Context) string

func GetPluginName

func GetPluginName(path string) (string, error)

GetPluginName returns the plugin name from a file path

func NewProvider

func NewProvider(parent context.Context, basepath string, cfg *config.Config) (*provider, error)

func PluginPath

func PluginPath(basepath, path string) string

PluginPath returns absolute path to a plugin or empty string if it can't be located

Types

type PluginUsageFunc

type PluginUsageFunc func(io.Writer)

func GetPluginUsage

func GetPluginUsage(path string) (PluginUsageFunc, error)

GetPluginUsage returns the usage function for a plugin

Jump to

Keyboard shortcuts

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