db

package
v0.0.0-...-f6d6271 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChat

func AddChat(chat Chat) *mongo.InsertOneResult

AddChat adds a chat message to the database

func AddPlayer

func AddPlayer(player Player) *mongo.UpdateResult

AddPlayer adds a player to the database

Types

type Chat

type Chat struct {
	SteamID   int64  `bson:"SteamID"`
	Name      string `bson:"Name"`
	Message   string `bson:"message,omitempty"`
	UpdatedAt int64  `bson:"updatedAt"`
}

Chat document struct

type Player

type Player struct {
	SteamID   int64  `bson:"SteamID"`
	Name      string `bson:"Name"`
	UpdatedAt int64  `bson:"UpdatedAt"`
}

Player document struct

Jump to

Keyboard shortcuts

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