directory

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBPath         string        `json:"db_path"`
	RequestTimeout time.Duration `json:"request_timeout"`
	Seed           bool          `json:"seed_metadata"`
}

type Directory

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

func New

func New(config *Config, logger *zerolog.Logger) (*Directory, error)

func (*Directory) CheckPermission

Check if subject has permission on object.

func (*Directory) CheckRelation

Check if subject has relation to object.

func (*Directory) Close

func (s *Directory) Close()

func (*Directory) DeleteObject

func (*Directory) DeleteObjectType

func (*Directory) DeletePermission

func (*Directory) DeleteRelation

func (*Directory) DeleteRelationType

func (*Directory) Export

func (s *Directory) Export(req *dse.ExportRequest, stream dse.Exporter_ExportServer) error

func (*Directory) GetGraph

Get object dependency graph.

func (*Directory) GetObject

Get single object instance.

func (*Directory) GetObjectMany

Get multiple object instances by id or type+key, in a single request.

func (*Directory) GetObjectType

Get object type (metadata).

func (*Directory) GetObjectTypes

Get all objects types (metadata) (paginated).

func (*Directory) GetObjects

Get all object instances, optionally filtered by object type. (paginated).

func (*Directory) GetPermission

Get permission (metadata).

func (*Directory) GetPermissions

Get all permissions (metadata) (paginated).

func (*Directory) GetRelation

Get relation instances based on subject, relation, object filter.

func (*Directory) GetRelationType

Get relation type (metadata).

func (*Directory) GetRelationTypes

Get all relation types, optionally filtered by object type (metadata) (paginated).

func (*Directory) GetRelations

Get relation instances based on subject, relation, object filter (paginated).

func (*Directory) Import

func (s *Directory) Import(stream dsi.Importer_ImportServer) error

func (*Directory) Migrate added in v0.21.0

func (s *Directory) Migrate(version string) error

func (*Directory) SetObject

object methods.

func (*Directory) SetObjectType

object type metadata methods.

func (*Directory) SetPermission

permission metadata methods.

func (*Directory) SetRelation

relation methods.

func (*Directory) SetRelationType

relation type metadata methods.

Jump to

Keyboard shortcuts

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