api

package
v0.0.0-...-c477cf1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(addr string)

Types

type Goal

type Goal struct {
	ID   int `gorm:"column:player_id"`
	Ts   time.Time
	Auto bool
}

type MR

type MR struct {
	Result []MResult `json:"result"`
}

type MResult

type MResult struct {
	Red    int
	Blue   int
	Lineup []game.Player
	Goals  []Goal
}

type OverallResult

type OverallResult struct {
	Matches int
	Goals   int
}

type Scorer

type Scorer struct {
	Total int
	Id    int `gorm:"column:player_id"`
	Games int
}

type Scorers

type Scorers struct {
	Result   []Scorer `json:"result"`
	Position string   `json:"position"`
	Auto     bool     `json:"auto"`
}

type Stat

type Stat struct {
	Id      int
	WinRate float32
	Wins    int
	Losses  int
}

func CalcAndSort

func CalcAndSort(wins map[int]int, defeats map[int]int) []Stat

Jump to

Keyboard shortcuts

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