Documentation ¶
Index ¶
- func ConfigAndRunApp(config *config.Config)
- type App
- func (app *App) Delete(path string, endpoint http.HandlerFunc, queries ...string)
- func (app *App) Get(path string, endpoint http.HandlerFunc, queries ...string)
- func (app *App) Initialize(config *config.Config)
- func (app *App) Patch(path string, endpoint http.HandlerFunc, queries ...string)
- func (app *App) Post(path string, endpoint http.HandlerFunc, queries ...string)
- func (app *App) Put(path string, endpoint http.HandlerFunc, queries ...string)
- func (app *App) Run(host string)
- func (app *App) UseMiddleware(middleware mux.MiddlewareFunc)
- type RequestHandlerFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigAndRunApp ¶
ConfigAndRunApp will create and initialize App structure. App factory function.
Types ¶
type App ¶
App has the mongo database and router instances
func (*App) Delete ¶
func (app *App) Delete(path string, endpoint http.HandlerFunc, queries ...string)
Delete will register Delete method for an endpoint
func (*App) Get ¶
func (app *App) Get(path string, endpoint http.HandlerFunc, queries ...string)
Get will register Get method for an endpoint
func (*App) Initialize ¶
Initialize initialize the app with
func (*App) Patch ¶
func (app *App) Patch(path string, endpoint http.HandlerFunc, queries ...string)
Patch will register Patch method for an endpoint
func (*App) Post ¶
func (app *App) Post(path string, endpoint http.HandlerFunc, queries ...string)
Post will register Post method for an endpoint
func (*App) Put ¶
func (app *App) Put(path string, endpoint http.HandlerFunc, queries ...string)
Put will register Put method for an endpoint
func (*App) UseMiddleware ¶
func (app *App) UseMiddleware(middleware mux.MiddlewareFunc)
UseMiddleware will add global middleware in router
type RequestHandlerFunction ¶
RequestHandlerFunction is a custome type that help us to pass db arg to all endpoints
Click to show internal directories.
Click to hide internal directories.