Documentation
¶
Index ¶
- type Router
- func (r *Router) Broadcast(path string, messageType int, data []byte, sender *websocket.Conn)
- func (r *Router) CORSMiddleware(cors models.CORSMiddleware)
- func (r *Router) CheckCors()
- func (r *Router) DefaultCORS()
- func (r *Router) Delete(path string, handler models.HandlerFunc)
- func (r *Router) Get(path string, handler models.HandlerFunc)
- func (r *Router) NewBroker(path string, address string, brokerPort, wsPort int) (b *models.Broker, err error)
- func (r *Router) NewGroup(path string) *models.Group
- func (r *Router) NewWebSocket(path string) (client *models.WSClient)
- func (r *Router) Post(path string, handler models.HandlerFunc)
- func (r *Router) Put(path string, handler models.HandlerFunc)
- 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) Update(path string, handler models.HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) CORSMiddleware ¶ added in v0.0.6
func (r *Router) CORSMiddleware(cors models.CORSMiddleware)
func (*Router) DefaultCORS ¶ added in v0.0.6
func (r *Router) DefaultCORS()
func (*Router) Delete ¶ added in v0.0.15
func (r *Router) Delete(path string, handler models.HandlerFunc)
func (*Router) NewBroker ¶ added in v0.0.17
func (r *Router) NewBroker(path string, address string, brokerPort, wsPort int) (b *models.Broker, err error)
NewBroker is initiating a new mqtt broker
func (*Router) NewWebSocket ¶ added in v0.0.16
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.