Documentation
¶
Index ¶
- Variables
- func EncodeFile(e Encoder, vf path.ValidFile) (b []byte, err error)
- func EncodeTo(e Encoder, r io.Reader) (b []byte, err error)
- func ExtensionToType(ext string) (extType string, err error)
- type Bytes
- type CachedFileEncoder
- type Capture
- type CaptureFn
- type Doc
- func (d Doc) Base64Encoder(args ...string) (le LoadEncoder)
- func (d Doc) Date() (s string)
- func (d Doc) DateWithFmt(layout string) (s string)
- func (_ Doc) Indices(stop int) (ind Indices)
- func (_ Doc) NewFileLoader(args ...string) (l Loader)
- func (_ Doc) NewPath(args ...string) (p path.Path)
- func (d Doc) WithTitle(title string) (D Doc)
- type EncodeCache
- type EncodedFiles
- type Encoder
- type ErrorHandler
- type ErrorTemplate
- type ErrorTemplateHandler
- type FileEncoder
- type FuncMap
- type Getter
- type Handler
- type HtmlEncoder
- type HtmlEncoderPlotly
- type Indices
- type Iter
- type LabelIndex
- type LoadEncoder
- type Loader
- type Mode
- type NoEncode
- type NoMatchingClass
- type Path
- type Port
- type Render
- type RenderBuilder
- type Status
- type String
- type StringResult
- type Template
- type TemplateRender
- type TemplateServer
- type TemplateSet
Constants ¶
This section is empty.
Variables ¶
View Source
var Base64 = NewHtmlEncoder(base64.StdEncoding)
View Source
var PlotlyBase64 = NewHtmlPlotlyEncoder(base64.StdEncoding)
Functions ¶
func ExtensionToType ¶
Types ¶
type CachedFileEncoder ¶
type CachedFileEncoder struct {
// contains filtered or unexported fields
}
func (*CachedFileEncoder) EncodeFile ¶
func (c *CachedFileEncoder) EncodeFile(vf path.ValidFile) (s string, err error)
type Doc ¶
type Doc struct { Title string // contains filtered or unexported fields }
func (Doc) Base64Encoder ¶
func (d Doc) Base64Encoder(args ...string) (le LoadEncoder)
func (Doc) DateWithFmt ¶
func (Doc) NewFileLoader ¶
type EncodeCache ¶
type EncodeCache struct {
// contains filtered or unexported fields
}
func NewEncodeCache ¶
func NewEncodeCache() (e EncodeCache)
func (EncodeCache) WithEncoder ¶
func (e EncodeCache) WithEncoder(fe FileEncoder) (cf CachedFileEncoder)
type EncodedFiles ¶
type ErrorHandler ¶
type ErrorHandler interface {
Handle(ctx *fasthttp.RequestCtx)
}
type ErrorTemplate ¶
type ErrorTemplate struct {
// contains filtered or unexported fields
}
func NewErrorTemplate ¶
func NewErrorTemplate(template *jet.Template) (e ErrorTemplate)
func (ErrorTemplate) NewHandler ¶
func (et ErrorTemplate) NewHandler(h Handler) (eh ErrorTemplateHandler)
type ErrorTemplateHandler ¶
type ErrorTemplateHandler struct {
// contains filtered or unexported fields
}
func (ErrorTemplateHandler) Handle ¶
func (e ErrorTemplateHandler) Handle(ctx *fasthttp.RequestCtx)
type FileEncoder ¶
func NoOpEncoder ¶
func NoOpEncoder() (f FileEncoder)
type Handler ¶
type Handler interface {
Handle(*fasthttp.RequestCtx) error
}
type HtmlEncoder ¶
type HtmlEncoder struct {
// contains filtered or unexported fields
}
func NewHtmlEncoder ¶
func NewHtmlEncoder(enc Encoder) (h HtmlEncoder)
func (HtmlEncoder) EncodeFile ¶
func (h HtmlEncoder) EncodeFile(vf path.ValidFile) (s string, err error)
type HtmlEncoderPlotly ¶
type HtmlEncoderPlotly struct {
// contains filtered or unexported fields
}
func NewHtmlPlotlyEncoder ¶
func NewHtmlPlotlyEncoder(enc Encoder) (p HtmlEncoderPlotly)
func (HtmlEncoderPlotly) EncodeFile ¶
func (p HtmlEncoderPlotly) EncodeFile(vf path.ValidFile) (s string, err error)
type LabelIndex ¶
type LabelIndex struct {
// contains filtered or unexported fields
}
func NewLabels ¶
func NewLabels() (li LabelIndex)
func (*LabelIndex) Add ¶
func (li *LabelIndex) Add(key string)
func (*LabelIndex) AddIdx ¶
func (li *LabelIndex) AddIdx(key string, idx int)
func (LabelIndex) Iter ¶
func (li LabelIndex) Iter() (d dict)
type LoadEncoder ¶
type LoadEncoder struct { Loader // contains filtered or unexported fields }
func (LoadEncoder) Encode ¶
func (le LoadEncoder) Encode(args ...string) (str StringResult)
type Loader ¶
type Loader struct { Status // contains filtered or unexported fields }
func (Loader) WithEncoder ¶
func (l Loader) WithEncoder(f FileEncoder) (le LoadEncoder)
type NoMatchingClass ¶
type NoMatchingClass struct {
Extension string
}
func (NoMatchingClass) Error ¶
func (e NoMatchingClass) Error() (s string)
type RenderBuilder ¶
func NewRenderBuilder ¶
func NewRenderBuilder() (r RenderBuilder)
func (RenderBuilder) Build ¶
func (r RenderBuilder) Build() (rr Render)
func (*RenderBuilder) Default ¶
func (r *RenderBuilder) Default()
func (*RenderBuilder) SetCli ¶
func (r *RenderBuilder) SetCli(c *cli.Cli)
type StringResult ¶
type StringResult struct { Status // contains filtered or unexported fields }
func OkString ¶
func OkString(s string) (sr StringResult)
func (StringResult) String ¶
func (str StringResult) String() (s string)
type TemplateRender ¶
type TemplateRender struct {
// contains filtered or unexported fields
}
func (*TemplateRender) Default ¶
func (t *TemplateRender) Default()
func (TemplateRender) Run ¶
func (t TemplateRender) Run() (err error)
func (*TemplateRender) SetCli ¶
func (t *TemplateRender) SetCli(c *cli.Cli)
type TemplateServer ¶
type TemplateServer struct { Port Builder RenderBuilder // contains filtered or unexported fields }
func (*TemplateServer) Default ¶
func (t *TemplateServer) Default()
func (TemplateServer) Run ¶
func (ts TemplateServer) Run() (err error)
func (*TemplateServer) SetCli ¶
func (ts *TemplateServer) SetCli(c *cli.Cli)
type TemplateSet ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.