upstream

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

Registry is the registered list of upstreams

func GetRegistry

func GetRegistry() Registry

GetRegistry returns the current and globaly available Registry instance

func NewRegistry

func NewRegistry() Registry

NewRegistry inits a new instance of Registry with default values

func (Registry) Get

func (r Registry) Get(name string) Upstream

Get an entry of the registry

func (Registry) Names

func (r Registry) Names() []string

Names of the registered upstreams

type Upstream

type Upstream interface {
	// APITokenEnvVar specifies which ENV var holds the API token for the upstream
	APITokenEnvVar() string
	// Publish  a release to the upstream
	Publish(ctx context.Context, apiToken string, r *release.Release) (*release.UpstreamResult, error)
}

Upstream is the interface to pushlish releases

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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