Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileServer ¶
func FileServer(r chi.Router, path string, root http.FileSystem, assetDir string)
FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.
func ServerError ¶
func ServerError(w http.ResponseWriter, err error)
ServerError logs the given error before responding to the request with an Internal Server error. TODO consider taking an error code and (optional) message, which can be conveyed to client, ie.:
"Error code: xyz. If the problem persist, please inform system administrator with references to the error code."
Types ¶
type Server ¶
type Server struct { // Addr is the bind address for the tcp listener. Addr string // Default language Lang language.Tag // contains filtered or unexported fields }
Server represents the HTTP server responsible for serving Sirkulators admin interface.
func NewServer ¶
NewServer returns a new Server with the given database and index and assets settings.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.