Documentation
¶
Index ¶
- type CloudContext
- type CloudFunction
- type CloudHandler
- type Context
- func (c *Context) Bytes(statusCode int, data []byte, contentType string) error
- func (c *Context) ClientIP() string
- func (c *Context) Cookie(name string) (*http.Cookie, error)
- func (c *Context) DB() (*Database, error)
- func (c *Context) File(filePath string) error
- func (c *Context) FormFile(field string) (multipart.File, error)
- func (c *Context) HTML(statusCode int, html string) error
- func (c *Context) Header(key string) string
- func (c *Context) JSON(statusCode int, v any) error
- func (c *Context) Param(key string) string
- func (c *Context) ParseForm(v any) error
- func (c *Context) ParseJSON(v any) error
- func (c *Context) ParseMultipartForm(v any, maxMemory int64) error
- func (c *Context) ParseQuery(v any) error
- func (c *Context) ParseXML(v any) error
- func (c *Context) Query(key string) string
- func (c *Context) Redirect(statusCode int, url string) error
- func (c *Context) Request() *http.Request
- func (c *Context) Response() http.ResponseWriter
- func (c *Context) SetCookie(cookie *http.Cookie)
- func (c *Context) SetHeader(key, value string)
- func (c *Context) SetValue(key ContextKey, value any)
- func (c *Context) Status(statusCode int)
- func (c *Context) Text(statusCode int, message string) error
- func (c *Context) UserAgent() string
- func (c *Context) Value(key ContextKey) any
- func (c *Context) WebsocketManager() (*WebsocketManager, error)
- type ContextKey
- type Dart
- func (d *Dart) DB() (*Database, error)
- func (d *Dart) DELETE(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) GET(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) Group(prefix string) *Group
- func (d *Dart) HEAD(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) OPTIONS(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) PATCH(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) POST(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) PUT(path string, h Handler, middlewares ...Middleware)
- func (d *Dart) ScheduleCloudFunction(spec string, cf *CloudFunction)
- func (d *Dart) SetErrorHandler(errorHandler ErrorHandler)
- func (d *Dart) Start(listenAddr string) error
- func (d *Dart) StartTLS(listenAddr, certFile, keyFile string) error
- func (d *Dart) Static(prefix, root string, middlewares ...Middleware)
- func (d *Dart) Use(middlewares ...Middleware)
- func (d *Dart) Websocket(path string, middlewares ...Middleware)
- func (d *Dart) WithCloudFunctions()
- func (d *Dart) WithMySQLDatabase(cfg MySQLConfig)
- func (d *Dart) WithPostgreSQLDatabase(cfg PostgreSQLConfig)
- func (d *Dart) WithSQLiteDatabase(cfg SQLiteConfig)
- func (d *Dart) WithWebsocketManager()
- type Database
- type ErrorHandler
- type Group
- func (g *Group) DELETE(path string, h Handler, middlewares ...Middleware)
- func (g *Group) GET(path string, h Handler, middlewares ...Middleware)
- func (g *Group) Group(prefix string) *Group
- func (g *Group) HEAD(path string, h Handler, middlewares ...Middleware)
- func (g *Group) OPTIONS(path string, h Handler, middlewares ...Middleware)
- func (g *Group) PATCH(path string, h Handler, middlewares ...Middleware)
- func (g *Group) POST(path string, h Handler, middlewares ...Middleware)
- func (g *Group) PUT(path string, h Handler, middlewares ...Middleware)
- func (g *Group) Static(prefix, root string, middlewares ...Middleware)
- func (g *Group) Use(middlewares ...Middleware)
- type Handler
- type Json
- type Middleware
- type MySQLConfig
- type PostgreSQLConfig
- type SQLiteConfig
- type WebsocketManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudContext ¶
type CloudContext struct {
// contains filtered or unexported fields
}
func (*CloudContext) Database ¶
func (c *CloudContext) Database() (*Database, error)
func (*CloudContext) Delete ¶
func (c *CloudContext) Delete(key string)
func (*CloudContext) Set ¶
func (c *CloudContext) Set(key string, value any)
func (*CloudContext) WebsocketManager ¶
func (c *CloudContext) WebsocketManager() (*WebsocketManager, error)
type CloudFunction ¶
type CloudFunction struct { Name string EntryID cron.EntryID Handler CloudHandler }
type CloudHandler ¶
type CloudHandler func(ctx *CloudContext) error
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) ParseMultipartForm ¶
func (*Context) ParseQuery ¶
func (*Context) Response ¶
func (c *Context) Response() http.ResponseWriter
func (*Context) SetValue ¶
func (c *Context) SetValue(key ContextKey, value any)
func (*Context) Value ¶
func (c *Context) Value(key ContextKey) any
func (*Context) WebsocketManager ¶
func (c *Context) WebsocketManager() (*WebsocketManager, error)
type ContextKey ¶
type ContextKey string
type Dart ¶
type Dart struct {
// contains filtered or unexported fields
}
func (*Dart) ScheduleCloudFunction ¶
func (d *Dart) ScheduleCloudFunction(spec string, cf *CloudFunction)
func (*Dart) SetErrorHandler ¶
func (d *Dart) SetErrorHandler(errorHandler ErrorHandler)
func (*Dart) Static ¶
func (d *Dart) Static(prefix, root string, middlewares ...Middleware)
func (*Dart) Use ¶
func (d *Dart) Use(middlewares ...Middleware)
func (*Dart) Websocket ¶
func (d *Dart) Websocket(path string, middlewares ...Middleware)
func (*Dart) WithCloudFunctions ¶
func (d *Dart) WithCloudFunctions()
func (*Dart) WithMySQLDatabase ¶
func (d *Dart) WithMySQLDatabase(cfg MySQLConfig)
func (*Dart) WithPostgreSQLDatabase ¶
func (d *Dart) WithPostgreSQLDatabase(cfg PostgreSQLConfig)
func (*Dart) WithSQLiteDatabase ¶
func (d *Dart) WithSQLiteDatabase(cfg SQLiteConfig)
func (*Dart) WithWebsocketManager ¶
func (d *Dart) WithWebsocketManager()
type Database ¶
func NewMySQLDatabase ¶
func NewMySQLDatabase(cfg MySQLConfig) *Database
func NewPostgreSQLDatabase ¶
func NewPostgreSQLDatabase(cfg PostgreSQLConfig) *Database
func NewSQLiteDatabase ¶
func NewSQLiteDatabase(cfg SQLiteConfig) *Database
type ErrorHandler ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) Static ¶
func (g *Group) Static(prefix, root string, middlewares ...Middleware)
func (*Group) Use ¶
func (g *Group) Use(middlewares ...Middleware)
type Middleware ¶
type MySQLConfig ¶
type PostgreSQLConfig ¶
type SQLiteConfig ¶
type SQLiteConfig struct {
Filename string
}
type WebsocketManager ¶
type WebsocketManager struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.