Documentation
¶
Overview ¶
Package hello contains a Cloud Function triggered by a Firestore event.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelloFirestore ¶
func HelloFirestore(ctx context.Context, e FirestoreEvent) error
HelloFirestore is triggered by a change to a Firestore document.
Types ¶
type FirestoreEvent ¶
type FirestoreEvent struct {
OldValue FirestoreValue `json:"oldValue"`
Value FirestoreValue `json:"value"`
UpdateMask struct {
FieldPaths []string `json:"fieldPaths"`
} `json:"updateMask"`
}
FirestoreEvent is the payload of a Firestore event.
type FirestoreValue ¶
type FirestoreValue struct {
CreateTime time.Time `json:"createTime"`
// Fields is the data for this value. The type depends on the format of your
// database. Log the interface{} value and inspect the result to see a JSON
// representation of your database fields.
Fields interface{} `json:"fields"`
Name string `json:"name"`
UpdateTime time.Time `json:"updateTime"`
}
FirestoreValue holds Firestore fields.
Click to show internal directories.
Click to hide internal directories.