handlers

package
v0.0.0-...-1beb280 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntityByIDRoute

func GetEntityByIDRoute(c RequestContext, qe queries.QueryExecutor, collectionName string)

GetEntityByIDRoute handles a GET for a specific entity by id (example: GET /users/:id)

Types

type RequestContext

type RequestContext interface {
	ShouldBindUri(obj interface{}) error
	JSON(code int, obj interface{})
}

RequestContext abstracts the gin.Context through an interface to simplify mocking for unit tests

Jump to

Keyboard shortcuts

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