list

package
v0.19.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrGithubRateLimitClose is returned when we are close to a ratelimit
	ErrGithubRateLimitClose = errors.New("github rate limit is close")

	// ErrGithubRateLimited is returned when we are close to a ratelimit
	ErrGithubRateLimited = errors.New("rate limited")

	// GithubLowRateLimit is the low boundary for rate limits
	GithubLowRateLimit = 4
)
View Source
var (
	// ErrGitlabRateLimitClose is returned when we are close to a ratelimit
	ErrGitlabRateLimitClose = errors.New("gitlab rate limit is close")

	// ErrGitlabRateLimited is returned when we are close to a ratelimit
	ErrGitlabRateLimited = errors.New("rate limited")

	// GitlabLowRateLimit is the low boundary for rate limits
	GitlabLowRateLimit = 4
)

Functions

This section is empty.

Types

type GithubRelease

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

GithubRelease contains what is required to get a list of release from Github

func (GithubRelease) Get

func (g GithubRelease) Get(ctx context.Context) ([]string, error)

Get returns a list of available versions

type GitlabRelease added in v0.16.0

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

GitlabRelease contains what is required to get a list of release from Gitlab

func (GitlabRelease) Get added in v0.16.0

func (g GitlabRelease) Get(ctx context.Context) ([]string, error)

Get returns a list of available versions

type List

type List struct {
	Type        string `yaml:"type"`
	Prefix      string `yaml:"prefix"`
	Exclude     string `yaml:"exclude"` // exclude versions containing this regex
	VersionFrom string `yaml:"version_from"`
	URL         string `yaml:"url"`
	Versions    []string
}

List contains list definition

func (List) Factory

func (l List) Factory() Lister

Factory returns instances that comply to Lister interface

type Lister

type Lister interface {
	Get(ctx context.Context) ([]string, error)
}

Lister should return a list of available release versions

type Static added in v0.2.5

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

Static contains what is required to get a list of release from Github

func (Static) Get added in v0.2.5

func (s Static) Get(ctx context.Context) ([]string, error)

Get returns a list of available versions

Jump to

Keyboard shortcuts

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