package
0.0.0-20240609180729-20dcd8867761
Repository: https://github.com/kyleterry/jot.git
Documentation: pkg.go.dev
# Functions
New returns a new instance of a jot Server with the data from the seedFile loaded.
NewMiddleware returns a new Middleware.
WriteError takes an error and writes its text to the http response and sets the status code.
# Constants
CKImageGallery is the key for context that holds the ImageGallery object loaded by middleware.
CKObjectKey is any key that can be used to look up an object from any of the stores.
CKTextFile is the key for context that holds the TextFile object loaded by middleware.
DefaultContentType is the default content type to use in responses that return the jot content.
# Structs
IndexTemplateContext is the data context to render the template with for the index response.
Middleware is a type that allows the wrapping of an http.Handler in middleware functions that will execute each other.
Server listens to a port on an address as a HTTP server and uses gorilla/mux to route requests to HTTP handlers.
# Type aliases
ContextKey prevents key collisions when using the global context.