gfs

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gfs helps with Google FireStore

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCollection

func DeleteCollection(ctx context.Context, client *firestore.Client,
	ref *firestore.CollectionRef, batchSize int) error

DeleteCollection is used to delete test document collection in firestore

func GetDocWithRetry

func GetDocWithRetry(ctx context.Context,
	firestoreClient *firestore.Client,
	documentPath string,
	maxRetry int,
	retryOnNotFound bool,
	ev glo.EntryValues) (*firestore.DocumentSnapshot, bool)

GetDocWithRetry check if a document exist with retries

func RecordExportWithRetry

func RecordExportWithRetry(ctx context.Context,
	firestoreClient *firestore.Client,
	exportCollectionName string,
	exportName string,
	processed bool,
	maxRetry int,
	ev glo.EntryValues) (err error)

RecordExportWithRetry record and export doc to firestore

Types

type ExportRecord

type ExportRecord struct {
	Processed bool      `firestore:"processed"`
	StepStack glo.Steps `firestore:"stepStack"`
	Timestamp time.Time `firestore:"timestamp"`
}

ExportRecord define export documents in firestore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL