fga

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFGATupleKey

func FromFGATupleKey(fgatk openfga.TupleKey) authz.TupleKey

func NewEntityKeySplit

func NewEntityKeySplit(v string) authz.EntityKey

func ToFGATupleKey

func ToFGATupleKey(tk authz.TupleKey) openfga.TupleKey

Types

type FGAClient

type FGAClient struct {
	ModelID string
	// contains filtered or unexported fields
}

func NewFGAClient

func NewFGAClient(endpoint string, storeId string, modelId string) (*FGAClient, error)

func (*FGAClient) Check

func (c *FGAClient) Check(ctx context.Context, tk authz.TupleKey, ctxTuples ...authz.TupleKey) (bool, error)

func (*FGAClient) CreateModel

func (c *FGAClient) CreateModel(ctx context.Context, fn string) (string, error)

func (*FGAClient) CreateStore

func (c *FGAClient) CreateStore(ctx context.Context, storeName string) (string, error)

func (*FGAClient) DeleteTuple

func (c *FGAClient) DeleteTuple(ctx context.Context, tk authz.TupleKey) error

func (*FGAClient) GetObjectTuples

func (c *FGAClient) GetObjectTuples(ctx context.Context, tk authz.TupleKey) ([]authz.TupleKey, error)

func (*FGAClient) ListObjects

func (c *FGAClient) ListObjects(ctx context.Context, tk authz.TupleKey) ([]authz.TupleKey, error)

func (*FGAClient) SetExclusiveRelation

func (c *FGAClient) SetExclusiveRelation(ctx context.Context, tk authz.TupleKey) error

func (*FGAClient) SetExclusiveSubjectRelation

func (c *FGAClient) SetExclusiveSubjectRelation(ctx context.Context, tk authz.TupleKey, checkRelations ...authz.Relation) error

func (*FGAClient) WriteTuple

func (c *FGAClient) WriteTuple(ctx context.Context, tk authz.TupleKey) error

Jump to

Keyboard shortcuts

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