Documentation ¶
Index ¶
- type Handler
- func (h *Handler) GetLogger() *slog.Logger
- func (h *Handler) Handle(parentCtx context.Context, req *handler.HandleRequest, ...) error
- func (h *Handler) Name() string
- func (h *Handler) PostHandle(parentCtx context.Context, req *handler.PostHandleRequest, ...) error
- func (h *Handler) PreHandle(parentCtx context.Context, req *handler.HandleRequest, ...) error
- func (h *Handler) SetLogger(logger *slog.Logger)
- func (h *Handler) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { PreHandleFunc func(context.Context, *handler.HandleRequest, handlers.ResponseSender) error HandleFunc func(context.Context, *handler.HandleRequest, handlers.ResponseSender) error PostHandleFunc func(context.Context, *handler.PostHandleRequest, handlers.ResponseSender) error Logger *slog.Logger }
Handler 単体テスト用のスタブハンドラ
func (*Handler) Handle ¶
func (h *Handler) Handle(parentCtx context.Context, req *handler.HandleRequest, sender handlers.ResponseSender) error
func (*Handler) PostHandle ¶
func (h *Handler) PostHandle(parentCtx context.Context, req *handler.PostHandleRequest, sender handlers.ResponseSender) error
func (*Handler) PreHandle ¶
func (h *Handler) PreHandle(parentCtx context.Context, req *handler.HandleRequest, sender handlers.ResponseSender) error
Click to show internal directories.
Click to hide internal directories.