Documentation
¶
Overview ¶
Package runtimebundle verifies and extracts the pinned portable PostgreSQL runtime.
Index ¶
- func CheckParents(name string) error
- func Download(ctx context.Context, name, source, sum string, offline bool) error
- func Ensure(ctx context.Context, executableRoot, target string) error
- func ExtractJar(name, member string, root *os.Root) error
- func ExtractTar(t *tar.Reader, root *os.Root) error
- func ExtractVCRuntime(name string, pin VCRuntime, root *os.Root) error
- func FileHash(name string) (string, error)
- func SafeName(name string) (string, error)
- func SourceBytes() []byte
- func Validate(executableRoot, target string) error
- func WriteFile(root *os.Root, name string, data []byte, mode fs.FileMode) error
- type Artifact
- type Sources
- type VCRuntime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckParents ¶
func Download ¶
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 ¶
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 SourceBytes ¶
func SourceBytes() []byte
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.