fetch

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fetch handles getting package source and data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend added in v0.1.0

type Backend interface {
	Do(*http.Request) (*http.Response, error)
	Output(string, ...string) ([]byte, error)
}

Backend to override calling conventions to external sources

type Context added in v0.1.3

type Context struct {
	Name string
}

Context is passed to processing to handle various inputs/values

func (Context) CompileRegexp added in v0.1.3

func (ctx Context) CompileRegexp(re string, vals any) (*regexp.Regexp, error)

CompileRegexp will allow compiling a regex with specific settings

func (Context) Templating added in v0.1.3

func (ctx Context) Templating(in string, vals any) (string, error)

Templating handles common templating for various fetch strings

type Filterable added in v0.5.5

type Filterable interface {
	Get(Retriever, string) ([]byte, error)
	Arguments() []string
	NewLine(string) (string, error)
}

Filterable is an interface to support arbitrary inputs that need to filter to tag sets

type Retriever added in v0.1.0

type Retriever interface {
	Download(bool, string, string) (bool, error)
	SetConnections(core.Connections)
	Process(Context, iter.Seq[any]) (*core.Resource, error)
	GitHubFetch(ownerRepo, call string, to any) error
	Debug(logging.Category, string, ...any)
	ExecuteCommand(cmd string, args ...string) (string, error)
	Get(string) (*http.Response, error)
}

Retriever provides the means to fetch application information

type Template added in v0.1.3

type Template struct {
	Tag core.Version
}

Template are the parameters for templated items

Directories

Path Synopsis
Package command can run an arbitrary command+args to get version information
Package command can run an arbitrary command+args to get version information
Package filtered handles components that are 'raw' lines of text that need to become a version
Package filtered handles components that are 'raw' lines of text that need to become a version
Package git gets git-tagged resources
Package git gets git-tagged resources
Package github can handle git branch sources
Package github can handle git branch sources
Package retriever gets release/asset information from upstreams
Package retriever gets release/asset information from upstreams
Package static handles static definitions of resources
Package static handles static definitions of resources
Package web can scrape a page for versions and try to match filters
Package web can scrape a page for versions and try to match filters

Jump to

Keyboard shortcuts

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