Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server struct includes our datastore, router, and logger. All handlers hang off this Server struct to access its components via dependency injection as needed.
func (*Server) CSRFErrorHandler ¶
CSRFErrorHandler is a custom error handler when CSRF tokens come in invalid
func (*Server) LogRequests ¶
LogRequests logs the custom request ID (created in the SPA), URI, and method to the logger.
func (*Server) NewLimiter ¶
NewLimiter sets up tollbooth rate limiter
func (*Server) SetHeaders ¶
SetHeaders sets the CSRF Token for all responses
Click to show internal directories.
Click to hide internal directories.