bufpluginref

package
v0.0.0-...-26f4575 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPluginReferenceOrIdentity

func IsPluginReferenceOrIdentity(plugin string) bool

IsPluginReferenceOrIdentity returns true if the argument matches a plugin reference (with version) or a plugin identity (without version).

func ValidatePluginIdentity

func ValidatePluginIdentity(pluginIdentity PluginIdentity) error

func ValidatePluginVersion

func ValidatePluginVersion(version string) error

func ValidateRemote

func ValidateRemote(remote string) error

Types

type PluginIdentity

type PluginIdentity interface {
	Remote() string
	Owner() string
	Plugin() string

	// IdentityString is the string remote/owner/plugin.
	IdentityString() string
	// contains filtered or unexported methods
}

PluginIdentity is a plugin identity.

It just contains remote, owner, plugin.

func NewPluginIdentity

func NewPluginIdentity(
	remote string,
	owner string,
	plugin string,
) (PluginIdentity, error)

NewPluginIdentity returns a new PluginIdentity.

func PluginIdentityForString

func PluginIdentityForString(path string) (PluginIdentity, error)

PluginIdentityForString returns a new PluginIdentity for the given string.

This parses the path in the form remote/owner/plugin.

type PluginReference

type PluginReference interface {
	PluginIdentity

	// ReferenceString is the string representation of identity:version:revision.
	ReferenceString() string

	// Version is the plugin's semantic version.
	Version() string

	// Revision is the plugin's revision number.
	//
	// The accepted range for this value is 0 - math.MaxInt32.
	Revision() int
	// contains filtered or unexported methods
}

PluginReference uniquely references a plugin (including version and revision information).

It can be used to identify dependencies on other plugins.

func NewPluginReference

func NewPluginReference(
	identity PluginIdentity,
	version string,
	revision int,
) (PluginReference, error)

NewPluginReference returns a new PluginReference.

func PluginReferenceForString

func PluginReferenceForString(reference string, revision int) (PluginReference, error)

PluginReferenceForString returns a new PluginReference for the given string.

This parses the path in the form remote/owner/plugin:version.

Jump to

Keyboard shortcuts

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