model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChesscomArchive

type ChesscomArchive string

func (ChesscomArchive) GetMonth

func (a ChesscomArchive) GetMonth() int

func (ChesscomArchive) GetMonthAsString

func (a ChesscomArchive) GetMonthAsString() string

func (ChesscomArchive) GetPlayerName

func (a ChesscomArchive) GetPlayerName() string

func (ChesscomArchive) GetURL

func (a ChesscomArchive) GetURL() string

func (ChesscomArchive) GetYear

func (a ChesscomArchive) GetYear() int

type ChesscomArchives

type ChesscomArchives struct {
	Archives []ChesscomArchive `json:"archives"`
}

ChesscomArchives represents an array of monthly games archive

type ChesscomGame

type ChesscomGame struct {
	URL        string `json:"url"`
	PGN        string `json:"pgn"`
	EndTime    int64  `json:"end_time"`
	Rated      bool   `json:"rated"`
	Accuracies struct {
		White float64 `json:"white"`
		Black float64 `json:"black"`
	} `json:"accuracies"`
	TCN          string             `json:"tcn"`
	UUID         string             `json:"uuid"`
	InitialSetup string             `json:"initial_setup"`
	FEN          string             `json:"fen"`
	TimeClass    string             `json:"time_class"`
	Rules        string             `json:"rules"`
	White        ChesscomPlayerInfo `json:"white"`
	Black        ChesscomPlayerInfo `json:"black"`
}

type ChesscomGames

type ChesscomGames struct {
	Games []ChesscomGame `json:"games"`
}

type ChesscomPlayerInfo

type ChesscomPlayerInfo struct {
	Rating   int    `json:"rating"`
	Result   string `json:"result"`
	URL      string `json:"@id"`
	Username string `json:"username"`
	UUID     string `json:"uuid"`
}

Jump to

Keyboard shortcuts

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