allowlist

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package allowlist provides a mechanism restrict which repos can go through Packhorse's caching mechanism. Repositories not in the allowlist would be proxied to the upstream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allowlist

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

Allowlist holds the set of repos that should be routed through Packhorse's caching path. If repos is empty, no repos are cached. If disabled is true, all repos will be cached.

func New

func New(repos []string, disabled bool) *Allowlist

New builds an Allowlist from a list of repositories in the form of "group/project" - e.g. "gitlab-org/gitlab".

func (*Allowlist) Allowed

func (a *Allowlist) Allowed(repo string) bool

Allowed returns whether the given repository should go through Packhorse's caching path. Note: An empty struct e.g. `var list *allowlist.Allowlist` produces the same behavior as a disabled allowlist (allows all repositories).

Jump to

Keyboard shortcuts

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