criadb

package
v0.0.0-...-2f2bd00 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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)

Jump to

Keyboard shortcuts

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