Categorygithub.com/altipla-consulting/functions
modulepackage
0.1.0
Repository: https://github.com/altipla-consulting/functions.git
Documentation: pkg.go.dev

# 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

MIT 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.