handler

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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

func (h *UniHandler) HandleDELETE(ctx context.Context, req *http.Request) (*http.Response, error)

HandleDELETE processes DELETE requests step by step

func (*UniHandler) HandleGET added in v0.0.5

func (h *UniHandler) HandleGET(ctx context.Context, req *http.Request) (*http.Response, error)

HandleGET processes GET requests step by step

func (*UniHandler) HandleHEAD added in v0.0.5

func (h *UniHandler) HandleHEAD(ctx context.Context, req *http.Request) (*http.Response, error)

HandleHEAD processes HEAD requests (same as GET but no body)

func (*UniHandler) HandlePOST added in v0.0.5

func (h *UniHandler) HandlePOST(ctx context.Context, req *http.Request) (*http.Response, error)

HandlePOST processes POST requests step by step

func (*UniHandler) HandlePUT added in v0.0.5

func (h *UniHandler) HandlePUT(ctx context.Context, req *http.Request) (*http.Response, error)

HandlePUT processes PUT requests step by step

func (*UniHandler) HandleRequest added in v0.0.5

func (h *UniHandler) HandleRequest(ctx context.Context, req *http.Request) (*http.Response, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL