service

package
v0.0.0-...-47d8757 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfaceInt

func InterfaceInt(i interface{}) (int, error)

func InterfaceMap

func InterfaceMap(i interface{}) map[string]interface{}

func InterfaceSlice

func InterfaceSlice(slice interface{}) []interface{}

borrowed from https://stackoverflow.com/questions/12753805/type-converting-slices-of-interfaces

Types

type Server

type Server struct {
	DB     *sql.DB
	Router *mux.Router
}

func New

func New(db *sql.DB, r *mux.Router) *Server

func (*Server) CreatePlayer

func (s *Server) CreatePlayer(w http.ResponseWriter, r *http.Request)

func (*Server) DeletePlayer

func (s *Server) DeletePlayer(w http.ResponseWriter, r *http.Request)

func (*Server) GetPlayer

func (s *Server) GetPlayer(w http.ResponseWriter, r *http.Request)

func (*Server) GetPlayers

func (s *Server) GetPlayers(w http.ResponseWriter, r *http.Request)

func (*Server) InitializeRoutes

func (s *Server) InitializeRoutes()

func (*Server) SyncPlayers

func (s *Server) SyncPlayers(w http.ResponseWriter, r *http.Request)

func (*Server) UpdatePlayer

func (s *Server) UpdatePlayer(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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