Help us shape the future of Go! Take the 2026 Go Developer Survey

source

package
v0.2.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MaxEntries = 10000
View Source
const MaxFileBytes = 64 << 20
View Source
const MaxTotalBytes = 64 << 20

Variables

This section is empty.

Functions

func Fetch

func Fetch(ctx context.Context, reader Reader, repo forge.RepoRef, commit string) (sandbox.Snapshot, error)

func ValidEntry

func ValidEntry(e forge.SourceEntry, format string) bool

func ValidSHA

func ValidSHA(value, format string) bool

func ValidateManifest

func ValidateManifest(ctx context.Context, m forge.SourceManifest) (string, error)

func VerifyBlob

func VerifyBlob(format, expected string, content []byte) bool

Types

type BlobCache

type BlobCache struct {
	// contains filtered or unexported fields
}

func NewBlobCache

func NewBlobCache(limit int) *BlobCache

type Reader

type Reader struct {
	Manifest func(context.Context, forge.RepoRef, string) (forge.SourceManifest, error)
	File     func(context.Context, forge.RepoRef, string, string) (forge.File, error)
	Files    func(context.Context, forge.RepoRef, []string, string) ([]forge.File, error)
	Cache    *BlobCache
	Scope    string
}

func (Reader) Blob

func (r Reader) Blob(ctx context.Context, repo forge.RepoRef, entry forge.SourceEntry, format, commit string) ([]byte, error)

Jump to

Keyboard shortcuts

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