Documentation ¶
Index ¶
- type Extractor
- func (e *Extractor) Extract(ctx context.Context, query model.ExtractorQuery, result any) (error, bool)
- func (e *Extractor) ExtractFromSink(ctx context.Context, query model.ExtractorQuery, result *[]*model.Transformed) (error, bool)
- func (e *Extractor) SendToSource(ctx context.Context, eventData any) (string, error)
- func (e *Extractor) StreamExtract(ctx context.Context, reportEvent model.ProcessEventFunc, err *error, ...)
- type FirestoreClient
- type Loader
- type Query
- type QueryType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
func NewExtractor ¶
func (*Extractor) Extract ¶
func (e *Extractor) Extract(ctx context.Context, query model.ExtractorQuery, result any) (error, bool)
Currently, this function requires the caller to know how to handle Datastore specific storage structures. Instead, for generic repository usage, hiding away Datastore specifics, use ExtractFromSink(). TODO: Add support for q := datastore.NewQuery("Entity").Filter("A =", 12).Limit(1) (added partly in ExtractFromSink())
func (*Extractor) ExtractFromSink ¶
func (e *Extractor) ExtractFromSink(ctx context.Context, query model.ExtractorQuery, result *[]*model.Transformed) (error, bool)
Currently only supporting Sink specs with a single Datastore "table" (kind)
func (*Extractor) SendToSource ¶
func (*Extractor) StreamExtract ¶
type FirestoreClient ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
The Firestore Loader supports arbitrary ingestion of data into Firestore in Datastore mode. It currently does not support auto generated entity IDs, but require entity name syntax to be provided in the GEIST spec.
func (*Loader) StreamLoad ¶
The GEIST Firestore Loader implementation currently only supports a single input Transformed object, TODO: Check if eventSplit transforms causing multiple Transformed, should be supported as input --> Probably NO! TODO: Remove Kind as array and keep single
type Query ¶
type Query struct { Type QueryType Namespace string Kind string EntityName string CompositeKey []model.KeyValueFilter }
CompositeKey works as a SQL 'WHERE key1 = value1 and key2 = value2 ...' for all props in a stream spec with index=true. Due to the simple nature of GEIST GET /streams/.../events?... API, only string values are supported. A more full-fledged query API should be provided by a separate query service, so no need to support complex queries in GEIST.