Documentation
¶
Index ¶
- Constants
- func RandomURL(r *http.Request) *url.URL
- func RedirectToRandom(w http.ResponseWriter, r *http.Request)
- func Storage(base string) storage
- type Handler
- func (h Handler) CheckKey(r *http.Request) bool
- func (h *Handler) CheckOrUpdateKeyRequest(r *http.Request) (string, error)
- func (h Handler) DeleteRequest(r *http.Request) error
- func (h *Handler) Handle(w http.ResponseWriter, r *http.Request)
- func (h Handler) ShowIndexForPath(p string) ([]byte, error)
- func (h Handler) ShowRequest(path, defTitle string) ([]byte, time.Time, error)
- func (h Handler) UpdateRequest(r *http.Request) error
- type Index
- type IndexEntry
- type Page
Constants ¶
View Source
const ( StorageDirName = "cache" KeyFileName = "key.bin" ContentFileName = "content" )
View Source
const HelpMsg = "Tab indent, Shift+Tab outdent, Ctrl+B bold, Ctrl+I italic, Ctrl+L insert a link, Ctrl+G insert an image"
Variables ¶
This section is empty.
Functions ¶
func RedirectToRandom ¶
func RedirectToRandom(w http.ResponseWriter, r *http.Request)
Types ¶
type Handler ¶
type Handler struct {
BasePath storage
Assets assets.Map
// contains filtered or unexported fields
}
func (*Handler) CheckOrUpdateKeyRequest ¶
func (Handler) ShowRequest ¶
type Index ¶
type Index struct {
Path string
Files []IndexEntry
}
Click to show internal directories.
Click to hide internal directories.