Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func FindPluginInPath(path string, rName string, rType string) (string, error)
- func GetAuthProviderClient(alias string) (dockerregistryproxyv1.AuthenticationProviderAPIClient, error)
- func GetAuthVerifierClient(alias string) (dockerregistryproxyv1.AuthenticationVerifierAPIClient, error)
- func GetConfigurationAPIClient(alias string) (dockerregistryproxyv1.ConfigurationAPIClient, error)
- func GetStringSliceValue(flag string, req *dockerregistryproxyv1.ConfigureRequest) []string
- func LoadPluginsFromConfigSlice(configs []string) error
- func MarshalConfigurationValue(t dockerregistryproxyv1.ConfigType, value interface{}) ([]byte, error)
- func ResolvePluginTypeNameAndAlias(config string) (string, string, string, error)
- func ServeAuthProviderPlugin(impl interface{})
- func ServeAuthVerifierPlugin(impl interface{})
- func UnmarshalConfigurationValue(t dockerregistryproxyv1.ConfigType, value []byte) (interface{}, error)
- type AuthProviderGRPCPlugin
- type AuthVerifierGRPCPlugin
- type ConfigurationGRPCPlugin
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{}
View Source
var PluginMap = map[string]plugin.Plugin{ PluginTypeAuthProvider: &AuthProviderGRPCPlugin{}, PluginTypeAuthVerifier: &AuthVerifierGRPCPlugin{}, PluginTypeConfiguration: &ConfigurationGRPCPlugin{}, }
PluginMap is the map of plugins we can dispense.
View Source
var PluginSearchPath = "./plugins"
Functions ¶
func FindPluginInPath ¶
func GetAuthProviderClient ¶
func GetAuthProviderClient(alias string) (dockerregistryproxyv1.AuthenticationProviderAPIClient, error)
func GetAuthVerifierClient ¶
func GetAuthVerifierClient(alias string) (dockerregistryproxyv1.AuthenticationVerifierAPIClient, error)
func GetConfigurationAPIClient ¶
func GetConfigurationAPIClient(alias string) (dockerregistryproxyv1.ConfigurationAPIClient, error)
func GetStringSliceValue ¶
func GetStringSliceValue(flag string, req *dockerregistryproxyv1.ConfigureRequest) []string
func MarshalConfigurationValue ¶
func MarshalConfigurationValue(t dockerregistryproxyv1.ConfigType, value interface{}) ([]byte, 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
Click to show internal directories.
Click to hide internal directories.