Documentation
¶
Index ¶
- func HtmlMiddleware(ctx *fasthttp.RequestCtx) (bool, error)
- type DefaultErrorHandler
- type Dependencies
- type ErrorHandler
- type MasterViewModel
- type MasterViewModelTypeHinting
- type MiddlewareHandler
- func (m MiddlewareHandler) AddMiddleware(middleware ...func(ctx *fasthttp.RequestCtx) (bool, error)) MiddlewareHandler
- func (m MiddlewareHandler) Handle(ctx *fasthttp.RequestCtx)
- func (m MiddlewareHandler) HandleLimited() fasthttp.RequestHandler
- func (m MiddlewareHandler) SetAfterFinal(after ...func(ctx *fasthttp.RequestCtx) (bool, error)) MiddlewareHandler
- func (m MiddlewareHandler) SetFinal(final func(ctx *fasthttp.RequestCtx)) MiddlewareHandler
- func (m MiddlewareHandler) SetProfiler(profiler Profiler) MiddlewareHandler
- type Module
- type Profiler
- type Server
- type ViewInclude
- type ViewIncludeType
- func (h ViewIncludeType) IsCssBody() bool
- func (h ViewIncludeType) IsCssBodyInline() bool
- func (h ViewIncludeType) IsCssHead() bool
- func (h ViewIncludeType) IsCssHeadInline() bool
- func (h ViewIncludeType) IsJsBody() bool
- func (h ViewIncludeType) IsJsBodyInline() bool
- func (h ViewIncludeType) IsJsHead() bool
- func (h ViewIncludeType) IsJsHeadInline() bool
- func (h ViewIncludeType) IsJsPostBody() bool
- func (h ViewIncludeType) IsJsPostBodyInline() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HtmlMiddleware ¶
func HtmlMiddleware(ctx *fasthttp.RequestCtx) (bool, error)
Types ¶
type DefaultErrorHandler ¶ added in v0.0.2
type DefaultErrorHandler struct{}
func (DefaultErrorHandler) Error ¶ added in v0.0.2
func (d DefaultErrorHandler) Error(e error)
func (DefaultErrorHandler) Recover ¶ added in v0.1.0
func (d DefaultErrorHandler) Recover()
type Dependencies ¶ added in v0.1.0
type Dependencies struct { Port string ErrorHandler ErrorHandler }
type ErrorHandler ¶ added in v0.0.2
type ErrorHandler interface { Error(e error) Recover() }
type MasterViewModel ¶
type MasterViewModel interface { GetViewIncludes() []ViewInclude GetTitle() string GetPageTitle() string GetBodyClasses() string }
todo nav generation
type MasterViewModelTypeHinting ¶
type MasterViewModelTypeHinting struct{}
This is here purely for typehinting in go template files
func (MasterViewModelTypeHinting) GetBodyClasses ¶ added in v0.4.2
func (m MasterViewModelTypeHinting) GetBodyClasses() string
func (MasterViewModelTypeHinting) GetPageTitle ¶ added in v0.4.0
func (m MasterViewModelTypeHinting) GetPageTitle() string
func (MasterViewModelTypeHinting) GetTitle ¶
func (m MasterViewModelTypeHinting) GetTitle() string
func (MasterViewModelTypeHinting) GetViewIncludes ¶
func (m MasterViewModelTypeHinting) GetViewIncludes() []ViewInclude
type MiddlewareHandler ¶
type MiddlewareHandler struct { ErrorHandler ErrorHandler Limiter *config.Limiter // contains filtered or unexported fields }
func (MiddlewareHandler) AddMiddleware ¶
func (m MiddlewareHandler) AddMiddleware(middleware ...func(ctx *fasthttp.RequestCtx) (bool, error)) MiddlewareHandler
func (MiddlewareHandler) Handle ¶
func (m MiddlewareHandler) Handle(ctx *fasthttp.RequestCtx)
func (MiddlewareHandler) HandleLimited ¶ added in v0.3.0
func (m MiddlewareHandler) HandleLimited() fasthttp.RequestHandler
func (MiddlewareHandler) SetAfterFinal ¶ added in v0.1.0
func (m MiddlewareHandler) SetAfterFinal(after ...func(ctx *fasthttp.RequestCtx) (bool, error)) MiddlewareHandler
func (MiddlewareHandler) SetFinal ¶
func (m MiddlewareHandler) SetFinal(final func(ctx *fasthttp.RequestCtx)) MiddlewareHandler
func (MiddlewareHandler) SetProfiler ¶ added in v0.1.0
func (m MiddlewareHandler) SetProfiler(profiler Profiler) MiddlewareHandler
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(dependencies Dependencies, modules ...Module) *Server
type ViewInclude ¶
type ViewIncludeType ¶
type ViewIncludeType string
var ( ViewIncludeType_JsHead ViewIncludeType = "js-head" ViewIncludeType_JsHeadInline ViewIncludeType = "js-head-inline" ViewIncludeType_CssHead ViewIncludeType = "css-head" ViewIncludeType_CssHeadInline ViewIncludeType = "css-head-inline" ViewIncludeType_JsBody ViewIncludeType = "js-body" ViewIncludeType_JsBodyInline ViewIncludeType = "js-body-inline" ViewIncludeType_CssBody ViewIncludeType = "css-body" ViewIncludeType_CssBodyInline ViewIncludeType = "css-body-inline" ViewIncludeType_JsPostBody ViewIncludeType = "js-postBody" ViewIncludeType_JsPostBodyInline ViewIncludeType = "js-postBody-inline" )
func (ViewIncludeType) IsCssBody ¶
func (h ViewIncludeType) IsCssBody() bool
func (ViewIncludeType) IsCssBodyInline ¶
func (h ViewIncludeType) IsCssBodyInline() bool
func (ViewIncludeType) IsCssHead ¶
func (h ViewIncludeType) IsCssHead() bool
func (ViewIncludeType) IsCssHeadInline ¶
func (h ViewIncludeType) IsCssHeadInline() bool
func (ViewIncludeType) IsJsBody ¶
func (h ViewIncludeType) IsJsBody() bool
func (ViewIncludeType) IsJsBodyInline ¶
func (h ViewIncludeType) IsJsBodyInline() bool
func (ViewIncludeType) IsJsHead ¶
func (h ViewIncludeType) IsJsHead() bool
func (ViewIncludeType) IsJsHeadInline ¶
func (h ViewIncludeType) IsJsHeadInline() bool
func (ViewIncludeType) IsJsPostBody ¶
func (h ViewIncludeType) IsJsPostBody() bool
func (ViewIncludeType) IsJsPostBodyInline ¶
func (h ViewIncludeType) IsJsPostBodyInline() bool
Click to show internal directories.
Click to hide internal directories.