db

package module
v0.0.0-...-75dcc22 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Firebase

func Firebase(ctx context.Context) (*firebase.App, error)

Call this function to get/initialise the firebase app

func Firestore

func Firestore(ctx context.Context) (*firestore.Client, error)

Call this function to get a client for the firestore database

func GetServer

func GetServer(ctx context.Context, id string) (types.Server, error)

GetServer reads and returns a server document, given an ID.

func RealtimeDatabase

func RealtimeDatabase(ctx context.Context) (*db.Client, error)

Call this function to get a client for the realtime database

func RemoveServer

func RemoveServer(ctx context.Context, id string) error

RemoveServer removes an instance document from the database, given an ID.

func SetServer

func SetServer(ctx context.Context, id string, server types.Server) (types.Server, error)

SetServer creates and overwrites fields in the server document, given a Server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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