objects

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Row   int    `json:"row" bson:"row, omitempty"`
	Col   int    `json:"col" bson:"col, omitempty"`
	Mines int    `json:"mines" bson:"mines, omitempty"`
	Type  string `json:"name" bson:"name, omitempty"`
}

Definition of the configuration object.

type Game

type Game struct {
	Player   User    `json:"player" bson:"player, omitempty"`
	Conf     Config  `json:"config" bson:"config, omitempty"`
	Times    []Range `json:"times" bson:"times, omitempty"`
	Score    int     `json:"score" bson:"score, omitempty"`
	Won      bool    `json:"won" bson:"won, omitempty"`
	Finished bool    `json:"finished" bson:"finished, omitempty"`
}

Definition of the game object.

type Range

type Range struct {
	Start time.Time `json:"start" bson:"start, omitempty"`
	End   time.Time `json:"end" bson:"end, omitempty"`
}

Definition of the time range object.

type Request

type Request struct {
	Match Game
	Token string
}

Definition of the request for the kafka puublish.

type User

type User struct {
	Id       string `json:"id" bson:"_id"`
	Username string `json:"username" bson:"username"`
	Name     string `json:"name" bson:"name"`
	Rating   int    `json:"rating" bson:"rating"`
}

Definition of the user object.

Jump to

Keyboard shortcuts

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