mirror of https://github.com/containrrr/watchtower
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
331 B
Go
15 lines
331 B
Go
package api
|
|
|
|
import (
|
|
"github.com/containrrr/watchtower/pkg/session"
|
|
"net/http"
|
|
)
|
|
|
|
func ReportEndpoint(reportPtr **session.Report) (path string, handler http.HandlerFunc) {
|
|
path = "/v1/report"
|
|
handler = func(writer http.ResponseWriter, request *http.Request) {
|
|
WriteJsonOrError(writer, *reportPtr)
|
|
}
|
|
return path, handler
|
|
}
|