app

package
v0.0.0-...-9d5ab40 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Router *mux.Router
	DB     *mongo.Client
}

Type App has a router and DB

func (*App) Delete

func (app *App) Delete(path string, f func(w http.ResponseWriter, r *http.Request))

DELETE method router wrapper

func (*App) Get

func (app *App) Get(path string, f func(w http.ResponseWriter, r *http.Request))

GET Method router wrapper

func (*App) Init

func (app *App) Init()

func (*App) Post

func (app *App) Post(path string, f func(w http.ResponseWriter, r *http.Request))

POST method router wrapper

func (*App) Put

func (app *App) Put(path string, f func(w http.ResponseWriter, r *http.Request))

PUT method router wrapper

func (*App) Run

func (app *App) Run(port string)

Run app on router

type RequestHandlerFunction

type RequestHandlerFunction func(db *mongo.Client, w http.ResponseWriter, r *http.Request)

Function type to pass db instance to handler

Directories

Path Synopsis
services
aws

Jump to

Keyboard shortcuts

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