Documentation ¶
Index ¶
- type Handler
- func (h *Handler) CreateContact(c echo.Context) (err error)
- func (h *Handler) DeleteContactByID(c echo.Context) (err error)
- func (h *Handler) FetchContacts(c echo.Context) (err error)
- func (h *Handler) GetContactByID(c echo.Context) (err error)
- func (h *Handler) Health(c echo.Context) (err error)
- func (h *Handler) UpdateContactByID(c echo.Context) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
DB *mgo.Session
}
Handler encapsulates database connection for API handlers
func (*Handler) CreateContact ¶
CreateContact creates a contact in Sampark
func (*Handler) DeleteContactByID ¶
DeleteContactByID fetches a single contact by id from database
func (*Handler) FetchContacts ¶
FetchContacts fetches a list of contacts from the database
func (*Handler) GetContactByID ¶
GetContactByID fetches a single contact by id from database
Click to show internal directories.
Click to hide internal directories.