cloudfunctions

package
v0.0.0-...-07c764f Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProjectID string
	Zone      string
)
View Source
var FirestoreClient *firestore.Client

Functions

func HandleSchedulerFunction

func HandleSchedulerFunction(w http.ResponseWriter, r *http.Request)

Types

type FirestoreEvent

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

type FirestoreValue

type FirestoreValue struct {
	CreateTime time.Time              `json:"createTime"`
	Name       string                 `json:"name"`
	UpdateTime time.Time              `json:"updateTime"`
	Fields     map[string]interface{} `json:"fields"`
}

func (*FirestoreValue) Path

func (f *FirestoreValue) Path() string

func (*FirestoreValue) Unserialize

func (f *FirestoreValue) Unserialize(i interface{}) error

type Logger

type Logger interface {
	Infof(string, ...interface{})
	Warningf(string, ...interface{})
	Errorf(string, ...interface{})
	Sync(context.Context) Logger
}
var (
	DefaultLogger Logger
)

func NewLogger

func NewLogger(name string) Logger

type SchedulerFunction

type SchedulerFunction interface {
	Schedule(context.Context, time.Time, interface{}) (*taskspb.Task, error)
}

func NewSchedulerFunction

func NewSchedulerFunction(key string, callback interface{}) SchedulerFunction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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