Documentation
¶
Index ¶
- Variables
- func TmplFileType(name string) string
- type CatUiConfig
- type CatUiParam
- type CatUiVar
- type DummyGetter
- type DummySetter
- type DumpWrite
- type Getter
- type HttpWrite
- type HttpWriter
- type Setter
- type TmplOnce
- type TmplView
- func (tmpv *TmplView) CatUi(api_name string) string
- func (tmpv *TmplView) Dump(out, eout io.Writer, req_path string)
- func (tmpv *TmplView) Handler(w http.ResponseWriter, r *http.Request)
- func (tmpv *TmplView) ListenAndServe(cc task.Canceller) error
- func (tmpv *TmplView) MakeEtag(t time.Time, user string) string
- func (tmpv *TmplView) Serve(cc task.Canceller, lstn net.Listener) error
- func (tmpv *TmplView) SumTemplate() ([]byte, error)
- func (tmpv *TmplView) TmplSvgIcon(name string) string
- func (tmpv *TmplView) Warn(format string, v ...interface{})
- func (tmpv *TmplView) WriteTestCatUi(w io.Writer) error
- type TmplViewConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var CatUiIdReg = regexp.MustCompile(`^[a-z0-9_]+$`)
View Source
var DumpPath string = ""
View Source
var ErrUnsupportedSocketType = errors.New("unsupported socket type.")
Functions ¶
func TmplFileType ¶
Types ¶
type CatUiConfig ¶
type CatUiParam ¶
type CatUiParam struct { CatUiConfig Name string }
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 TmplOnce ¶
func NewTmplOnce ¶
func NewTmplOnce() TmplOnce
type TmplView ¶
type TmplView struct { SocketType string SocketPath string SystemFS fs.FS CacheControl string UrlTopPath string UrlLibPath string UserMap *authz.UserMap AuthnUserHeader string OriginTmpl *template.Template DocumentRoot upath.UPath SvgIconPath upath.UPath IndexName string MdTmplName string Md2Html *md2html.Md2Html MimeExtTable *mtable.MimeExtTable MarkdownExt []string MarkdownConfig *md2html.MdConfig ThemeStyle string DirectoryViewMode string DirectoryViewRoots []upath.UPath DirectoryViewHidden []*regexp.Regexp DirectoryViewPathHidden []*regexp.Regexp TimeStampFormat string DirViewStamp *dirview.DirViewStamp TextViewMode string CatUiConfigPath upath.UPath CatUiConfigExt string CatUiTmplName string ConfigModTime time.Time TemplateTag []byte }
func NewTmplView ¶
func NewTmplView(cfg *TmplViewConfig) (*TmplView, error)
func (*TmplView) SumTemplate ¶
func (*TmplView) TmplSvgIcon ¶
type TmplViewConfig ¶
type TmplViewConfig struct { SocketType string SocketPath string CacheControl string `toml:",omitempty"` UrlTopPath string `toml:",omitempty"` UrlLibPath string `toml:",omitempty"` Authz authzConfig Tmpl tmplConfig SystemFS fs.FS `toml:"-"` ModTime time.Time `toml:"-"` }
func NewTmplViewConfig ¶
func NewTmplViewConfig(file string) (*TmplViewConfig, error)
func NewTmplViewConfigFS ¶
func NewTmplViewConfigFS(fsys fs.FS, file string) (*TmplViewConfig, error)
Click to show internal directories.
Click to hide internal directories.