Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetUpMiddleware ¶
SetUpMiddleware contains the middleware that applies to every request. Reference middlewares here --> https://github.com/urfave/negroni#logger and here --> https://github.com/go-chi/chi The Google example here should be used as an additional base element for the architecture: https://blog.golang.org/context
func SetupAuth ¶
SetupAuth - Will enable authentication middleware if appropriate environment variables are set. For now, will always setup and will add future flags when needed to support on/off + diff authentication styles The assumption for all users as that this will setup the auth only, the determination of correct level of auth will be determined by the api functions themselves
func SetupCORS ¶
SetupCORS - Eables CORS Middleware. Presently usurping all Options requests (TODO: Future Optional)
func SetupErrorHandler ¶
SetupErrorHandler - Will setup last resort error handler For now, will always setup and will add future flags when needed to support on/off For now I am not writing a speific http response here but that may be the right thing to do eventually. Preference is these are all exception to rule so no need The assumption is this is the last middleware to be called to enable the most available context to be available for error logging separately
Types ¶
This section is empty.