db

package
v0.0.0-...-b3031ee Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package db provides functions for reading from and writing to our Redis-based database

Index

Constants

View Source
const (
	// Home is the room that everyone spawns in, otherwise known as town square
	Home RoomType = "home"

	// Plaza is the room where you can get to the coffee shop, arcade, and stadium
	Plaza = "plaza"

	// Nightclub is the club, accessible from town square
	Nightclub = "nightclub"

	// CoffeeShop is the coffee shop, accessible from plaza
	CoffeeShop = "coffee_shop"

	// Nonprofits is the campground with all of the nonprofit tents
	Nonprofits = "nonprofits"

	// Personal is a template for someone's personal room
	Personal = "personal"

	// PlatArea is the area accessible from town square with the two plat sponsor buildings
	PlatArea = "plat_area"

	// LeftField is the left sponsor area
	LeftField = "left_field"

	// RightField is the right sponsor area
	RightField = "right_field"

	// Plat is a plat-tier sponsor's room
	Plat = "plat"

	// Gold is a gold-tier sponsor's room
	Gold = "gold"

	// Silver is a silver-tier sponsor's room
	Silver = "silver"

	// Bronze is a bronze-tier sponsor's room
	Bronze = "bronze"

	// Arena is the hacking arena, accessible from town square
	Arena = "arena"

	// Mall is the clothing store, accessible from town square
	Mall = "mall"

	// MISTI is the room for MISTI, accessible from the plaza
	MISTI = "misti"

	// Auditorium is the room for the stadium, accessible from the plaza
	Auditorium = "auditorium"
)

Variables

This section is empty.

Functions

func CreateRoom

func CreateRoom(id string, roomType RoomType)

func GetIngestID

func GetIngestID() string

func GetInstance

func GetInstance() *redis.Client

func Init

func Init(shouldReset bool)

Init creates the database connection

func ListenForUpdates

func ListenForUpdates(callback func(msg []byte))

func MonitorLeader

func MonitorLeader()

func Publish

func Publish(msg interface{})

Types

type RoomType

type RoomType string

RoomType is an enum representing all possible room templates

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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