repositories

package
v0.0.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityConfig

type EntityConfig struct {
	Entity           string
	SerializedConfig []byte
	Version          string
	CommitTime       time.Time
}

EntityConfig -

func (EntityConfig) Serialized

func (e EntityConfig) Serialized() string

Serialized -

type IEntityConfigRepository

type IEntityConfigRepository interface {
	Migratable
	All(ctx context.Context, version string) (configs []EntityConfig, err error)
	Read(ctx context.Context, name string, version string) (config EntityConfig, err error)
	Write(ctx context.Context, configs []EntityConfig, version string) (err error)
}

IEntityConfigRepository -

type IRelationTupleRepository

type IRelationTupleRepository interface {
	Migratable
	QueryTuples(ctx context.Context, entityType string, entityID string, relation string) (tuple.ITupleIterator, error)
	ReverseQueryTuples(ctx context.Context, entity string, relation string, subjectEntity string, subjectIDs []string, subjectRelation string) (tuple.ITupleIterator, error)
	Read(ctx context.Context, filter *base.TupleFilter) (tuple.ITupleCollection, error)
	Write(context.Context, tuple.ITupleIterator) error
	Delete(context.Context, tuple.ITupleIterator) error
}

IRelationTupleRepository -

type Migratable

type Migratable interface {
	Migrate() error
}

Migratable -

type RelationTuple

type RelationTuple struct {
	Entity          string
	EntityID        string
	Relation        string
	SubjectEntity   string
	SubjectID       string
	SubjectRelation string
	CommitTime      time.Time
}

RelationTuple -

func (RelationTuple) ToTuple

func (r RelationTuple) ToTuple() *base.Tuple

ToTuple -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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