Documentation
¶
Overview ¶
Package download implements downloading DuckDB releases as a library
Index ¶
Constants ¶
View Source
const ( LatestVersion = "latest" PreviewVersion = "preview" )
View Source
const ( BinTypeDynLib = BinType(iota) BinTypeCli )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶ added in v0.2.0
type Spec ¶
type Spec struct {
// Type of binary to download (enum)
Type BinType
// DuckDB version, defaults to latest
// Supported values are either plain semantic version with optional 'v' prefix - e.g. 1.2.2, v1.3.2,
// or "latest" - latest release version
// or "preview" - latest preview version from https://duckdb.org/docs/installation/?version=main
Version string
// Target OS, defaults to runtime.GOOS
OS string
// Target arch defaults, to runtime.GOARCH
Arch string
// CacheDownload enables caching the bundle downloaded from the Internet in the temp directory,
// if the server supports it by exposing Etag and Content-Length headers.
// CacheDownload is independent of the Overwrite setting.
CacheDownload bool
// Overwrite forces overwriting the final file even if there is an existing appropriate in the working directory
// The definition of "appropriate" will evolve over time - for now, all existing files are accepted.
Overwrite bool
}
Spec defines the desired DuckDB binary and download options Use DefaultSpec() to get a recommended configuration. The zero value is also valid.
func DefaultSpec ¶
func DefaultSpec() Spec
DefaultSpec creates a recommended spec for downloading releases The zero-value of Spec is also a valid configuration. NB: Changes to the default spec are not considered breaking changes and may happen in a minor release. They won't happen in patch releases.
Click to show internal directories.
Click to hide internal directories.