Documentation ¶
Overview ¶
Package handlers contains custom handler functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { // IsTest is a flag to determine if the application is running in test mode and will mock external calls IsTest bool // DBClient to interact with the generated ent schema DBClient *ent.Client // RedisClient to interact with redis RedisClient *redis.Client // Logger provides the zap logger to do logging things from the handlers Logger *zap.SugaredLogger // ReadyChecks is a set of checkFuncs to determine if the application is "ready" upon startup ReadyChecks Checks // SessionConfig to handle sessions SessionConfig *sessions.SessionConfig // AuthMiddleware contains the middleware to be used for authenticated endpoints AuthMiddleware []echo.MiddlewareFunc }
Handler contains configuration options for handlers
func (*Handler) AddReadinessCheck ¶
AddReadinessCheck will accept a function to be ran during calls to /readyz These functions should accept a context and only return an error. When adding a readiness check a name is also provided, this name will be used when returning the state of all the checks
type StatusReply ¶
StatusReply returns server status
Click to show internal directories.
Click to hide internal directories.