server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationModelIDHeader = "openfga-authorization-model-id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ResolveNodeLimit       uint32
	ChangelogHorizonOffset int
	ListObjectsDeadline    time.Duration
	ListObjectsMaxResults  uint32
	Experimentals          []ExperimentalFeatureFlag
}

type Dependencies

type Dependencies struct {
	Datastore    storage.OpenFGADatastore
	Tracer       trace.Tracer
	Meter        metric.Meter
	Logger       logger.Logger
	Transport    gateway.Transport
	TokenEncoder encoder.Encoder
}

type ExperimentalFeatureFlag added in v0.3.1

type ExperimentalFeatureFlag string
const (
	// ListObjectsOptimized is an experimental flag that enables support for an optimized
	// openfga.v1.ListObjects API implementation which leverages type information and reverse
	// expansion.
	ListObjectsOptimized ExperimentalFeatureFlag = "list-objects-optimized"
)

type Server

type Server struct {
	openfgapb.UnimplementedOpenFGAServiceServer
	// contains filtered or unexported fields
}

A Server implements the OpenFGA service backend as both a GRPC and HTTP server.

func New

func New(dependencies *Dependencies, config *Config) *Server

New creates a new Server which uses the supplied backends for managing data.

func (*Server) Check

func (*Server) CreateStore

func (*Server) DeleteStore

func (*Server) Expand

func (*Server) GetStore

func (*Server) IsReady added in v0.1.5

func (s *Server) IsReady(ctx context.Context) (bool, error)

IsReady reports whether this OpenFGA server instance is ready to accept traffic.

func (*Server) ListObjects added in v0.2.0

func (*Server) ListStores

func (*Server) Read

func (*Server) ReadChanges

func (*Server) ReadTuples deprecated

ReadTuples returns all tuples for a given store.

Deprecated: Please use Read with a null tuple instead.

func (*Server) StreamedListObjects added in v0.2.0

func (*Server) Write

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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