drivers

package
v0.0.0-...-66f71af Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DriverEmbeddedOpenFGA is the default authorization driver. It currently falls back to DriverTLS for all TLS
	// clients. It cannot be initialised until after the cluster database is operational.
	DriverEmbeddedOpenFGA string = "embedded-openfga"
)
View Source
const (
	// DriverTLS is used at start up to allow communication between cluster members and initialise the cluster database.
	DriverTLS string = "tls"
)

Variables

View Source
var ErrUnknownDriver = errors.New("Unknown driver")

ErrUnknownDriver is the "Unknown driver" error.

Functions

func LoadAuthorizer

func LoadAuthorizer(ctx context.Context, driver string, logger logger.Logger, options ...func(opts *Opts)) (auth.Authorizer, error)

LoadAuthorizer instantiates, configures, and initialises an Authorizer.

func WithOpenFGADatastore

func WithOpenFGADatastore(store storage.OpenFGADatastore) func(*Opts)

WithOpenFGADatastore should be passed into LoadAuthorizer when using the embedded openfga driver.

Types

type Opts

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

Opts is used as part of the LoadAuthorizer function so that only the relevant configuration fields are passed into a particular driver.

Jump to

Keyboard shortcuts

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