spicedbx

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package spicedbx is the wrapper around spicedb client interaction

Package spicedbx is the wrapper around the spicedb client

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorNoNamespace is returned when no namespace is provided with a query
	ErrorNoNamespace = errors.New("no namespace provided")
)

Functions

func GenerateSchema

func GenerateSchema(namespace string, resourceTypes []types.ResourceType) (string, error)

GenerateSchema generates the spicedb schema from the template

func GeneratedSchema

func GeneratedSchema(namespace string) string

GeneratedSchema produces a namespaced SpiceDB schema based on the default IAPL policy.

func Healthcheck

func Healthcheck(client *authzed.Client) func(ctx context.Context) error

Healthcheck reads the schema to check if the connection is working

func NewClient

func NewClient(cfg Config, enableTracing bool) (*authzed.Client, error)

NewClient returns a new spicedb/authzed client

Types

type Config

type Config struct {
	Endpoint  string
	Key       string
	Insecure  bool
	VerifyCA  bool `mapstruct:"verifyca"`
	Prefix    string
	PolicyDir string
}

Config values for a SpiceDB connection

Jump to

Keyboard shortcuts

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