provider

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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

View Source
var (
	ErrNotFound = fmt.Errorf("not found")
)

Functions

This section is empty.

Types

type FileConfig

type FileConfig struct {
	FilePath string
}

type FileProvider

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

func NewFileProvider

func NewFileProvider(cfg *FileConfig) (*FileProvider, error)

func (*FileProvider) DownloadFile

func (p *FileProvider) DownloadFile(ctx context.Context, version, file string) ([]byte, error)

func (*FileProvider) GetPath

func (p *FileProvider) GetPath(version, file string) string

TODO: Handle

func (*FileProvider) ListFiles

func (p *FileProvider) ListFiles(ctx context.Context, version string) ([]string, error)

func (*FileProvider) ListVersions

func (p *FileProvider) ListVersions(ctx context.Context) ([]string, error)

Get the names of all tags in the repository

type GithubConfig

type GithubConfig struct {
	Owner string
	Repo  string
	// TODO: Verify that an empty PathPrefix works as expected
	PathPrefix string
	FileSuffix string
	MaxTags    int
	AuthToken  string
}

type GithubProvider

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

func NewGithub

func NewGithub(cfg *GithubConfig) (*GithubProvider, error)

func (*GithubProvider) DownloadFile

func (p *GithubProvider) DownloadFile(ctx context.Context, version, file string) ([]byte, error)

func (*GithubProvider) GetPath

func (p *GithubProvider) GetPath(version, file string) string

func (*GithubProvider) ListFiles

func (p *GithubProvider) ListFiles(ctx context.Context, version string) ([]string, error)

func (*GithubProvider) ListVersions

func (p *GithubProvider) ListVersions(ctx context.Context) ([]string, error)

Get the names of all tags in the repository

type RateLimitError

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

func NewRateLimitError

func NewRateLimitError(message string, kvs ...any) RateLimitError

func (RateLimitError) Error

func (r RateLimitError) Error() string

func (RateLimitError) KVs

func (r RateLimitError) KVs() []any

Jump to

Keyboard shortcuts

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