block-accounting/backend/internal/interface/rest/controllers/ping.go

27 lines
431 B
Go
Raw Normal View History

2024-05-24 17:44:24 +00:00
package controllers
import (
"log/slog"
"net/http"
)
type PingController interface {
Ping(w http.ResponseWriter, req *http.Request) ([]byte, error)
}
type pingController struct {
log *slog.Logger
}
func NewPingController(
log *slog.Logger,
) PingController {
return &pingController{
log: log,
}
}
func (c *pingController) Ping(w http.ResponseWriter, req *http.Request) ([]byte, error) {
return []byte("pong"), nil
}