plugins

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0, CC-BY-4.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NamePattern is the plugin name regex pattern
	NamePattern = regexp.MustCompile(`^[0-9a-zA-Z\-_]+$`)
	// DownloadURLPattern is the plugin download url regex pattern
	DownloadURLPattern = regexp.MustCompile(`https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)`)
)

Functions

func VerifyDependencies

func VerifyDependencies(values ...map[Plugin][]Plugin) []string

VerifyDependencies checks if all plugins have compatible versions.

Types

type Plugin

type Plugin struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	DownloadURL string `json:"downloadURL"`
	// contains filtered or unexported fields
}

Plugin represents jenkins plugin.

func BasePlugins

func BasePlugins() []Plugin

BasePlugins returns list of plugins to install by operator.

func Must

func Must(plugin *Plugin, err error) Plugin

Must returns plugin from pointer and throws panic when error is set.

func New

func New(nameWithVersion string) (*Plugin, error)

New creates plugin from string, for example "name-of-plugin:0.0.1".

func NewPlugin

func NewPlugin(name, version, downloadURL string) (*Plugin, error)

NewPlugin creates plugin from name and version, for example "name-of-plugin:0.0.1".

func (Plugin) String

func (p Plugin) String() string

Jump to

Keyboard shortcuts

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