Documentation ¶
Overview ¶
Package publish implements plugin and plugin api publishing related function
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishPlugins ¶
PublishPlugins publishes the plugin based on provided metadata This function is responsible for auto-detecting the available plugin versions as well as os-arch and publishing artifacts to correct discovery and distribution based on the publisher type
Types ¶
type LocalPublisher ¶
type LocalPublisher struct {
LocalDistributionPath string
}
LocalPublisher defines local publisher configuration
func (*LocalPublisher) PublishDiscovery ¶
func (l *LocalPublisher) PublishDiscovery() error
PublishDiscovery publishes the CLIPlugin resources YAML to a local discovery directory
func (*LocalPublisher) PublishPlugin ¶
func (l *LocalPublisher) PublishPlugin(sourcePath, version, os, arch, plugin string) (string, error)
PublishPlugin publishes plugin binaries to local distribution directory
type Metadata ¶
type Metadata struct { Plugins []string InputArtifactDir string OSArch []string RecommendedVersion string LocalDiscoveryPath string PublisherInterface Publisher }
Metadata defines metadata required for plugins publishing
type OCIPublisher ¶
type OCIPublisher struct { OCIDiscoveryImage string OCIDistributionImageRepository string LocalDiscoveryPath string }
OCIPublisher defines OCI publisher configuration
func (*OCIPublisher) PublishDiscovery ¶
func (o *OCIPublisher) PublishDiscovery() error
PublishDiscovery publishes the CLIPlugin resources YAML to a OCI based discovery container image
func (*OCIPublisher) PublishPlugin ¶
func (o *OCIPublisher) PublishPlugin(version, os, arch, plugin, sourcePath string) (string, error)
PublishPlugin publishes plugin binaries to OCI based distribution directory
type Publisher ¶
type Publisher interface { // PublishPlugin publishes plugin binaries to distribution PublishPlugin(version, os, arch, plugin, sourcePath string) (string, error) // PublishDiscovery publishes the CLIPlugin resources YAML to a discovery PublishDiscovery() error }
Publisher is an interface to publish plugin and CLIPlugin resource files to discovery
func NewLocalPublisher ¶
NewLocalPublisher create new local publisher
func NewOCIPublisher ¶
func NewOCIPublisher( ociDiscoveryImage, ociDistributionImageRepository, localDiscoveryPath string) Publisher
NewOCIPublisher create new OCI based publisher