Documentation ¶
Index ¶
- Variables
- type EntityConfigRepository
- func (r *EntityConfigRepository) All(ctx context.Context, version string) ([]repositories.EntityConfig, error)
- func (r *EntityConfigRepository) Migrate() (err error)
- func (r *EntityConfigRepository) Read(ctx context.Context, name string, version string) (repositories.EntityConfig, error)
- func (r *EntityConfigRepository) Write(ctx context.Context, configs []repositories.EntityConfig, version string) error
- type RelationTupleRepository
- func (r *RelationTupleRepository) Delete(ctx context.Context, iterator tuple.ITupleIterator) error
- func (r *RelationTupleRepository) Migrate() (err error)
- func (r *RelationTupleRepository) QueryTuples(ctx context.Context, entity string, objectID string, relation string) (tuple.ITupleIterator, error)
- func (r *RelationTupleRepository) Read(ctx context.Context, filter *base.TupleFilter) (tuple.ITupleCollection, error)
- func (r *RelationTupleRepository) ReverseQueryTuples(ctx context.Context, entity string, relation string, subjectEntity string, ...) (tuple.ITupleIterator, error)
- func (r *RelationTupleRepository) Write(ctx context.Context, iterator tuple.ITupleIterator) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema = &memdb.DBSchema{ Tables: map[string]*memdb.TableSchema{ "entity_config": { Name: "entity_config", Indexes: map[string]*memdb.IndexSchema{ "id": { Name: "id", Unique: true, Indexer: &memdb.CompoundIndex{ Indexes: []memdb.Indexer{ &memdb.StringFieldIndex{Field: "Entity"}, &memdb.StringFieldIndex{Field: "Version"}, }, }, }, "version": { Name: "version", Unique: false, Indexer: &memdb.StringFieldIndex{Field: "Version"}, }, }, }, "relation_tuple": { Name: "relation_tuple", Indexes: map[string]*memdb.IndexSchema{ "id": { Name: "id", Unique: true, Indexer: &memdb.CompoundIndex{ Indexes: []memdb.Indexer{ &memdb.StringFieldIndex{Field: "Entity"}, &memdb.StringFieldIndex{Field: "EntityID"}, &memdb.StringFieldIndex{Field: "Relation"}, &memdb.StringFieldIndex{Field: "SubjectEntity"}, &memdb.StringFieldIndex{Field: "SubjectID"}, &memdb.StringFieldIndex{Field: "SubjectRelation"}, }, AllowMissing: true, }, }, "entity-index": { Name: "entity-index", Unique: false, Indexer: &memdb.CompoundIndex{ Indexes: []memdb.Indexer{ &memdb.StringFieldIndex{Field: "Entity"}, &memdb.StringFieldIndex{Field: "EntityID"}, &memdb.StringFieldIndex{Field: "Relation"}, }, }, }, "subject-index": { Name: "subject-index", Unique: false, Indexer: &memdb.CompoundIndex{ Indexes: []memdb.Indexer{ &memdb.StringFieldIndex{Field: "Entity"}, &memdb.StringFieldIndex{Field: "Relation"}, &memdb.StringFieldIndex{Field: "SubjectEntity"}, }, }, }, "entity": { Name: "entity", Unique: false, Indexer: &memdb.CompoundIndex{ Indexes: []memdb.Indexer{ &memdb.StringFieldIndex{Field: "Entity"}, }, }, }, }, }, }, }
Functions ¶
This section is empty.
Types ¶
type EntityConfigRepository ¶
EntityConfigRepository -.
func NewEntityConfigRepository ¶
func NewEntityConfigRepository(mm *db.Memory) *EntityConfigRepository
NewEntityConfigRepository -.
func (*EntityConfigRepository) All ¶
func (r *EntityConfigRepository) All(ctx context.Context, version string) ([]repositories.EntityConfig, error)
All -
func (*EntityConfigRepository) Migrate ¶
func (r *EntityConfigRepository) Migrate() (err error)
Migrate -
func (*EntityConfigRepository) Read ¶
func (r *EntityConfigRepository) Read(ctx context.Context, name string, version string) (repositories.EntityConfig, error)
Read -
func (*EntityConfigRepository) Write ¶
func (r *EntityConfigRepository) Write(ctx context.Context, configs []repositories.EntityConfig, version string) error
Write -
type RelationTupleRepository ¶
RelationTupleRepository -.
func NewRelationTupleRepository ¶
func NewRelationTupleRepository(mm *db.Memory) *RelationTupleRepository
NewRelationTupleRepository -.
func (*RelationTupleRepository) Delete ¶
func (r *RelationTupleRepository) Delete(ctx context.Context, iterator tuple.ITupleIterator) error
Delete -
func (*RelationTupleRepository) Migrate ¶
func (r *RelationTupleRepository) Migrate() (err error)
Migrate -
func (*RelationTupleRepository) QueryTuples ¶
func (r *RelationTupleRepository) QueryTuples(ctx context.Context, entity string, objectID string, relation string) (tuple.ITupleIterator, error)
QueryTuples -
func (*RelationTupleRepository) Read ¶
func (r *RelationTupleRepository) Read(ctx context.Context, filter *base.TupleFilter) (tuple.ITupleCollection, error)
Read -
func (*RelationTupleRepository) ReverseQueryTuples ¶
func (r *RelationTupleRepository) ReverseQueryTuples(ctx context.Context, entity string, relation string, subjectEntity string, subjectIDs []string, subjectRelation string) (tuple.ITupleIterator, error)
ReverseQueryTuples -
func (*RelationTupleRepository) Write ¶
func (r *RelationTupleRepository) Write(ctx context.Context, iterator tuple.ITupleIterator) error
Write -
Click to show internal directories.
Click to hide internal directories.