Versions in this module Expand all Collapse all v1 v1.4.0 Jun 22, 2024 Changes in this version + var WithErrorHandler = func(errorHandler ErrorHandlerFunc) Option + var WithHttp2 = func(o *Options) + var WithLog = func(o *Options) + var WithPackageManager = func(packageManager string) SvelteOption + var WithPostcss = func(postcssConfig string) Option + var WithRoot = func(rootFolder string) SvelteOption + var WithTailwind = func(tailwindConfig string) Option + var WithTailwindcss = func(o *SvelteOptions) + func BuildSvelte(inputSvelteFile string, options ...SvelteOption) (string, string, error) type HandlerFunc + func Json(j interface{}) HandlerFunc + func Status(code int) HandlerFunc + func String(str string) HandlerFunc + type Option func(*Options) + type Options struct + type SvelteOption func(*SvelteOptions) + type SvelteOptions struct v1.3.0 Aug 31, 2023 Changes in this version type Config + Log bool type Context + func (c *Context) GetForm(key string) []byte + func (c *Context) Sse(datach chan interface{}, closech chan struct{}, fn func()) error type GoSvelt + func (gs *GoSvelt) Sse(path string, datach chan interface{}, closech chan struct{}, fn func()) + type SseEvent struct + Data string + Name string + type SvelteConfig struct + Pnpm bool + Tailwindcss bool + Typescript bool v1.2.1 Jul 16, 2023 Changes in this version + const CharsetUTF8 + const MAppForm + const MAppJS + const MAppJSON + const MAppJsUTF8 + const MAppJsonUTF8 + const MAppProto + const MAppXML + const MAppXmlUTF8 + const MConnect + const MDelete + const MGet + const MOctStream + const MOptions + const MPost + const MPut + const MTextHTML + const MTextHtmlUTF8 + const MTextPlain + const MTextPlainUTF8 + const MTextXML + const MTextXmlUTF8 + type Config struct + Http2 bool + PostcssCfg string + TailwindcssCfg string + TypeScript bool + type Context struct + Ctx context.Context + func (c *Context) Args() *fasthttp.Args + func (c *Context) Blob(code int, b []byte) error + func (c *Context) CDel(key string) + func (c *Context) CGet(key string) string + func (c *Context) CReset() + func (c *Context) CSet(key, value string) + func (c *Context) Cookie(key string) string + func (c *Context) File(code int, file string, compress ...bool) error + func (c *Context) Html(code int, t string, args ...any) error + func (c *Context) Json(code int, j interface{}) error + func (c *Context) Method() string + func (c *Context) Param(key string) string + func (c *Context) Path() string + func (c *Context) Proto(code int, p proto.Message) error + func (c *Context) Protocol() string + func (c *Context) Redirect(code int, url string) error + func (c *Context) Req() *fasthttp.Request + func (c *Context) Res() *fasthttp.Response + func (c *Context) Secure() bool + func (c *Context) SetCType(ctype string) + func (c *Context) SetCookie(k, v string, expire time.Time) + func (c *Context) SetHeader(key, value string) + func (c *Context) SetStatusCode(code int) + func (c *Context) Text(code int, t string) error + func (c *Context) Write(body []byte) + func (c *Context) Ws(handler websocket.FastHTTPHandler) error + type ErrorHandlerFunc func(c *fasthttp.RequestCtx, err error) + type GoSvelt struct + Config *Config + func New(cfg ...*Config) *GoSvelt + func (gs *GoSvelt) AdvancedSvelte(path, svelteRoot, svelteFile string, fn SvelteHandlerFunc, tailwind ...bool) + func (gs *GoSvelt) Connect(path string, h HandlerFunc) + func (gs *GoSvelt) Delete(path string, h HandlerFunc) + func (gs *GoSvelt) Get(path string, h HandlerFunc) + func (gs *GoSvelt) Middleware(path string, fn MiddlewareFunc) + func (gs *GoSvelt) Options(path string, h HandlerFunc) + func (gs *GoSvelt) Post(path string, h HandlerFunc) + func (gs *GoSvelt) Put(path string, h HandlerFunc) + func (gs *GoSvelt) Start(addr string) + func (gs *GoSvelt) StartTLS(addr, cert, key string) + func (gs *GoSvelt) Static(path, file string) + func (gs *GoSvelt) Svelte(path, svelteFile string, fn SvelteHandlerFunc, tailwind ...bool) + func (gs *GoSvelt) SvelteMiddleware(path string, fn SvelteMiddlewareFunc) + type HandlerFunc func(c *Context) error + type Map map[string]interface + func (m Map) Add(key string, value interface{}) + func (m Map) Del(key string) + func (m Map) Get(key string) interface{} + type MiddlewareFunc func(next HandlerFunc) HandlerFunc + type SvelteHandlerFunc func(c *Context, svelte Map) error + type SvelteMiddlewareFunc func(next SvelteHandlerFunc) SvelteHandlerFunc