runtimebundle

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0 modules, 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

Overview

Package runtimebundle verifies and extracts the pinned portable PostgreSQL runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckParents

func CheckParents(name string) error

func Download

func Download(ctx context.Context, name, source, sum string, offline bool) error

Download verifies cached bytes or atomically publishes a fully verified download. Partial download files are always removed; neither cache nor installed runtime is overwritten.

func Ensure

func Ensure(ctx context.Context, executableRoot, target string) error

Ensure installs only when runtime/postgres does not exist. Callers must hold the executable-root install lock across this call. Existing folders are preserved.

func ExtractJar

func ExtractJar(name, member string, root *os.Root) error

func ExtractTar

func ExtractTar(t *tar.Reader, root *os.Root) error

func ExtractVCRuntime

func ExtractVCRuntime(name string, pin VCRuntime, root *os.Root) error

func FileHash

func FileHash(name string) (string, error)

func SafeName

func SafeName(name string) (string, error)

func SourceBytes

func SourceBytes() []byte

func Validate

func Validate(executableRoot, target string) error

Validate checks for a complete existing runtime without executing or downloading it.

func WriteFile

func WriteFile(root *os.Root, name string, data []byte, mode fs.FileMode) error

Types

type Artifact

type Artifact struct {
	Artifact string `json:"artifact"`
	Archive  string `json:"archive"`
	SHA256   string `json:"sha256"`
}

Artifact identifies a checksum-pinned publisher archive.

type Sources

type Sources struct {
	PostgresVersion  string              `json:"postgres_version"`
	PublisherVersion string              `json:"publisher_version"`
	Publisher        string              `json:"publisher"`
	Repository       string              `json:"repository"`
	Targets          map[string]Artifact `json:"targets"`
	WindowsVCRuntime VCRuntime           `json:"windows_vc_runtime"`
}

Sources contains the pins embedded in this CLI build.

func PinnedSources

func PinnedSources() (Sources, error)

func (Sources) PostgresArtifact

func (p Sources) PostgresArtifact(target string) (filename, source string, err error)

type VCRuntime

type VCRuntime struct {
	Version        string   `json:"version"`
	URL            string   `json:"url"`
	SHA256         string   `json:"sha256"`
	ChecksumSource string   `json:"checksum_source"`
	Files          []string `json:"files"`
}

VCRuntime identifies the app-local DLLs needed by Windows PostgreSQL.

Jump to

Keyboard shortcuts

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