provider

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 19 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 ContextVar added in v1.0.42

func ContextVar(ctx context.Context, key string) interface{}

func ContextVars added in v1.0.42

func ContextVars(ctx context.Context) map[string]interface{}

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 ContextWithVars added in v1.0.42

func ContextWithVars(parent context.Context, vars map[string]interface{}) 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 NewEnvVars added in v1.0.42

func NewEnvVars(v map[string]interface{}) Env

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