# README
functions
Utilities and helpers for apps running in Google Cloud Functions.
Install
go get github.com/altipla-consulting/functions
Usage
Receive a Firestore Event:
package foo
import (
"context"
"fmt"
"github.com/altipla-consulting/functions"
)
func Entrypoint(ctx context.Context, event *functions.FirestoreEvent) error {
fmt.Printf("%#v\n", event.OldValue)
fmt.Printf("%#v\n", event.Value)
return nil
}
Contributing
You can make pull requests or create issues in GitHub. Any code you send should be formatted using make gofmt
.
Running tests
Run the tests:
make test
License
# Structs
FirestoreEvent is received as an argument in functions invoked by Firestore events.
# Type aliases
Document wraps the native Firestore document to help with the JSON unmarshal in Cloud Functions.