Documentation ¶
Index ¶
- func AddPlayer(db *sql.DB) http.HandlerFunc
- func DeletePlayer(db *sql.DB) http.HandlerFunc
- func GetAllPlayer(db *sql.DB) http.HandlerFunc
- func GetSpecificPlayer(db *sql.DB) http.HandlerFunc
- func HandlePlayerImage(db *sql.DB) http.HandlerFunc
- func UpdatePlayer(db *sql.DB) http.HandlerFunc
- type Image
- type Player
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllPlayer ¶
func GetAllPlayer(db *sql.DB) http.HandlerFunc
GetAllPlayer will return all player
func GetSpecificPlayer ¶
func GetSpecificPlayer(db *sql.DB) http.HandlerFunc
GetSpecificPlayer will return a specific player by id
func HandlePlayerImage ¶
func HandlePlayerImage(db *sql.DB) http.HandlerFunc
HandlePlayerImage will handle the upload of an player Image
func UpdatePlayer ¶
func UpdatePlayer(db *sql.DB) http.HandlerFunc
UpdatePlayer will update player details
Types ¶
type Image ¶
type Image struct {
B64 string `json:"b64"`
}
Image holds the b64 string from a uploaded avatar
type Player ¶
type Player struct { UID string Name string Nickname string Image string ThrowRounds []throw.Round TotalThrowCount int Score score.BaseScore LastThrows []throw.Throw ThrowSum int Average float64 }
Player holds all the players information
Click to show internal directories.
Click to hide internal directories.