Files
at-container-registry/pkg/appview/handlers/install.go
T

32 lines
779 B
Go

package handlers
import (
"net/http"
)
// InstallHandler handles the /install page
type InstallHandler struct {
BaseUIHandler
}
func (h *InstallHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
meta := NewPageMeta(
"Install "+h.ClientShortName+" Credential Helper - "+h.ClientShortName,
"Install the "+h.ClientShortName+" credential helper to push and pull containers using your AT Protocol identity",
).WithCanonical("https://" + h.SiteURL + "/install").
WithSiteName(h.ClientShortName)
data := struct {
PageData
Meta *PageMeta
}{
PageData: NewPageData(r, &h.BaseUIHandler),
Meta: meta,
}
if err := h.Templates.ExecuteTemplate(w, "install", data); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}