Documentation
¶
Index ¶
- Variables
- type FileConfig
- type FileProvider
- func (p *FileProvider) DownloadFile(ctx context.Context, version, file string) ([]byte, error)
- func (p *FileProvider) GetPath(version, file string) string
- func (p *FileProvider) ListFiles(ctx context.Context, version string) ([]string, error)
- func (p *FileProvider) ListVersions(ctx context.Context) ([]string, error)
- type GithubConfig
- type GithubProvider
- func (p *GithubProvider) DownloadFile(ctx context.Context, version, file string) ([]byte, error)
- func (p *GithubProvider) GetPath(version, file string) string
- func (p *GithubProvider) ListFiles(ctx context.Context, version string) ([]string, error)
- func (p *GithubProvider) ListVersions(ctx context.Context) ([]string, error)
- type RateLimitError
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 (*FileProvider) GetPath ¶
func (p *FileProvider) GetPath(version, file string) string
TODO: Handle
func (*FileProvider) ListVersions ¶
func (p *FileProvider) ListVersions(ctx context.Context) ([]string, error)
Get the names of all tags in the repository
type GithubConfig ¶
type GithubProvider ¶
type GithubProvider struct {
// contains filtered or unexported fields
}
func NewGithub ¶
func NewGithub(cfg *GithubConfig) (*GithubProvider, error)
func (*GithubProvider) DownloadFile ¶
func (*GithubProvider) GetPath ¶
func (p *GithubProvider) GetPath(version, file string) string
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
Click to show internal directories.
Click to hide internal directories.