buildgolang.org/x/build/internal/criadb Index | Files

package criadb

import "golang.org/x/build/internal/criadb"

Package criadb provides a wrapper around the CrIA authorization database. The database is replicated from a GCP Cloud Storage bucket, and is updated every 30 + rand.Intn(10) seconds. This database is used to check whether a user is a member of a specified mdb (or other) group.

Index

Types

type AuthDatabase

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

func NewDatabase

func NewDatabase(serviceName string) (*AuthDatabase, error)

func NewDevDatabase

func NewDevDatabase() *AuthDatabase

func NewTestDatabase

func NewTestDatabase(memberships [][2]string) *AuthDatabase

func (*AuthDatabase) IsMemberOfAny

func (db *AuthDatabase) IsMemberOfAny(ctx context.Context, ident string, groups []string) (bool, error)

Source Files

db.go

Version
v0.0.0-20250421191922-3619c213cff3 (latest)
Published
Apr 21, 2025
Platform
linux/amd64
Imports
16 packages
Last checked
3 months ago

Tools for package owners.