Documentation
¶
Overview ¶
Package fstore provides general support for Firestore. Its main feature is separate namespaces, to mimic separate databases for different purposes (prod, dev, test, etc.).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode[T any](ds *firestore.DocumentSnapshot) (*T, error)
Decode decodes a DocumentSnapshot into a value of type T.
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
A Namespace is a top-level collection for partitioning a Firestore database into separate segments.
func OpenNamespace ¶
OpenNamespace creates a new Firestore client whose collections will be located in the given namespace.
func (*Namespace) Collection ¶
func (ns *Namespace) Collection(name string) *firestore.CollectionRef
Collection returns a reference to the named collection in the namespace.
Click to show internal directories.
Click to hide internal directories.