Documentation
¶
Index ¶
- type CORSMiddleware
- type Router
- func (r *Router) Broadcast(path string, messageType int, data []byte, sender *websocket.Conn)
- func (r *Router) CORSMiddleware(cors CORSMiddleware)
- func (r *Router) CheckCors()
- func (r *Router) DefaultCORS()
- func (r *Router) Get(path string, handler models.Handler)
- func (r *Router) Group(path string) *models.Group
- func (r *Router) Post(path string, handler models.Handler)
- func (r *Router) ServeFile(path, file string)
- func (r *Router) ServeFileSystem(path, directory string)
- func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (r *Router) WebSocket(path string, recieve func(data any))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSMiddleware ¶ added in v0.0.6
type CORSMiddleware struct {
// contains filtered or unexported fields
}
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) CORSMiddleware ¶ added in v0.0.6
func (r *Router) CORSMiddleware(cors CORSMiddleware)
func (*Router) DefaultCORS ¶ added in v0.0.6
func (r *Router) DefaultCORS()
func (*Router) ServeFileSystem ¶
serves file system specified in directory
directory = hst to start with . if in current directory path = server url, if all underlying file and folder should be browsable path/* * hast to be added
Click to show internal directories.
Click to hide internal directories.