plugin

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package plugin is an adapter implementation that provides a generic handling of all AccessMethods provided by plugins. It includes a generic AccessType object (responsible for un-/marshaling AccessSpec objects), AccessSpec object and AccessMethod implementation mapping the AccessMethod interface to the plugin interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type AccessSpec

type AccessSpec struct {
	runtime.UnstructuredVersionedTypedObject `json:",inline"`
	// contains filtered or unexported fields
}

func (*AccessSpec) AccessMethod

func (s *AccessSpec) AccessMethod(cv cpi.ComponentVersionAccess) (cpi.AccessMethod, error)

func (*AccessSpec) Describe

func (s *AccessSpec) Describe(ctx cpi.Context) string

func (*AccessSpec) GetMimeType

func (s *AccessSpec) GetMimeType() string

func (*AccessSpec) GetReferenceHint

func (s *AccessSpec) GetReferenceHint(cv cpi.ComponentVersionAccess) string

func (*AccessSpec) GlobalAccessSpec

func (s *AccessSpec) GlobalAccessSpec(cpi.Context) cpi.AccessSpec

func (*AccessSpec) Handler

func (s *AccessSpec) Handler() *PluginHandler

func (*AccessSpec) IsLocal

func (_ *AccessSpec) IsLocal(cpi.Context) bool

type PluginHandler

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

PluginHandler is a shared object between the AccessMethod implementation and the AccessSpec implementation. The object knows the actual plugin and can therefore forward the method calls to corresponding cli commands.

func NewPluginHandler

func NewPluginHandler(p plugin.Plugin) *PluginHandler

func (*PluginHandler) AccessMethod

func (*PluginHandler) Describe

func (p *PluginHandler) Describe(spec *AccessSpec, ctx cpi.Context) string

func (*PluginHandler) GetMimeType

func (p *PluginHandler) GetMimeType(spec *AccessSpec) string

func (*PluginHandler) GetReferenceHint

func (p *PluginHandler) GetReferenceHint(spec *AccessSpec, cv cpi.ComponentVersionAccess) string

func (*PluginHandler) Info

func (p *PluginHandler) Info(spec *AccessSpec) (*ppi.AccessSpecInfo, error)

func (*PluginHandler) Validate

func (p *PluginHandler) Validate(spec *AccessSpec) (*ppi.AccessSpecInfo, error)

Jump to

Keyboard shortcuts

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