server

package
v0.0.0-...-de8f578 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFirebaseAuthorizationClient

func NewFirebaseAuthorizationClient(app *firebase.App) *auth.Client

NewFirebaseAuthorizationClient creates a new Firebase authorization client

func NewFirebaseClient

func NewFirebaseClient() *firebase.App

NewFirebaseClient creates a new Firebase connection

func NewFirebaseFirestoreClient

func NewFirebaseFirestoreClient(app *firebase.App) *firestore.Client

NewFirebaseFirestoreClient creates a new Firebase realtime database client

func NewRouterWithInject

func NewRouterWithInject(auth *auth.Client, routers ...potato.Router) *mux.Router

NewRouterWithInject creates a new router with inject user middleware

func NewRouterWithTestInject

func NewRouterWithTestInject(auth *auth.Client, routers ...potato.Router) *mux.Router

NewRouterWithTestInject creates a new router with inject testUser middleware

Types

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener is a struct for read firestore snapshots

func NewListener

func NewListener(client *firestore.Client, cache *potato.CacheService) *Listener

NewListener creates a new Listener instance for getting firestore snapshots.

func (*Listener) ListenFirestoreUpdate

func (l *Listener) ListenFirestoreUpdate(collectionName string)

ListenFirestoreUpdate listens specified collection snapshots forever and updates the cache using the snapshot. This method should be called as goroutine.

Jump to

Keyboard shortcuts

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