authz

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	AuthorizedRepositories(context.Context, authn.Principal, RepositorySelection) ([]repository.Repository, error)
}

type Postgres

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

func NewPostgres

func NewPostgres(store *postgres.Store) *Postgres

func (*Postgres) AllAuthorizedRepositories added in v0.6.0

func (authorizer *Postgres) AllAuthorizedRepositories(ctx context.Context, principal authn.Principal) ([]repository.Repository, error)

AllAuthorizedRepositories returns every repository the principal may read, without a name selection. It satisfies supplychain.Authorizer.

func (*Postgres) AuthorizedRepositories

func (authorizer *Postgres) AuthorizedRepositories(ctx context.Context, principal authn.Principal, selection RepositorySelection) ([]repository.Repository, error)

func (*Postgres) AuthorizedRepository

func (authorizer *Postgres) AuthorizedRepository(ctx context.Context, principal authn.Principal, repositoryID int64) (repository.Repository, error)

type RepositorySelection

type RepositorySelection struct{ Names []string }

type Static

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

func NewStatic

func NewStatic(registry repository.Registry) *Static

func (*Static) AuthorizedRepositories

func (authorizer *Static) AuthorizedRepositories(ctx context.Context, principal authn.Principal, selection RepositorySelection) ([]repository.Repository, error)

Jump to

Keyboard shortcuts

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