21 lines
395 B
Go
21 lines
395 B
Go
package httpapi
|
|
|
|
import "net/http"
|
|
|
|
type HealthResponse struct {
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type EchoRequest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type EchoResponse struct {
|
|
Echoed string `json:"echoed"`
|
|
Len int `json:"len"`
|
|
}
|
|
|
|
func NewHandler() http.Handler {
|
|
panic("TODO: zarejestruj 'GET /health' i 'POST /echo' w http.NewServeMux() oraz dodaj middleware X-Service")
|
|
}
|