Documentation ¶
Index ¶
- type BundleReader
- 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)
- type TenantReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleReader ¶
type BundleReader struct {
// contains filtered or unexported fields
}
BundleReader - Add circuit breaker behaviour to bundle reader
func NewBundleReader ¶
func NewBundleReader(delegate storage.BundleReader, cb *gobreaker.CircuitBreaker) *BundleReader
NewBundleReader - Add circuit breaker behaviour to new bundle reader
func (*BundleReader) Read ¶
func (r *BundleReader) Read(ctx context.Context, tenantID, name string) (bundle *base.DataBundle, err error)
Read - Reads bundles from the repository
type DataReader ¶
type DataReader struct {
// contains filtered or unexported fields
}
DataReader - Add circuit breaker behaviour to data reader
func NewDataReader ¶
func NewDataReader(delegate storage.DataReader, cb *gobreaker.CircuitBreaker) *DataReader
NewDataReader - Add circuit breaker 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, 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 circuit breaker behaviour to schema reader
func NewSchemaReader ¶
func NewSchemaReader(delegate storage.SchemaReader, cb *gobreaker.CircuitBreaker) *SchemaReader
NewSchemaReader - Add circuit breaker 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.
type TenantReader ¶
type TenantReader struct {
// contains filtered or unexported fields
}
TenantReader - Add circuit breaker behaviour to tenant reader
func NewTenantReader ¶
func NewTenantReader(delegate storage.TenantReader, cb *gobreaker.CircuitBreaker) *TenantReader
NewTenantReader - Add circuit breaker behaviour to new tenant reader
func (*TenantReader) ListTenants ¶
func (r *TenantReader) ListTenants(ctx context.Context, pagination database.Pagination) (tenants []*base.Tenant, ct database.EncodedContinuousToken, err error)
ListTenants - List tenants from the repository