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: 0

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