firestore

package
v0.0.0-...-d61ab6c Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client[T any] interface {
	// GetDocument retrieves a document at the given path.
	GetDocument(ctx context.Context, path string) (*T, error)

	// SetDocument creates a document in the given collection at the given path with the given data.
	SetDocument(ctx context.Context, path string, data *T) error
}

Client is an interface wrapping the Firebase Admin SDK for our usage of firestore. It does not use a fluent API to make mocking easier.

func NewClient

func NewClient[T any](store *firestore.Client, collection string) Client[T]

NewClient returns a new Client wrapping the given firestore.Client for querying the given collection.

Jump to

Keyboard shortcuts

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