plugin

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PluginTypeAuthProvider  = "auth-provider"
	PluginTypeAuthVerifier  = "auth-verifier"
	PluginTypeConfiguration = "configuration"
)

Variables

View Source
var Handshake = plugin.HandshakeConfig{

	ProtocolVersion:  1,
	MagicCookieKey:   "BASIC_PLUGIN",
	MagicCookieValue: "DH*78Y@XgUXL54",
}

Handshake is a common handshake that is shared by plugin and host.

View Source
var PluginClients = map[string]*plugin.Client{}

PluginMap is the map of plugins we can dispense.

View Source
var PluginSearchPath = "./plugins"

Functions

func Close

func Close()

Close cleans up and kills all of the plugin processes

func FindPluginInPath

func FindPluginInPath(path string, rName string, rType string) (string, error)

func GetStringSliceValue

func GetStringSliceValue(flag string, req *dockerregistryproxyv1.ConfigureRequest) []string

func LoadPluginsFromConfigSlice

func LoadPluginsFromConfigSlice(configs []string) error

func MarshalConfigurationValue

func MarshalConfigurationValue(t dockerregistryproxyv1.ConfigType, value interface{}) ([]byte, error)

func ResolvePluginTypeNameAndAlias

func ResolvePluginTypeNameAndAlias(config string) (string, string, string, error)

func ServeAuthProviderPlugin

func ServeAuthProviderPlugin(impl interface{})

func ServeAuthVerifierPlugin

func ServeAuthVerifierPlugin(impl interface{})

func UnmarshalConfigurationValue

func UnmarshalConfigurationValue(t dockerregistryproxyv1.ConfigType, value []byte) (interface{}, error)

Types

type AuthProviderGRPCPlugin

type AuthProviderGRPCPlugin struct {
	plugin.Plugin
	Impl dockerregistryproxyv1.AuthenticationProviderAPIServer
}

func (*AuthProviderGRPCPlugin) GRPCClient

func (p *AuthProviderGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*AuthProviderGRPCPlugin) GRPCServer

func (p *AuthProviderGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type AuthVerifierGRPCPlugin

type AuthVerifierGRPCPlugin struct {
	plugin.Plugin
	Impl dockerregistryproxyv1.AuthenticationVerifierAPIServer
}

func (*AuthVerifierGRPCPlugin) GRPCClient

func (p *AuthVerifierGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*AuthVerifierGRPCPlugin) GRPCServer

func (p *AuthVerifierGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type ConfigurationGRPCPlugin

type ConfigurationGRPCPlugin struct {
	plugin.Plugin
	Impl dockerregistryproxyv1.ConfigurationAPIServer
}

func (*ConfigurationGRPCPlugin) GRPCClient

func (p *ConfigurationGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*ConfigurationGRPCPlugin) GRPCServer

func (p *ConfigurationGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

Jump to

Keyboard shortcuts

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