manifest

package
v0.0.0-...-0cee358 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssetRegex = regexp.MustCompile(`^MANIFEST-([0-9a-fA-F]{40}).json.gz$`)

AssetRegex is the pattern for a valid manifest filename. The full sha is captured in group 1.

Functions

func Filter

func Filter(body []byte, paths []string) (result []byte, err error)

Filter filters items in the the given manifest JSON, omitting anything that isn't an item which has a URL beginning with one of the given paths.

Types

type API

type API interface {
	GetManifestForSHA(string) (string, []byte, error)
	NewRedis(duration time.Duration) shared.ReadWritable
}

API handles manifest-related fetches and caching.

func NewAPI

func NewAPI(ctx context.Context) API

NewAPI returns an API implementation for the given context. nolint:ireturn // TODO: Fix ireturn lint error

Directories

Path Synopsis
Package mock_manifest is a generated GoMock package.
Package mock_manifest is a generated GoMock package.

Jump to

Keyboard shortcuts

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