Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendSchemaWriter ¶
AppendSchemaWriter appends a schema fragment to a spicedb schema
func NewSchemaAppendWriter ¶
func NewSchemaAppendWriter(client *authzed.Client, discard bool) AppendSchemaWriter
type BatchingRelationshipWriter ¶
type BatchingRelationshipWriter struct {
// contains filtered or unexported fields
}
BatchingRelationshipWriter writes in batches of batchSize
func (BatchingRelationshipWriter) Write ¶
func (w BatchingRelationshipWriter) Write(ctx context.Context, updates []*v1.RelationshipUpdate) error
type DiscardingRelationshipWriter ¶
type DiscardingRelationshipWriter struct{}
DiscardingRelationshipWriter does nothing but satisfy RelationshipWriter
func (DiscardingRelationshipWriter) Write ¶
func (w DiscardingRelationshipWriter) Write(ctx context.Context, updates []*v1.RelationshipUpdate) error
type DiscardingSchemaAppendWriter ¶
type DiscardingSchemaAppendWriter struct{}
DiscardingSchemaAppendWriter does nothing but satisfy SchemaAppendWriter
type DryRunSchemaAppendWriter ¶
type DryRunSchemaAppendWriter struct {
// contains filtered or unexported fields
}
DryRunSchemaAppendWriter prints what the schema would have been.
func NewDryRunSchemaAppendWriter ¶
func NewDryRunSchemaAppendWriter(client *authzed.Client) *DryRunSchemaAppendWriter
NewDryRunSchemaAppendWriter constructs a new schema append writer that logs but doesn't write. If client is non-nil, it will attempt to read the existing schema from spicedb; otherwise it will assume the schema is empty.
type LoggingRelationshipWriter ¶
type LoggingRelationshipWriter struct {
// contains filtered or unexported fields
}
LoggingRelationshipWriter will log each write before delegating to an underlying RelationshipWriter
func (LoggingRelationshipWriter) Write ¶
func (w LoggingRelationshipWriter) Write(ctx context.Context, updates []*v1.RelationshipUpdate) error
type RelationshipWriter ¶
type RelationshipWriter interface {
Write(context.Context, []*v1.RelationshipUpdate) error
}
RelationshipWriter writes v1 relationships
func NewBatchingRelationshipWriter ¶
func NewBatchingRelationshipWriter(writer RelationshipWriter, batchSize int) RelationshipWriter
NewBatchingRelationshipWriter will write relationships in batches of size batchSize
func NewDryRunRelationshipWriter ¶
func NewDryRunRelationshipWriter() RelationshipWriter
NewDryRunRelationshipWriter constructs a new relationship writer that logs but doesn't write.
func NewRelationshipWriter ¶
func NewRelationshipWriter(client *authzed.Client) RelationshipWriter
NewRelationshipWriter returns a relationship writer based on the current config. It will configure trace logging if the current log level is trace, and will dry-run if no client is passed.
type StdRelationshipWriter ¶
type StdRelationshipWriter struct {
// contains filtered or unexported fields
}
StdRelationshipWriter writes via an authzed client, no-frills.
func (StdRelationshipWriter) Write ¶
func (w StdRelationshipWriter) Write(ctx context.Context, updates []*v1.RelationshipUpdate) error
type StdSchemaAppendWriter ¶
type StdSchemaAppendWriter struct {
// contains filtered or unexported fields
}
StdSchemaAppendWriter writes via an authzed client, no-frills.
func NewStdSchemaAppendWriter ¶
func NewStdSchemaAppendWriter(client *authzed.Client) *StdSchemaAppendWriter
NewStdSchemaAppendWriter constructs a new schema append writer that logs but doesn't write.