func NewHTTPTransport(ep *Endpoints, logger log.Logger) http.Handler {
	opts := []kithttp.ServerOption{
		kithttp.ServerErrorLogger(log.With(logger, "tag", "http")),
		kithttp.ServerErrorEncoder(encodeHTTPError),
	}
	listPlayersHandler := kithttp.NewServer(
		ep.listPlayersEndpoint,
		decodeHTTPListPlayersRequest,
		encodeHTTPListPlayersResponse,
		opts...,
	)
	getPlayerHandler := kithttp.NewServer(
		ep.getPlayerEndpoint,
		decodeHTTPGetPlayerRequest,
		encodeHTTPGetPlayerResponse,
		opts...,
	)
	createPlayerHandler := kithttp.NewServer(
		ep.savePlayerEndpoint,
		decodeHTTPCreatePlayerRequest,
		encodeHTTPSavePlayerResponse,
		opts...,
	)
	updatePlayerHandler := kithttp.NewServer(
		ep.savePlayerEndpoint,
		decodeHTTPUpdatePlayerRequest,
		encodeHTTPSavePlayerResponse,
		opts...,
	)
	deletePlayerHandler := kithttp.NewServer(
		ep.deletePlayerEndpoint,
		decodeHTTPDeletePlayerRequest,
		encodeHTTPDeletePlayerResponse,
		opts...,
	)
	r := mux.NewRouter()
	r.Handle("/v1/players", listPlayersHandler).Methods("GET")
	r.Handle("/v1/players/{id}", getPlayerHandler).Methods("GET")
	r.Handle("/v1/players", createPlayerHandler).Methods("POST")
	r.Handle("/v1/players/{id}", updatePlayerHandler).Methods("PUT")
	r.Handle("/v1/players/{id}", deletePlayerHandler).Methods("DELETE")
	return accessControl(r)
}
NewHTTPTransport returns a handler for HTTP transport
package players
import (
	"context"
	"encoding/json"
	"errors"
	"net/http"
	"strconv"
	"github.com/go-kit/kit/log"
	kithttp "github.com/go-kit/kit/transport/http"
	"github.com/gorilla/mux"
	"github.com/hoop33/roster/models"
)
var errBadRoute = errors.New("bad route")
var errBadRequest = errors.New("bad request")