discovery

package
v0.9.0-dev Latest Latest
Warning

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

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

Documentation

Overview

Package discovery is implements discovery interface for plugin discovery Discovery is the interface to fetch the list of available plugins, their supported versions and how to download them either stand-alone or scoped to a server. A separate interface for discovery helps to decouple discovery (which is usually tied to a server or user identity) from distribution (which can be shared).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoveredFromK8sV1alpha1

func DiscoveredFromK8sV1alpha1(p *cliv1alpha1.CLIPlugin) plugin.Discovered

DiscoveredFromK8sV1alpha1 returns discovered plugin object from k8sV1alpha1

Types

type Discovery

type Discovery interface {
	// Name of the repository.
	Name() string

	// List available plugins.
	List() ([]plugin.Discovered, error)

	// Describe a plugin.
	Describe(name string) (plugin.Discovered, error)

	// Type returns type of discovery.
	Type() string
}

Discovery is the interface to fetch the list of available plugins

func CreateDiscoveryFromV1alpha1

func CreateDiscoveryFromV1alpha1(pd v1alpha1.PluginDiscovery) (Discovery, error)

CreateDiscoveryFromV1alpha1 creates discovery interface from v1alpha1 API

func NewGCPDiscovery

func NewGCPDiscovery(bucket, manifestPath, name string) Discovery

NewGCPDiscovery returns a new GCP bucket repository.

func NewLocalDiscovery

func NewLocalDiscovery(name, localPath string) Discovery

NewLocalDiscovery returns a new local repository. If provided localPath is not an absolute path search under `xdg.ConfigHome/tanzu-plugin/discovery` directory

func NewOCIDiscovery

func NewOCIDiscovery(name, image string) Discovery

NewOCIDiscovery returns a new local repository.

type GCPDiscovery

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

GCPDiscovery is a artifact discovery endpoing utilizing a GCP bucket.

func (*GCPDiscovery) Describe

func (g *GCPDiscovery) Describe(name string) (p plugin.Discovered, err error)

Describe a plugin.

func (*GCPDiscovery) List

func (g *GCPDiscovery) List() (plugins []plugin.Discovered, err error)

List available plugins.

func (*GCPDiscovery) Name

func (g *GCPDiscovery) Name() string

Name of the repository.

func (*GCPDiscovery) Type

func (g *GCPDiscovery) Type() string

Type of the discovery.

type LocalDiscovery

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

LocalDiscovery is a artifact discovery endpoint utilizing a local host os.

func (*LocalDiscovery) Describe

func (l *LocalDiscovery) Describe(name string) (p plugin.Discovered, err error)

Describe a plugin.

func (*LocalDiscovery) List

func (l *LocalDiscovery) List() ([]plugin.Discovered, error)

List available plugins.

func (*LocalDiscovery) Manifest

func (l *LocalDiscovery) Manifest() ([]plugin.Discovered, error)

Manifest returns the manifest for a local repository.

func (*LocalDiscovery) Name

func (l *LocalDiscovery) Name() string

Name of the repository.

func (*LocalDiscovery) Type

func (l *LocalDiscovery) Type() string

Type of the repository.

type OCIDiscovery

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

OCIDiscovery is a artifact discovery endpoint utilizing OCI image

func (*OCIDiscovery) Describe

func (od *OCIDiscovery) Describe(name string) (p plugin.Discovered, err error)

Describe a plugin.

func (*OCIDiscovery) List

func (od *OCIDiscovery) List() (plugins []plugin.Discovered, err error)

List available plugins.

func (*OCIDiscovery) Name

func (od *OCIDiscovery) Name() string

Name of the repository.

func (*OCIDiscovery) Type

func (od *OCIDiscovery) Type() string

Type of the discovery.

Jump to

Keyboard shortcuts

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