Documentation ¶
Index ¶
- Constants
- func NewFirebase(ctx context.Context, sourceConfig *base.SourceConfig, ...) (base.Driver, error)
- func TestFirebase(sourceConfig *base.SourceConfig) error
- type Firebase
- func (f *Firebase) Close() error
- func (f *Firebase) GetAllAvailableIntervals() ([]*base.TimeInterval, error)
- func (f *Firebase) GetCollectionMetaKey() string
- func (f *Firebase) GetCollectionTable() string
- func (f *Firebase) GetObjectsFor(interval *base.TimeInterval, objectsLoader base.ObjectsLoader) error
- func (f *Firebase) GetRefreshWindow() (time.Duration, error)
- func (f *Firebase) Type() string
- type FirebaseConfig
- type FirestoreParameters
Constants ¶
View Source
const ( FirestoreCollection = "firestore" UsersCollection = "users" )
Variables ¶
This section is empty.
Functions ¶
func NewFirebase ¶
func NewFirebase(ctx context.Context, sourceConfig *base.SourceConfig, collection *base.Collection) (base.Driver, error)
NewFirebase returns configured Firebase driver instance
func TestFirebase ¶
func TestFirebase(sourceConfig *base.SourceConfig) error
TestFirebase tests connection to Firebase without creating Driver instance
Types ¶
type Firebase ¶
type Firebase struct { base.IntervalDriver // contains filtered or unexported fields }
Firebase is a Firebase/Firestore driver. It used in syncing data from Firebase/Firestore
func (*Firebase) GetAllAvailableIntervals ¶
func (f *Firebase) GetAllAvailableIntervals() ([]*base.TimeInterval, error)
func (*Firebase) GetCollectionMetaKey ¶
func (*Firebase) GetCollectionTable ¶
func (*Firebase) GetObjectsFor ¶
func (f *Firebase) GetObjectsFor(interval *base.TimeInterval, objectsLoader base.ObjectsLoader) error
type FirebaseConfig ¶
type FirebaseConfig struct { ProjectID string `mapstructure:"project_id" json:"project_id,omitempty" yaml:"project_id,omitempty"` Credentials string `mapstructure:"key" json:"key,omitempty" yaml:"key,omitempty"` }
FirebaseConfig is a Firebase configuration dto for serialization
func (*FirebaseConfig) Validate ¶
func (fc *FirebaseConfig) Validate() error
Validate returns err if configuration is invalid
type FirestoreParameters ¶
type FirestoreParameters struct {
FirestoreCollection string `mapstructure:"collection" json:"collection,omitempty" yaml:"collection,omitempty"`
}
FirestoreParameters is a Firebase Firestore configuration dto for serialization
func (*FirestoreParameters) Validate ¶
func (fp *FirestoreParameters) Validate() error
Validate returns err if configuration is invalid
Click to show internal directories.
Click to hide internal directories.