firestore

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert[T any](snapshot *firestore.DocumentSnapshot) *T

func Delete

func Delete(ref firestore.Query)

func FindMany

func FindMany[T any](ref firestore.Query) []*T

func FindOne

func FindOne[T any](ref firestore.Query) *T

func Get

func Get[T any](r IFirestoreRepository, id string) *T

func NewId

func NewId() string

func Save

func Save[T any](r IFirestoreRepository, id string, data any) *T

Types

type DataAccess

type DataAccess struct {
	Namespace string
	Client    *firestore.Client
	Context   context.Context
}

func GetConnection

func GetConnection() DataAccess

type IFirestoreRepository

type IFirestoreRepository interface {
	Ref() *firestore.CollectionRef
}

Jump to

Keyboard shortcuts

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