firectx

package module
v0.0.0-...-35f3ace Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 2 Imported by: 0

README

firectx

firectx unifies the firestore transaction and the normal api call with context.Context.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collection

func Collection(ctx context.Context, path string) *firestore.CollectionRef

func Create

func Create(ctx context.Context, dr *firestore.DocumentRef, data interface{}) error

func Delete

func FirestoreClient

func FirestoreClient(ctx context.Context) *firestore.Client

func RunTransaction

func RunTransaction(ctx context.Context, f func(ctx context.Context) error) error

func Set

func Set(ctx context.Context, dr *firestore.DocumentRef, data interface{}, opts ...firestore.SetOption) error

func Update

func WithFirestoreClient

func WithFirestoreClient(ctx context.Context, c *firestore.Client) context.Context

WithFirestoreClient must be called before using Firestore client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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