handlers

package
v0.0.0-...-354a964 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 3 Imported by: 0

README

handlers

Put all handlers/routes here. To keep everything consise, I would name files in relation to their domain. For example, if you wanted to implement CRUD for a user, you would put all 4 crud operations in a file called user.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is used so that we can dependency inject different services into the database

func New

func New(db *mongo.Database) *Handler

New will create a new handler with the given databse and other dependencies that your routes may need

func (*Handler) Hello

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

Jump to

Keyboard shortcuts

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