package
0.0.0-20190418235907-40e102283025
Repository: https://github.com/fab-man/hands-on-dependency-injection-in-go.git
Documentation: pkg.go.dev

# Functions

New will create and initialize the server.
NewGetHandler is the constructor for GetHandler.
NewLister is the constructor for ListHandler.
NewRegisterHandler is the constructor for RegisterHandler.

# Structs

GetHandler is the HTTP handler for the "Get Person" endpoint In this simplified example we are assuming all possible errors are user errors and returning "bad request" HTTP 400 or "not found" HTTP 404 There are some programmer errors possible but hopefully these will be caught in testing.
ListHandler is the HTTP handler for the "List Do people" endpoint In this simplified example we are assuming all possible errors are system errors (HTTP 500).
RegisterHandler is the HTTP handler for the "Register" endpoint In this simplified example we are assuming all possible errors are user errors and returning "bad request" HTTP 400.
Server is the HTTP REST server.

# Interfaces

Config is the config for the REST package.
GetConfig is the config for the Get Handler.
GetModel will load a registrationgo:generate mockery -name=GetModel -case underscore -testonly -inpkg -note @generated.
ListModel will load all registrationsgo:generate mockery -name=ListModel -case underscore -testonly -inpkg -note @generated.
RegisterModel will validate and save a registrationgo:generate mockery -name=RegisterModel -case underscore -testonly -inpkg -note @generated.