Help us shape the future of Go! Take the 2026 Go Developer Survey

pluginref

package
v2.0.0-...-310b166 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pluginref defines plugin dependency declarations independently of registry transport, artifact resolution, and runtime loading.

Index

Constants

View Source
const DefaultRegistry = "https://plugins.actionlint.kjanat.dev/"

DefaultRegistry is the public actionlint plugin catalogue.

Variables

This section is empty.

Functions

func LocalRegistryDirectory

func LocalRegistryDirectory(raw string) (string, error)

LocalRegistryDirectory accepts an explicit absolute file URI. Local candidate catalogues have no authenticated publisher and cannot substitute for HTTPS registries.

func ValidAlias

func ValidAlias(name string) bool

ValidAlias checks the shared catalogue and declaration shorthand syntax.

func ValidRepository

func ValidRepository(name string) bool

ValidRepository validates forge-qualified repository paths for declarations and catalogue identities. Callers retain their existing case normalization.

func ValidVersion

func ValidVersion(version string) bool

ValidVersion accepts exact release tags, including slash-separated tag names.

Types

type Reference

type Reference struct {
	Name     string
	Version  string
	Registry string
	// contains filtered or unexported fields
}

Reference declares a registry alias or repository, requested release, and catalogue. Version is "latest" or an exact release tag, never a resolved artifact.

func New

func New(name, version, registry string) (Reference, error)

New validates and normalizes a plugin declaration. Empty version and registry select latest stable and DefaultRegistry respectively.

func Parse

func Parse(value string) (Reference, error)

Parse accepts a registry alias, owner/repo or a supported forge-qualified repository, optionally followed by @latest or an exact release tag.

func (Reference) DirectSource

func (r Reference) DirectSource() string

DirectSource returns a SHA-pinned artifact URL, or empty for registry entries. Direct declarations already contain their immutable pin and need no lock row.

func (Reference) Equal

func (r Reference) Equal(other Reference) bool

Equal compares normalized declaration identities and selection intent.

func (Reference) IsAlias

func (r Reference) IsAlias() bool

IsAlias reports a registry-assigned shorthand, whose repository is resolved by that registry and recorded in the project lock.

func (Reference) Normalize

func (r Reference) Normalize() (Reference, error)

Normalize validates either supported declaration form.

func (Reference) String

func (r Reference) String() string

String preserves the declared alias or full repository identity.

Jump to

Keyboard shortcuts

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