handlers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Config config.Config
}

API holds handler dependencies

func New

func New(cfg config.Config) *API

New creates a new API handler with dependencies

func (*API) ContactHandler

func (a *API) ContactHandler(w http.ResponseWriter, r *http.Request)

ContactHandler processes contact form submissions

func (*API) EmailHandler

func (a *API) EmailHandler(w http.ResponseWriter, r *http.Request)

EmailHandler processes requests to send emails

func (*API) HealthCheck

func (a *API) HealthCheck(w http.ResponseWriter, r *http.Request)

HealthCheck provides a simple health check endpoint

type ContactFormData

type ContactFormData struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Subject string `json:"subject"`
	Message string `json:"message"`
}

ContactFormData represents a contact form submission

type Response

type Response struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

Response represents the API response

Jump to

Keyboard shortcuts

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