Documentation ¶
Index ¶
- Variables
- type ArticleMeta
- type HeadLevel
- type Wiki
- func (wiki *Wiki) ExtractMeta(v *ArticleMeta, file []byte) ([]byte, error)
- func (wiki *Wiki) GetSource(w http.ResponseWriter, r *http.Request)
- func (wiki *Wiki) HandleEdit(w http.ResponseWriter, r *http.Request)
- func (wiki *Wiki) ReadMarkdown(name string) []byte
- func (wiki *Wiki) RenderMarkdown(w http.ResponseWriter, r *http.Request)
- func (wiki *Wiki) Router() chi.Router
- func (wiki *Wiki) WikiEditor(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var ArticleTemplate = `` /* 3822-byte string literal not displayed */
ArticleTemplate is the default template for articles
View Source
var EditorTemplate = `` /* 1477-byte string literal not displayed */
EditorTemplate is the default template for the wiki editor
Functions ¶
This section is empty.
Types ¶
type ArticleMeta ¶
type ArticleMeta struct { Title string `yml:"title"` LastEdit string `yml:"lastEditedAt"` LastEditor string `yml:"lastEditedBy"` }
ArticleMeta specifies all stuff
type Wiki ¶
type Wiki struct {
// contains filtered or unexported fields
}
Wiki is an instance for the wiki element
func (*Wiki) ExtractMeta ¶
func (wiki *Wiki) ExtractMeta(v *ArticleMeta, file []byte) ([]byte, error)
ExtractMeta gives the meta information from a byte slice
func (*Wiki) GetSource ¶
func (wiki *Wiki) GetSource(w http.ResponseWriter, r *http.Request)
GetSource returns the source for an article
func (*Wiki) HandleEdit ¶
func (wiki *Wiki) HandleEdit(w http.ResponseWriter, r *http.Request)
HandleEdit handles an edit
func (*Wiki) ReadMarkdown ¶
ReadMarkdown reads the markdown file for an article
func (*Wiki) RenderMarkdown ¶
func (wiki *Wiki) RenderMarkdown(w http.ResponseWriter, r *http.Request)
RenderMarkdown renders the markdown of the article
func (*Wiki) Router ¶
func (wiki *Wiki) Router() chi.Router
Router returns a valid router for the wiki module
func (*Wiki) WikiEditor ¶
func (wiki *Wiki) WikiEditor(w http.ResponseWriter, r *http.Request)
WikiEditor renders the editor view
Click to show internal directories.
Click to hide internal directories.