loader

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidPluginJSON -
	ErrInvalidPluginJSON = errors.New("did not find valid type or id properties in plugin.json")
	// ErrInvalidPluginID -
	ErrInvalidPluginID = errors.New("the id properties is invalid in plugin.json([a-z][a-z-]{4,32})")
	// ErrInvalidPluginJSONFilePath -
	ErrInvalidPluginJSONFilePath = errors.New("invalid plugin.json filepath was provided")
	// ErrInvalidInclude -
	ErrInvalidInclude = errors.New("the include config is invalid in plugin.json")
	// ErrInvalidBackendTypeNotSupport -
	ErrInvalidBackendTypeNotSupport = errors.New("the backend type is invalid in plugin.json, The options include: kube-api、kube-service、static-server")

	// ErrInvalidBackendTypeNoPermission -
	ErrInvalidBackendTypeNoPermission = errors.New("the backend type is invalid in plugin.json, the kubePermissions field is required if the type is kube-api")

	// ErrInvalidBackendTypeNoBackendService -
	ErrInvalidBackendTypeNoBackendService = errors.New("the backend type is invalid in plugin.json, the backendService field is required if the type is kube-service")

	// ErrInvalidBackendAuth -
	ErrInvalidBackendAuth = errors.New("backend auth only support the basic")

	// ErrInvalidBackendAuthEmptySecret -
	ErrInvalidBackendAuthEmptySecret = errors.New("the authSecret field is required when the auth type is defined")
)

Functions

This section is empty.

Types

type Loader

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

Loader the tool class to load the plugin from the specified path.

func New

func New() *Loader

New -

func (*Loader) Load

func (l *Loader) Load(class types.Class, paths []string, ignore map[string]struct{}) ([]*types.Plugin, error)

Load loads plugins from the specified path.

Jump to

Keyboard shortcuts

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