model

package
v1.1.10-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusWaiting  = "waiting"
	StatusReady    = "ready"
	StatusPlaying  = "playing"
	StatusFinished = "finished"
)
View Source
const GameSessionCollection = "game_sessions"
View Source
const UserCollection = "users"

Variables

This section is empty.

Functions

This section is empty.

Types

type GameSession

type GameSession struct {
	ID         primitive.ObjectID `bson:"_id"`
	MapID      string             `bson:"map_id"`
	Status     string             `bson:"status"`
	StartedAt  time.Time          `bson:"started_at"`
	FinishedAt *time.Time         `bson:"finished_at"`
}

type User

type User struct {
	ID        primitive.ObjectID `bson:"_id"`
	Username  string             `bson:"username"`
	Password  string             `bson:"password"`
	Settings  *[]string          `bson:"settings"`
	Cosmetics *[]string          `bson:"cosmetics"`
}

func (*User) CheckPassword

func (u *User) CheckPassword(plain string) bool

func (*User) HashPassword

func (u *User) HashPassword() error

Jump to

Keyboard shortcuts

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