firestore

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewSession = func(ctx context.Context, opt config.Firestore) (ISession, error) {
	options := make([]option.ClientOption, 0)
	if opt.EndPoint != "" {
		options = append(options, option.WithEndpoint(opt.EndPoint))
	}
	return newClient(ctx, opt.ProjectID, options...)
}

NewSession method

Functions

This section is empty.

Types

type ISession

type ISession interface {
	Close() error
	Collection(path string) *firestore.CollectionRef
	Doc(path string) *firestore.DocumentRef
	CollectionGroup(collectionID string) *firestore.CollectionGroupRef
	GetAll(ctx context.Context, docRefs []*firestore.DocumentRef) (_ []*firestore.DocumentSnapshot, err error)
	Collections(ctx context.Context) *firestore.CollectionIterator
	Batch() *firestore.WriteBatch
	RunTransaction(ctx context.Context, f func(context.Context, *firestore.Transaction) error, opts ...firestore.TransactionOption) (err error)
}

ISession interface

func NewExtendFirestoreDatabase

func NewExtendFirestoreDatabase(logger *zap.Logger, opt config.Firestore) (ISession, func(), error)

Jump to

Keyboard shortcuts

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