Documentation
¶
Index ¶
- Variables
- type DummyGetter
- type DummySetter
- type DumpWrite
- type Getter
- type HttpWrite
- type HttpWriter
- type MdView
- func (mdv *MdView) Dump(out, eout io.Writer, req_path string)
- func (mdv *MdView) Handler(w http.ResponseWriter, r *http.Request)
- func (mdv *MdView) ListenAndServe(cc task.Canceller) error
- func (mdv *MdView) MakeEtag(t time.Time) string
- func (mdv *MdView) Serve(cc task.Canceller, lstn net.Listener) error
- func (mdv *MdView) SumTemplate() (*TmplSum, error)
- type MdViewConfig
- type Setter
- type TmplSum
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedSocketType = errors.New("unsupported socket type.")
Functions ¶
This section is empty.
Types ¶
type DummyGetter ¶
type DummyGetter struct{}
func (DummyGetter) Get ¶
func (DummyGetter) Get(string) string
type DummySetter ¶
type DummySetter struct{}
func (DummySetter) Set ¶
func (DummySetter) Set(string, string)
type DumpWrite ¶
type DumpWrite struct {
// contains filtered or unexported fields
}
func (*DumpWrite) WriteHeader ¶
type HttpWrite ¶
type HttpWrite struct {
// contains filtered or unexported fields
}
func NewHttpWriter ¶
func NewHttpWriter(w http.ResponseWriter, r *http.Request) *HttpWrite
func (*HttpWrite) WriteHeader ¶
type HttpWriter ¶
type MdView ¶
type MdView struct {
SystemFS fs.FS
SocketType string
SocketPath string
CacheControl string
UrlTopPath string
UrlLibPath string
DirectoryRedirection bool
DocumentRoot upath.UPath
IndexName string
OriginTmpl *template.Template
HtmlTmpl *template.Template
MainTmplName string
SvgIconPath upath.UPath
Md2Html *md2html.Md2Html
MimeExtTable *mtable.MimeExtTable
MarkdownExt []string
MarkdownConfig *md2html.MdConfig
CustomPageConfig *md2html.CustomPageConfig
PrintPaperMapping *md2html.PrintPaperMapping
ThemeStyle string
PageStyle string
PrintSizeCss string
PrintZoom float32
DirectoryViewMode string
DirectoryViewRoots []upath.UPath
DirectoryViewHidden []*regexp.Regexp
DirectoryViewPathHidden []*regexp.Regexp
TimeStampFormat string
DirViewStamp *dirview.DirViewStamp
TextViewMode string
ConfigModTime time.Time
TemplateTag []byte
SystemHtmlIds []string
}
func NewMdView ¶
func NewMdView(cfg *MdViewConfig) (*MdView, error)
func (*MdView) SumTemplate ¶
type MdViewConfig ¶
type MdViewConfig struct {
SocketType string
SocketPath string
CacheControl string `toml:",omitempty"`
UrlTopPath string `toml:",omitempty"`
UrlLibPath string `toml:",omitempty"`
DirectoryRedirection bool `toml:",omitempty"`
DocumentRoot upath.UPath
IndexName string `toml:",omitempty"`
TmplPaths []upath.UPath
IconPath upath.UPath `toml:",omitempty"`
MainTmpl string `toml:",omitempty"`
MimeExtTable upath.Import[*mtable.MimeExtTable] `toml:",omitempty"`
MarkdownExt []string `toml:",omitempty"`
MarkdownConfig upath.Import[*md2html.MdConfig] `toml:",omitempty"`
CustomPageConfig upath.Import[*md2html.CustomPageConfig] `toml:",omitempty"`
ThemeStyle string `toml:",omitempty"`
PageStyle string `toml:",omitempty"`
DirectoryViewMode string
DirectoryViewRoots []upath.UPath `toml:",omitempty"`
DirectoryViewHidden []string `toml:",omitempty"`
DirectoryViewPathHidden []string `toml:",omitempty"`
TimeStampFormat string `toml:",omitempty"`
TextViewMode string `toml:",omitempty"`
SystemFS fs.FS `toml:"-"`
ModTime time.Time `toml:"-"`
}
func NewMdViewConfig ¶
func NewMdViewConfig(file string) (*MdViewConfig, error)
func NewMdViewConfigFS ¶
func NewMdViewConfigFS(fsys fs.FS, file string) (*MdViewConfig, error)
Click to show internal directories.
Click to hide internal directories.