v3

package
v0.30.11 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

func NewExporter

func NewExporter(logger *zerolog.Logger, store *bdb.BoltDB) *Exporter

func (*Exporter) Export

func (s *Exporter) Export(req *dse3.ExportRequest, stream dse3.Exporter_ExportServer) error

type Importer

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

func NewImporter

func NewImporter(logger *zerolog.Logger, store *bdb.BoltDB) *Importer

func (*Importer) Import

func (s *Importer) Import(stream dsi3.Importer_ImportServer) error

type Model

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

func NewModel

func NewModel(logger *zerolog.Logger, store *bdb.BoltDB) *Model

func (*Model) DeleteManifest

func (*Model) GetManifest

func (s *Model) GetManifest(req *dsm3.GetManifestRequest, stream dsm3.Model_GetManifestServer) error

func (*Model) SetManifest

func (s *Model) SetManifest(stream dsm3.Model_SetManifestServer) error

type ObjType added in v0.30.9

type ObjType string

type ObjectTypes added in v0.30.9

type ObjectTypes map[ObjType]struct {
	ObjCount  int32     `json:"_obj_count,omitempty"`
	Count     int32     `json:"_count,omitempty"`
	Relations Relations `json:"relations,omitempty"`
}

type Reader

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

func NewReader

func NewReader(logger *zerolog.Logger, store *bdb.BoltDB) *Reader

func (*Reader) Check

func (s *Reader) Check(ctx context.Context, req *dsr3.CheckRequest) (*dsr3.CheckResponse, error)

Check, if subject is permitted to access resource (object).

func (*Reader) CheckPermission

CheckPermission, check if subject is permitted to access resource (object).

func (*Reader) CheckRelation

CheckRelation, check if subject has the specified relation to a resource (object).

func (*Reader) GetGraph

func (s *Reader) GetGraph(ctx context.Context, req *dsr3.GetGraphRequest) (*dsr3.GetGraphResponse, error)

GetGraph, return graph of connected objects and relations for requested anchor subject/object.

func (*Reader) GetObject

func (s *Reader) GetObject(ctx context.Context, req *dsr3.GetObjectRequest) (*dsr3.GetObjectResponse, error)

GetObject, get single object instance.

func (*Reader) GetObjectMany

GetObjectMany, get multiple object instances by type+id, in a single request.

func (*Reader) GetObjects

GetObjects, gets (all) object instances, optionally filtered by object type, as a paginated array of objects.

func (*Reader) GetRelation

GetRelation, get a single relation instance based on subject, relation, object filter.

func (*Reader) GetRelations

GetRelations, gets paginated set of relation instances based on subject, relation, object filter.

type Relation added in v0.30.9

type Relation string

type Relations added in v0.30.9

type Relations map[Relation]struct {
	Count        int32        `json:"_count,omitempty"`
	SubjectTypes SubjectTypes `json:"subject_types,omitempty"`
}

type Stats added in v0.30.9

type Stats struct {
	ObjectTypes ObjectTypes `json:"object_types,omitempty"`
}

func (*Stats) CountObject added in v0.30.9

func (s *Stats) CountObject(obj *dsc3.Object)

func (*Stats) CountRelation added in v0.30.9

func (s *Stats) CountRelation(rel *dsc3.Relation)

type SubRel added in v0.30.9

type SubRel string

type SubType added in v0.30.9

type SubType string

type SubjectRelations added in v0.30.9

type SubjectRelations map[SubRel]struct {
	Count int32 `json:"_count,omitempty"`
}

type SubjectTypes added in v0.30.9

type SubjectTypes map[SubType]struct {
	Count            int32            `json:"_count,omitempty"`
	SubjectRelations SubjectRelations `json:"subject_relations,omitempty"`
}

type Writer

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

func NewWriter

func NewWriter(logger *zerolog.Logger, store *bdb.BoltDB) *Writer

func (*Writer) DeleteObject

func (*Writer) DeleteRelation

func (*Writer) SetObject

func (s *Writer) SetObject(ctx context.Context, req *dsw3.SetObjectRequest) (*dsw3.SetObjectResponse, error)

object methods.

func (*Writer) SetRelation

relation methods.

Jump to

Keyboard shortcuts

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