Documentation
¶
Index ¶
- type ScenarioHandler
- type TechHandler
- type UniHandler
- func (h *UniHandler) GetConfig() *config.UniConfig
- func (h *UniHandler) HandleDELETE(ctx context.Context, req *http.Request) (*http.Response, error)
- func (h *UniHandler) HandleGET(ctx context.Context, req *http.Request) (*http.Response, error)
- func (h *UniHandler) HandleHEAD(ctx context.Context, req *http.Request) (*http.Response, error)
- func (h *UniHandler) HandlePOST(ctx context.Context, req *http.Request) (*http.Response, error)
- func (h *UniHandler) HandlePUT(ctx context.Context, req *http.Request) (*http.Response, error)
- func (h *UniHandler) HandleRequest(ctx context.Context, req *http.Request) (*http.Response, error)
- func (h *UniHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScenarioHandler ¶
type ScenarioHandler struct {
// contains filtered or unexported fields
}
ScenarioHandler handles endpoints for managing scenarios
func NewScenarioHandler ¶
func NewScenarioHandler(scenarioSvc *service.ScenarioService, logger *slog.Logger) *ScenarioHandler
NewScenarioHandler creates a new instance of ScenarioHandler
func (*ScenarioHandler) ServeHTTP ¶
func (h *ScenarioHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface
type TechHandler ¶
type TechHandler struct {
// contains filtered or unexported fields
}
TechHandler handles technical endpoints like health checks and metrics
func NewTechHandler ¶
func NewTechHandler(techSvc *service.TechService, logger *slog.Logger) *TechHandler
NewTechHandler creates a new instance of TechHandler
func (*TechHandler) ServeHTTP ¶
func (h *TechHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface
type UniHandler ¶ added in v0.0.5
type UniHandler struct {
// contains filtered or unexported fields
}
UniHandler provides clear, step-by-step HTTP method handlers
func NewUniHandler ¶ added in v0.0.5
func NewUniHandler( uniService *service.UniService, scenarioService *service.ScenarioService, logger *slog.Logger, cfg *config.UniConfig, ) *UniHandler
NewUniHandler creates a new handler
func (*UniHandler) GetConfig ¶ added in v0.0.5
func (h *UniHandler) GetConfig() *config.UniConfig
GetConfig returns the mock configuration
func (*UniHandler) HandleDELETE ¶ added in v0.0.5
HandleDELETE processes DELETE requests step by step
func (*UniHandler) HandleHEAD ¶ added in v0.0.5
HandleHEAD processes HEAD requests (same as GET but no body)
func (*UniHandler) HandlePOST ¶ added in v0.0.5
HandlePOST processes POST requests step by step
func (*UniHandler) HandleRequest ¶ added in v0.0.5
HandleRequest processes the HTTP request and returns appropriate response
func (*UniHandler) ServeHTTP ¶ added in v0.0.5
func (h *UniHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface