Documentation ¶
Index ¶
- func Error(w http.ResponseWriter, r *http.Request, err error)
- func ErrorStatusCode(code string) int
- func ListenAndServeTLSRedirect(domain string) error
- type ErrorResponse
- type Server
- func (s *Server) Close() error
- func (s *Server) HandleAstroRebuild(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleHugoRebuild(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleSystemCommit(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleSystemVersion(w http.ResponseWriter, r *http.Request)
- func (s *Server) Open() error
- func (s *Server) Port() int
- func (s *Server) Scheme() string
- func (s *Server) URL() string
- func (s *Server) UseTLS() bool
- type StrapiToAstroHandler
- type StrapiToHugoHandler
- type SystemResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(w http.ResponseWriter, r *http.Request, err error)
Error prints, and optionally logs, an error message.
func ErrorStatusCode ¶
func ListenAndServeTLSRedirect ¶
ListenAndServeTLSRedirect runs an HTTP server on port 80 to redirect users to the TLS-enabled port 443 server.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type Server ¶
type Server struct { Config midas.Config SiteServices map[string]func(site midas.Site) (midas.SiteService, error) // contains filtered or unexported fields }
func (*Server) HandleAstroRebuild ¶ added in v1.3.0
func (s *Server) HandleAstroRebuild(w http.ResponseWriter, r *http.Request)
func (*Server) HandleHugoRebuild ¶
func (s *Server) HandleHugoRebuild(w http.ResponseWriter, r *http.Request)
func (*Server) HandleSystemCommit ¶
func (s *Server) HandleSystemCommit(w http.ResponseWriter, r *http.Request)
func (*Server) HandleSystemVersion ¶
func (s *Server) HandleSystemVersion(w http.ResponseWriter, r *http.Request)
type StrapiToAstroHandler ¶ added in v1.3.0
type StrapiToAstroHandler struct { AstroSite midas.SiteService Payload midas.Payload // contains filtered or unexported fields }
func (StrapiToAstroHandler) Handle ¶ added in v1.3.0
func (h StrapiToAstroHandler) Handle(w http.ResponseWriter, r *http.Request)
type StrapiToHugoHandler ¶
type StrapiToHugoHandler struct { HugoSite midas.SiteService Payload midas.Payload // contains filtered or unexported fields }
func (StrapiToHugoHandler) Handle ¶
func (h StrapiToHugoHandler) Handle(w http.ResponseWriter, r *http.Request)
type SystemResponse ¶
type SystemResponse struct {
Data string `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.