denolock

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package denolock provides the pinned Deno release nelm downloads and embeds. The digests are committed and embedded rather than fetched, so that they go through code review instead of coming from the same host as the artifact they are supposed to vouch for. Generated by scripts/denolock.

Index

Constants

View Source
const (
	// ChecksumURLSuffix is only for scripts/denolock: nothing verifies against a fetched digest.
	ChecksumURLSuffix = ".sha256sum"
)

Variables

This section is empty.

Functions

func ArchiveURL

func ArchiveURL(goos, goarch string) (string, error)

func ArchiveURLFor

func ArchiveURLFor(version, target string) string

ArchiveURLFor is for scripts/denolock, which builds URLs for a version the lock does not record yet.

func Version

func Version() (string, error)

Types

type Lock

type Lock struct {
	// Platforms is keyed by "<GOOS>/<GOARCH>".
	Platforms map[string]*Platform `json:"platforms"`
	Version   string               `json:"version"`
}

func Read

func Read() (*Lock, error)

func (*Lock) ArchiveURL

func (l *Lock) ArchiveURL(goos, goarch string) (string, error)

func (*Lock) Get

func (l *Lock) Get(goos, goarch string) (*Platform, error)

func (*Lock) Validate

func (l *Lock) Validate() error

type Platform

type Platform struct {
	ArchiveSHA256 string `json:"archiveSha256"`
	// BinarySHA256 is the digest of the uncompressed Deno binary inside the archive, which is what the
	// embedded blob is checked against.
	BinarySHA256 string `json:"binarySha256"`
	Target       string `json:"target"`
}

func Get

func Get(goos, goarch string) (*Platform, error)

Jump to

Keyboard shortcuts

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