jsonhandler

package
v0.0.0-...-0b081c6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlayerStorage

type PlayerStorage struct {
	Players []store.Player
	// contains filtered or unexported fields
}

func NewPlayerStorage

func NewPlayerStorage() *PlayerStorage

func (*PlayerStorage) AddPlayer

func (ps *PlayerStorage) AddPlayer(name string) error

func (*PlayerStorage) Backup

func (ps *PlayerStorage) Backup(timeMult int, jsonI2 string, jsonI3 string, jsonI4 string)

Make backups of the json file in 3 other files

func (*PlayerStorage) FormatPlayers_old

func (ps *PlayerStorage) FormatPlayers_old(format string) (string, error)

func (*PlayerStorage) GetAllPlayers

func (ps *PlayerStorage) GetAllPlayers() ([]store.Player, error)

func (*PlayerStorage) GetPlayer

func (ps *PlayerStorage) GetPlayer(name string) (store.Player, error)

func (*PlayerStorage) IncWins

func (ps *PlayerStorage) IncWins(name string) (int, error)

func (*PlayerStorage) InitJSON

func (ps *PlayerStorage) InitJSON(jsonI string) error

func (*PlayerStorage) RemovePlayer

func (ps *PlayerStorage) RemovePlayer(name string) error

func (*PlayerStorage) SaveJSON

func (ps *PlayerStorage) SaveJSON(jsonI string) error

Jump to

Keyboard shortcuts

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