Documentation
¶
Overview ¶
Package upper contains a Firestore Cloud Function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeUpperCase ¶
func MakeUpperCase(ctx context.Context, e FirestoreEvent) error
MakeUpperCase is triggered by a change to a Firestore document. It updates the `original` value of the document to upper case.
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 an interface{} value and inspect the result to see a JSON
// representation of your database fields.
Fields MyData `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.