handler

package
v0.0.0-...-618d00e Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func (h *Handler) CreateContact(c echo.Context) (err error)

CreateContact creates a contact in Sampark

func (*Handler) DeleteContactByID

func (h *Handler) DeleteContactByID(c echo.Context) (err error)

DeleteContactByID fetches a single contact by id from database

func (*Handler) FetchContacts

func (h *Handler) FetchContacts(c echo.Context) (err error)

FetchContacts fetches a list of contacts from the database

func (*Handler) GetContactByID

func (h *Handler) GetContactByID(c echo.Context) (err error)

GetContactByID fetches a single contact by id from database

func (*Handler) Health

func (h *Handler) Health(c echo.Context) (err error)

Health checks health of the API

func (*Handler) UpdateContactByID

func (h *Handler) UpdateContactByID(c echo.Context) (err error)

UpdateContactByID fetches a single contact by id from database

Jump to

Keyboard shortcuts

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