Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database interface {
// contains filtered or unexported methods
}
Database is an interface for retrieving Events
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) Create ¶
func (h *Handler) Create(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Create constructs a new event from the data in the POST body
func (*Handler) Index ¶
func (h *Handler) Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
Index returns a JSON array of all events
func (*Handler) Show ¶
func (h *Handler) Show(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Show returns the data for a specific event as JSON
type PgDatabase ¶
type PgDatabase struct{}
PgDatabase is a structure that implements the Database interface and interacts with Postgres db
Click to show internal directories.
Click to hide internal directories.