plugin

package
v2.0.0-...-98cc131 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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) GetInexpensiveContentVersionIdentity

func (s *AccessSpec) GetInexpensiveContentVersionIdentity(cv cpi.ComponentVersionAccess) 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) GetInexpensiveContentVersionIdentity

func (p *PluginHandler) GetInexpensiveContentVersionIdentity(spec *AccessSpec, cv cpi.ComponentVersionAccess) 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