firecast

package module
v0.0.0-...-34d305a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 5 Imported by: 0

README

firecast

Cloud Function for broadcasting Firestore events

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broadcast

func Broadcast(
	ctx context.Context,
	e FirestoreEvent,
	documentID string,
	projectID string,
	topicID string,
	operation string) error

Types

type Event

type Event struct {
	DocumentID string
	Operation  string
	Timestamp  time.Time
}

func NewEvent

func NewEvent(
	documentID string,
	operation string,
	timestamp time.Time) *Event

type FirestoreEvent

type FirestoreEvent struct {
	OldValue   firestore.Document `json:"oldValue"`
	Value      firestore.Document `json:"value"`
	UpdateMask struct {
		FieldPaths []string `json:"fieldPaths"`
	} `json:"updateMask"`
}

Jump to

Keyboard shortcuts

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