Documentation ¶
Index ¶
- type DataReader
- func (r *DataReader) HeadSnapshot(ctx context.Context, tenantID string) (token.SnapToken, error)
- func (r *DataReader) QueryAttributes(ctx context.Context, tenantID string, filter *base.AttributeFilter, ...) (*database.AttributeIterator, error)
- func (r *DataReader) QueryRelationships(ctx context.Context, tenantID string, filter *base.TupleFilter, token string, ...) (*database.TupleIterator, error)
- func (r *DataReader) QuerySingleAttribute(ctx context.Context, tenantID string, filter *base.AttributeFilter, ...) (*base.Attribute, error)
- func (r *DataReader) QueryUniqueSubjectReferences(ctx context.Context, tenantID string, subjectReference *base.RelationReference, ...) (ids []string, ct database.EncodedContinuousToken, err error)
- func (r *DataReader) ReadAttributes(ctx context.Context, tenantID string, filter *base.AttributeFilter, ...) (collection *database.AttributeCollection, ct database.EncodedContinuousToken, ...)
- func (r *DataReader) ReadRelationships(ctx context.Context, tenantID string, filter *base.TupleFilter, token string, ...) (collection *database.TupleCollection, ct database.EncodedContinuousToken, ...)
- type SchemaReader
- func (r *SchemaReader) HeadVersion(ctx context.Context, tenantID string) (version string, err error)
- func (r *SchemaReader) ListSchemas(ctx context.Context, tenantID string, pagination database.Pagination) (schemas []*base.SchemaList, ct database.EncodedContinuousToken, err error)
- func (r *SchemaReader) ReadEntityDefinition(ctx context.Context, tenantID, entityName, version string) (*base.EntityDefinition, string, error)
- func (r *SchemaReader) ReadRuleDefinition(ctx context.Context, tenantID, ruleName, version string) (*base.RuleDefinition, string, error)
- func (r *SchemaReader) ReadSchema(ctx context.Context, tenantID, version string) (*base.SchemaDefinition, error)
- func (r *SchemaReader) ReadSchemaString(ctx context.Context, tenantID, version string) (definitions []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataReader ¶
type DataReader struct {
// contains filtered or unexported fields
}
DataReader - Add singleflight behaviour to data reader
func NewDataReader ¶
func NewDataReader(delegate storage.DataReader) *DataReader
NewDataReader - Add singleflight behaviour to new data reader
func (*DataReader) HeadSnapshot ¶
HeadSnapshot - Reads the latest version of the snapshot from the repository.
func (*DataReader) QueryAttributes ¶
func (r *DataReader) QueryAttributes(ctx context.Context, tenantID string, filter *base.AttributeFilter, token string, pagination database.CursorPagination) (*database.AttributeIterator, error)
QueryAttributes - Reads multiple attributes from the repository.
func (*DataReader) QueryRelationships ¶
func (r *DataReader) QueryRelationships(ctx context.Context, tenantID string, filter *base.TupleFilter, token string, pagination database.CursorPagination) (*database.TupleIterator, error)
QueryRelationships - Reads relation tuples from the repository
func (*DataReader) QuerySingleAttribute ¶
func (r *DataReader) QuerySingleAttribute(ctx context.Context, tenantID string, filter *base.AttributeFilter, token string) (*base.Attribute, error)
QuerySingleAttribute - Reads a single attribute from the repository.
func (*DataReader) QueryUniqueSubjectReferences ¶
func (r *DataReader) QueryUniqueSubjectReferences(ctx context.Context, tenantID string, subjectReference *base.RelationReference, excluded []string, token string, pagination database.Pagination) (ids []string, ct database.EncodedContinuousToken, err error)
QueryUniqueSubjectReferences - Reads unique subject references from the repository with different options.
func (*DataReader) ReadAttributes ¶
func (r *DataReader) ReadAttributes(ctx context.Context, tenantID string, filter *base.AttributeFilter, token string, pagination database.Pagination) (collection *database.AttributeCollection, ct database.EncodedContinuousToken, err error)
ReadAttributes - Reads multiple attributes from the repository with different options.
func (*DataReader) ReadRelationships ¶
func (r *DataReader) ReadRelationships(ctx context.Context, tenantID string, filter *base.TupleFilter, token string, pagination database.Pagination) (collection *database.TupleCollection, ct database.EncodedContinuousToken, err error)
ReadRelationships - Reads relation tuples from the repository with different options.
type SchemaReader ¶
type SchemaReader struct {
// contains filtered or unexported fields
}
SchemaReader - Add singleflight behaviour to schema reader
func NewSchemaReader ¶
func NewSchemaReader(delegate storage.SchemaReader) *SchemaReader
NewSchemaReader - Add singleflight behaviour to new schema reader
func (*SchemaReader) HeadVersion ¶
func (r *SchemaReader) HeadVersion(ctx context.Context, tenantID string) (version string, err error)
HeadVersion - Finds the latest version of the schema.
func (*SchemaReader) ListSchemas ¶ added in v0.7.5
func (r *SchemaReader) ListSchemas(ctx context.Context, tenantID string, pagination database.Pagination) (schemas []*base.SchemaList, ct database.EncodedContinuousToken, err error)
ListSchemas - List all Schemas
func (*SchemaReader) ReadEntityDefinition ¶
func (r *SchemaReader) ReadEntityDefinition(ctx context.Context, tenantID, entityName, version string) (*base.EntityDefinition, string, error)
ReadEntityDefinition - Read entity definition from repository
func (*SchemaReader) ReadRuleDefinition ¶
func (r *SchemaReader) ReadRuleDefinition(ctx context.Context, tenantID, ruleName, version string) (*base.RuleDefinition, string, error)
ReadRuleDefinition - Read rule definition from repository
func (*SchemaReader) ReadSchema ¶
func (r *SchemaReader) ReadSchema(ctx context.Context, tenantID, version string) (*base.SchemaDefinition, error)
ReadSchema returns the schema definition for a specific tenant and version as a structured object.
func (*SchemaReader) ReadSchemaString ¶ added in v0.7.9
func (r *SchemaReader) ReadSchemaString(ctx context.Context, tenantID, version string) (definitions []string, err error)
ReadSchemaString returns the schema definition for a specific tenant and version as a string.